Automated Program Repair (APR) agents leverage Large Language Models (LLMs) to autonomously diagnose and fix software bugs through reasoning, planning, and tool use. Despite impressive leaderboard gains on benchmarks such as SWE-bench, little is understood about how these agents take actions, where they fail, and how their behavior compares to that of human developers. This paper presents the first systematic analysis of five state-of-the-art APR agents across 500 real-world repair tasks, tracing their full decision-making pipelines -- from issue description to patch validation. Our study reveals that while agents excel at simple fixes, they struggle with logic-intensive bugs, often producing verbose or overfitted patches that merely satisfy existing tests. We find that test generation and regression test selection remain major bottlenecks, with agents frequently failing to reproduce issues or run relevant regression tests. Moreover, most agents operate with primitive tooling (e.g., bash scripts) and lack access to debuggers or program analyzers, which constrains their reasoning and patch quality. These findings highlight key limitations in current APR systems and motivate a shift-left approach -- emphasizing early, high-quality test generation and validation -- to reduce spurious fixes and improve semantic correctness. We further outline concrete directions for next-generation APR design: (1) richer and more integrated tool ecosystems, (2) diversified agentic architectures that combine complementary strengths, and (3) benchmarks that prioritize semantic repair quality and test generation fidelity over surface-level success metrics.
翻译:自动程序修复(APR)代理利用大型语言模型(LLM)通过推理、规划和工具使用来自主诊断和修复软件缺陷。尽管在SWE-bench等基准测试中取得了令人瞩目的排行榜成绩,但人们对这些代理如何采取行动、在何处失败,以及其行为与人类开发者的比较仍知之甚少。本文首次对五种最先进的APR代理在500个真实世界修复任务中进行了系统分析,追踪了其从问题描述到补丁验证的完整决策流程。我们的研究表明,尽管代理擅长简单修复,但在处理逻辑密集型缺陷时却表现挣扎,常常生成冗长或过拟合的补丁,这些补丁仅能满足现有测试。我们发现,测试生成和回归测试选择仍然是主要瓶颈,代理经常无法复现问题或运行相关的回归测试。此外,大多数代理使用原始工具(如bash脚本),缺乏对调试器或程序分析器的访问,这限制了其推理能力和补丁质量。这些发现揭示了当前APR系统的关键局限性,并推动了优先进行早期高质量测试生成与验证的“左移”方法,以减少虚假修复并提高语义正确性。我们进一步概述了下一代APR设计的具体方向:(1)更丰富、更集成的工具生态系统,(2)结合互补优势的多样化代理架构,以及(3)优先考虑语义修复质量和测试生成准确性而非表面成功指标的基准测试。