arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2410.12468cs.SEcs.AI
收藏

评估软件开发智能体:真实世界 GitHub 场景中的补丁模式、代码质量与问题复杂度

Evaluating Software Development Agents: Patch Patterns, Code Quality, and Issue Complexity in Real-World GitHub Scenarios

Centre for Research on Intelligent Software Engineering(智能软件工程研究中心);School of Computing and Information Systems(计算与信息系统学院);Singapore Management University(新加坡管理大学)

Zhi Chen, Lingxiao Jiang

AI总结:

本研究通过评估10个顶级智能体在SWE-Bench Verified中500个真实GitHub问题上生成的4,892个补丁,系统分析了补丁模式、代码质量与问题复杂度,揭示了现有基准的测试覆盖局限,并指出任务分解可提升智能体在复杂代码库上的表现。

摘要:

近年来,基于人工智能的软件工程已从预训练模型发展到先进的智能体工作流,软件开发智能体(Software Development Agents)代表着下一个重大飞跃。这些智能体具备推理、规划以及与外部环境交互的能力,为复杂的软件工程任务提供了有前景的解决方案。然而,尽管大量研究评估了大型语言模型(LLMs)生成的代码,但针对智能体生成的补丁,尤其是在真实世界环境中的全面研究仍然缺乏。本研究通过评估来自 10 个排名前列的智能体在 SWE-Bench Verified 中 500 个真实世界 GitHub 问题上的 4,892 个补丁来填补这一空白,重点关注其对代码质量的影响。我们的分析表明,没有单一智能体占据主导地位,有 170 个问题未被解决,说明仍有改进空间。即使对于通过单元测试并解决了问题的补丁,与仓库开发者提供的黄金补丁(gold patches)相比,智能体也做出了不同的文件和函数修改,揭示了基准测试用例覆盖范围的局限性。大多数智能体保持了代码的可靠性和安全性,避免了新的缺陷或漏洞;虽然一些智能体增加了代码复杂度,但许多智能体减少了代码重复并最小化了代码异味(code smells)。最后,智能体在较简单的代码库上表现更好,这表明将复杂任务分解为更小的子任务可能提高有效性。本研究首次对真实世界 GitHub 问题上的智能体生成补丁进行了全面评估,为推进人工智能驱动的软件开发提供了见解。

英文摘要:

In recent years, AI-based software engineering has progressed from pre-trained models to advanced agentic workflows, with Software Development Agents representing the next major leap. These agents, capable of reasoning, planning, and interacting with external environments, offer promising solutions to complex software engineering tasks. However, while much research has evaluated code generated by large language models (LLMs), comprehensive studies on agent-generated patches, particularly in real-world settings, are lacking. This study addresses that gap by evaluating 4,892 patches from 10 top-ranked agents on 500 real-world GitHub issues from SWE-Bench Verified, focusing on their impact on code quality. Our analysis shows no single agent dominated, with 170 issues unresolved, indicating room for improvement. Even for patches that passed unit tests and resolved issues, agents made different file and function modifications compared to the gold patches from repository developers, revealing limitations in the benchmark's test case coverage. Most agents maintained code reliability and security, avoiding new bugs or vulnerabilities; while some agents increased code complexity, many reduced code duplication and minimized code smells. Finally, agents performed better on simpler codebases, suggesting that breaking complex tasks into smaller sub-tasks could improve effectiveness. This study provides the first comprehensive evaluation of agent-generated patches on real-world GitHub issues, offering insights to advance AI-driven software development.

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

↑