arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2512.22387cs.SEcs.AIcs.MA
收藏

AI生成的代码不可重复(尚且):对基于LLM的编码代理依赖差距的实证研究

AI-Generated Code Is Not Reproducible (Yet): An Empirical Study of Dependency Gaps in LLM-Based Coding Agents

Bhanu Prakash Vangala, Ali Adibifar, Ashish Gehani, Tanu Malik

AI总结:

本文实证研究了基于LLM的编码代理生成代码的可重复性,发现仅68.3%的项目能在干净环境中成功执行,且不同语言存在显著差异,同时发现依赖项存在显著隐藏依赖。

摘要:

大语言模型(LLM)作为编码代理的兴起有望加速软件开发,但其对生成代码可重复性的影响仍鲜有研究。本文通过评估三个最先进的LLM编码代理(Claude Code、OpenAI Codex和Gemini)在100个标准化提示生成的300个项目中的表现,发现仅68.3%的项目能在干净环境中成功执行,不同语言的可重复性差异显著(Python 89.2%,Java 44.0%)。我们引入三层依赖框架(区分声明、工作和运行时依赖)来量化执行可重复性。结果还显示,从声明依赖到实际运行时依赖的平均扩展率为13.5倍,揭示了显著的隐藏依赖。

英文摘要:

The rise of Large Language Models (LLMs) as coding agents promises to accelerate software development, but their impact on generated code reproducibility remains largely unexplored. This paper presents an empirical study investigating whether LLM-generated code can be executed successfully in a clean environment with only OS packages and using only the dependencies that the model specifies. We evaluate three state-of-the-art LLM coding agents (Claude Code, OpenAI Codex, and Gemini) across 300 projects generated from 100 standardized prompts in Python, JavaScript, and Java. We introduce a three-layer dependency framework (distinguishing between claimed, working, and runtime dependencies) to quantify execution reproducibility. Our results show that only 68.3% of projects execute out-of-the-box, with substantial variation across languages (Python 89.2%, Java 44.0%). We also find a 13.5 times average expansion from declared to actual runtime dependencies, revealing significant hidden dependencies.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑