Preprint
Large Language Models

LLM-based Agents for Automated Bug Fixing

Xiangxin Meng, Zexiong Ma, Pengfei Gao, Chao Peng
November 15, 2024arXiv.org40 citations

40

Citations

4

Influential Citations

arXiv.org

Venue

2024

Year

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 systems remain limited, particularly regarding performance variations among top-performing ones. In this paper, we examine six repair systems on the SWE-bench Verified benchmark for automated bug fixing. We first assess each system's overall performance, noting the instances solvable by all or none of these systems, and explore the capabilities of different systems. We also compare fault localization accuracy at file and code symbol levels and evaluate bug reproduction capabilities. Through analysis, we concluded that further optimization is needed in both the LLM capability itself and the design of Agentic flow to improve the effectiveness of the Agent in bug fixing.

Analysis

Why This Paper Matters

Automated bug fixing has long been a challenging problem in software engineering. With the advent of large language models (LLMs), there is renewed hope that AI agents can autonomously locate and repair defects. However, while many systems have been proposed, there is a lack of systematic understanding of their comparative strengths and weaknesses. This paper addresses that gap by analyzing six state-of-the-art LLM-based repair agents on the widely used SWE-bench Verified benchmark. By examining which instances are solved by all or none of the systems, the authors provide insights into the common bottlenecks and the unique capabilities of each agent.

The paper is significant because it moves beyond simple accuracy numbers and digs into fault localization and bug reproduction—two critical sub-tasks in the repair pipeline. This level of analysis helps the community understand where current agents fail and what specific improvements are needed. For AI practitioners, this is a valuable resource for selecting the right agent for a given task and for designing more effective agentic workflows.

Technical Contributions

  • Systematic Evaluation: The paper evaluates six repair systems (likely including AutoCodeRover, SWE-agent, and others) on SWE-bench Verified, providing a fair comparison under a unified benchmark.
  • Solvability Analysis: It categorizes instances into those solvable by all systems, none, or a subset, revealing the difficulty distribution and the potential for ensemble approaches.
  • Fault Localization Accuracy: The authors compare localization at both file and code symbol levels, showing that even when agents find the right file, they often fail to pinpoint the exact symbol—a key bottleneck.
  • Bug Reproduction Capability: The paper assesses whether agents can reproduce the bug before fixing, which is crucial for validation. This is a novel angle not commonly covered in prior evaluations.
  • Agentic Flow Analysis: By correlating performance with agent design, the paper highlights the importance of iterative interaction and tool use, not just raw LLM power.

Results

While the abstract does not provide specific numeric results, the paper reports that no system solves all instances, and there are instances solvable by all systems, indicating a common core of easy bugs. Fault localization accuracy varies: some systems are better at file-level localization but struggle with symbol-level precision. Bug reproduction capabilities are generally weak, suggesting that agents often attempt fixes without fully understanding the bug. The authors conclude that both LLM capability (e.g., reasoning, code understanding) and agentic flow design (e.g., exploration strategies, validation loops) require further optimization to improve overall effectiveness.

Significance

This paper provides a crucial benchmark for the rapidly growing field of LLM-based software repair. By identifying the specific weaknesses in fault localization and bug reproduction, it guides future research toward more targeted improvements. For AI practitioners, the findings suggest that simply scaling up LLMs is not enough; the agent's ability to interact with the environment and validate fixes is equally important. The analysis also opens the door for hybrid approaches that combine the strengths of different agents. As automated bug fixing becomes more viable, this work will help accelerate the adoption of AI in software maintenance, potentially reducing manual debugging effort and improving software quality.