RepairAgent: An Autonomous, LLM-Based Agent for Program Repair
2024/03/25 by Islem Bouzenia, Bouzenia, Islem, Prémkumar Dévanbu +3 · 71 citations
Computer Science · #AI-based Problem Solving and Planning #Artificial Intelligence (cs.AI) #Distributed and Parallel Computing Systems #Distributed systems and fault tolerance #FOS: Computer and information sciences #Software Engineering (cs.SE)
paper · pdf · doi:10.48550/arxiv.2403.17134
openalex publication_date 2024/03/25 · openalex created_date 2025/10/10 · openalex updated_date 2026/07/28
Abstract
Automated program repair has emerged as a powerful technique to mitigate the impact of software bugs on system reliability and user experience. This paper introduces RepairAgent, the first work to address the program repair challenge through an autonomous agent based on a large language model (LLM). Unlike existing deep learning-based approaches, which prompt a model with a fixed prompt or in a fixed feedback loop, our work treats the LLM as an agent capable of autonomously planning and executing actions to fix bugs by invoking suitable tools. RepairAgent freely interleaves gathering information about the bug, gathering repair ingredients, and validating fixes, while deciding which tools to invoke based on the gathered information and feedback from previous fix attempts. Key contributions that enable RepairAgent include a set of tools that are useful for program repair, a dynamically updated prompt format that allows the LLM to interact with these tools, and a finite state machine that guides the agent in invoking the tools. Our evaluation on the popular Defects4J dataset demonstrates RepairAgent's effectiveness in autonomously repairing 164 bugs, including 39 bugs not fixed by prior techniques. Interacting with the LLM imposes an average cost of 270,000 tokens per bug, which, under the current pricing of OpenAI's GPT-3.5 model, translates to 14 cents of USD per bug. To the best of our knowledge, this work is the first to present an autonomous, LLM-based agent for program repair, paving the way for future agent-based techniques in software engineering.
Cited by
- Agentic Software Issue Resolution with Large Language Models: A Survey
- Specula: Scaling formal specifications for autonomous model checking of system code
- Specification-Driven DevOps for Multi-Service Environments
- Patch-to-PoC: A Systematic Study of Agentic LLM Systems for Linux Kernel N-Day Reproduction
- Precise Debugging Benchmark: Is Your Model Debugging or Regenerating?
- Automated Modernization of Machine Learning Engineering Notebooks for Reproducibility
- Aligning Academia with Industry: An Empirical Study of Industrial Needs and Academic Capabilities in AI-Driven Software Engineering
- Imitation Game: Reproducing Deep Learning Bugs Leveraging an Intelligent Agent
- Multi-Agent Systems for Dataset Adaptation in Software Engineering: Capabilities, Limitations, and Future Directions
- AttackPilot: Autonomous Inference Attacks Against ML Services With LLM-Based Agents
- End-to-End Automated Logging via Multi-Agent Framework
- Enhancing Automated Program Repair via Faulty Token Localization and Quality-Aware Patch Refinement
- InfCode: Adversarial Iterative Refinement of Tests and Patches for Reliable Software Issue Resolution
- Rethinking Kernel Program Repair: Benchmarking and Enhancing LLMs with RGym
- Agent READMEs: An Empirical Study of Context Files for Agentic Coding
- Beyond Accuracy: Behavioral Dynamics of Agentic Multi-Hunk Repair
- Towards a Human-in-the-Loop Framework for Reliable Patch Evaluation Using an LLM-as-a-Judge
- LLMs as Judges: Toward The Automatic Review of GSN-compliant Assurance Cases
- Can Language Models Go Beyond Coding? Assessing the Capability of Language Models to Build Real-World Systems
ReMind: Understanding Deductive Code Reasoning in LLMs- Repairing Responsive Layout Failures Using Retrieval Augmented Generation
- Understanding Code Agent Behaviour: An Empirical Study of Success and Failure Trajectories
- Empirical and Sustainability Aspects of Software Engineering Research in the Era of Large Language Models: A Reflection
- A Research Roadmap for Augmenting Software Engineering Processes and Software Products with Generative AI
- Beyond Synthetic Benchmarks: Evaluating LLM Performance on Real-World Class-Level Code Generation
- MultiFixer: A Coordinator-Proposer Based Multi-Agent Framework For Fixing Multi-Hunk Bugs
- ALMAS: an Autonomous LLM-based Multi-Agent Software Engineering Framework
- Finding the Needle in the Crash Stack: Industrial-Scale Crash Root Cause Localization with AutoCrashFL
- Automated Cloud Infrastructure-as-Code Reconciliation with AI Agents
- An Experimental Study of Real-Life LLM-Proposed Performance Improvements
- InspectCoder: Dynamic Analysis-Enabled Self Repair through interactive LLM-Debugger Collaboration
- Empowering Real-World: A Survey on the Technology, Practice, and Evaluation of LLM-driven Industry Agents
- Signature in Code Backdoor Detection, how far are we?
- Project-Level C-to-Rust Translation via Synergistic Integration of Knowledge Graphs and Large Language Models
- MEC3O: Multi-Expert Consensus for Code Time Complexity Prediction
- A Survey on Agentic Security: Applications, Threats and Defenses
- Multi-Agent Code-Orchestrated Generation for Reliable Infrastructure-as-Code
- Abstain and Validate: A Dual-LLM Policy for Reducing Noise in Agentic Program Repair
- Semantics-Aligned, Curriculum-Driven, and Reasoning-Enhanced Vulnerability Repair Framework
- Multi-LLM Orchestration for High-Quality Code Generation: Exploiting Complementary Model Strengths
- 90% Faster, 100% Code-Free: MLLM-Driven Zero-Code 3D Game Development
- Red Teaming Program Repair Agents: When Correct Patches can Hide Vulnerabilities
- LLM-Powered Code Analysis and Optimization for Gaussian Splatting Kernels
- BloomAPR: A Bloom's Taxonomy-based Framework for Assessing the Capabilities of LLM-Powered APR Solutions
- Automatically Generating Web Applications from Requirements Via Multi-Agent Test-Driven Development
- AgentGuard: Runtime Verification of AI Agents
- Improving the Efficiency of LLM Agent Systems through Trajectory Reduction
- Beyond Language Barriers: Multi-Agent Coordination for Multi-Language Code Generation
- SWE-NFI: Studying and Benchmarking Coding Agents for Non-Functional Improvements
- Evaluating LLM Agents on Automated Software Analysis Tasks
- Clotho: Measuring Task-Specific Pre-Generation Test Adequacy for LLM Inputs
- MatchFixAgent: Language-Agnostic Autonomous Repository-Level Code Translation Validation and Repair
- On the Use of Agentic Coding: An Empirical Study of Pull Requests on GitHub
- CodeCureAgent: Automatic Classification and Repair of Static Analysis Warnings
- Large Language Models for Security Operations Centers: A Comprehensive Survey
- Using Contrastive Learning to Improve Two-Way Reasoning in Large Language Models: The Obfuscation Task as a Case Study
- Red-Teaming Coding Agents from a Tool-Invocation Perspective: An Empirical Security Assessment
- Adversarial Bug Reports as a Security Risk in Language Model-Based Automated Program Repair
- VulRTex: A Reasoning-Guided Approach to Identify Vulnerabilities from Rich-Text Issue Report
- LLM-GUARD: Large Language Model-Based Detection and Repair of Bugs and Security Vulnerabilities in C++ and Python
- Automated Generation of Issue-Reproducing Tests by Combining LLMs and Search-Based Testing
- From Benchmark Data To Applicable Program Repair: An Experience Report
- On the need to perform comprehensive evaluations of automated program repair benchmarks: Sorald case study
- LinkAnchor: An Autonomous LLM-Based Agent for Issue-to-Commit Link Recovery
- AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunities
- CP-Agent: Agentic Constraint Programming
- WARP -- Web-Augmented Real-time Program Repairer: A Real-Time Compilation Error Resolution using LLMs and Web-Augmented Synthesis
- Goedel-Prover-V2: Scaling Formal Theorem Proving with Scaffolded Data Synthesis and Self-Correction
- Meta-RAG on Large Codebases Using Code Summarization
- Trae Agent: An LLM-based Agent for Software Engineering with Test-time Scaling
- Repair-R1: Better Test Before Repair
Related