NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

An Empirical Study on LLM-based Agents for Automated Bug Fixing

Xiangxin Meng, Zexiong Ma, Pengfei Gao, Chao Peng · OpenReview

Abstract

Large language models (LLMs) and LLM-based Agents have been applied to fix bugs automatically, demonstrating the capability in addressing software defects by engaging in development environment interaction, iterative validation and code modification. However, systematic analysis of these agent and non-agent systems remain limited, particularly regarding performance variations among top-performing ones. In this paper, we examine seven proprietary and open-source systems on the SWE-bench Lite benchmark for automated bug fixing. We first assess each system's overall performance, noting instances solvable by all or none of these sytems, and explore why some instances are uniquely solved by specific system types. We also compare fault localization accuracy at file and line levels and evaluate bug reproduction capabilities, identifying instances solvable only through dynamic reproduction. Through analysis, we concluded that further optimization is needed in both the LLM itself and the design of Agentic flow to improve the effectiveness of the Agent in bug fixing.

Introduction

Automated Program Repair (APR) has transitioned from fixing isolated code snippets to managing entire software repositories. LLM-based agents—which can browse files, run terminals, and edit code—are the new frontier in this domain. However, despite high scores on public leaderboards, there remains a lack of systematic understanding regarding why these agents succeed or fail. This study provides a "state of the union" for LLM-based bug-fixing agents by evaluating six top-performing systems on the SWE-bench Verified benchmark.

Methodology

The researchers analyzed six leading systems: W&B Programmer, Blackbox AI Agent, CodeStory Midwit Agent, Learn-by-interact, devlo, and Emergent E1. The evaluation utilized SWE-bench Verified, a high-quality subset of 500 real-world Python bugs that have been human-checked for clarity and test reliability.

The methodology focused on three key areas:

  1. Issue Quality Scoring: Using DeepSeek-R1 to evaluate issue descriptions across dimensions like stack trace presence and proposed solutions.
  2. Granular Fault Localization (FL): Analyzing whether agents correctly identified specific code symbols (classes, methods) rather than just the correct files.
  3. Bug Reproduction: Measuring the impact of generating reproduction scripts through the authors' experimental RepoFixer framework.

Performance and Consensus

The W&B Programmer, leveraging OpenAI’s o1 model, led the evaluation by resolving 64.6% (323/500) of the bugs. Analysis of the intersections between agent solutions reveals a significant "consensus" core: 181 cases were solved by all six systems, while 96 cases remained unsolved by any, highlighting a set of bugs that current LLM reasoning still cannot grasp.

Intersection of solved bug instances across the six evaluated agents, highlighting the consensus and unique capabilities of different systems.

Interestingly, the "Learn-by-interact" agent solved 12 unique cases that no other agent could. This is attributed to its use of "in-context learning" from historical successful debugging trajectories, suggesting that memory of past fixes is a powerful differentiator.

The Localization Bottleneck

A major finding of the study is the discrepancy between file-level and symbol-level fault localization. While top agents like W&B Programmer are highly effective at finding the right file (reaching 89.6% accuracy), their performance drops significantly when tasked with identifying the specific code symbol (function or class) causing the bug.

Fault localization performance at the file level (top) and a more granular level (bottom), showing the high success rate in identifying the correct files.

Improving this fine-grained localization is identified as the most direct path to better agent performance. Furthermore, the quality of the initial issue report is a strong predictor of success; agents are nearly twice as likely to succeed if the human reporter provides a "Resolve Solution" hint.

Reproduction as a Quality Signal

The study highlights that bug reproduction is a hallmark of successful fixing. If an agent can generate a "related" reproduction script—one that fails before the fix and passes after—the probability of a successful fix jumps to over 80%. The RepoFixer framework demonstrated that even a standard agentic design is highly effective if it prioritizes this reproduction-validation loop, resolving 51% of issues.

Conclusion and Future Work

While LLM-based agents have made significant strides, their success is heavily dependent on the quality of initial issue descriptions and the precision of fault localization. Future work should focus on enhancing agent reasoning to filter noise in reports and expanding benchmarks to include multilingual repositories (Java, C++, etc.) to ensure these insights generalize across the software engineering landscape.

Summary updated

BibTeX
@misc{meng2024empirical,
  author = {Xiangxin Meng and Zexiong Ma and Pengfei Gao and Chao Peng},
  title = {{An Empirical Study on LLM-based Agents for Automated Bug Fixing}},
  year = {2024},
  eprint = {2411.10213},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.10213},
}
Figure