paperbot · PL 论文追踪

全部论文 待读 收藏

P2 RepairAgent: An Autonomous, LLM-Based Agent for Program Repair

RepairAgent:面向程序修复的自主 LLM 智能体
ICSE 2025 IEEE/ACM 47th International Conference on Software Engineering (ICSE)2025匹配度 4/10 · 论文是 LLM Agent 用于程序修复,与用户核心方向(面向 Agentic/ML 系统的静态分析、用 LLM/Agent 改进静态分析/形式化验证、浮点/贝叶斯程序分析)仅有间接关联;且主要基于 GPT-3.5 旧模型验证,未涉及静态分析或形式化验证。引用 88 inbox
Islem Bouzenia, Premkumar Devanbu, Michael Pradel
crossref: 2026-09-12

AI 速览

一句话:首个基于 LLM 自主智能体的程序修复方法,在 Defects4J 上自主修复 164 个缺陷。

自动化程序修复是缓解软件缺陷影响的重要技术。现有基于深度学习的方法通常以固定提示或固定反馈回路驱动模型,缺乏自主性。本文提出 RepairAgent,首个将程序修复建模为基于大语言模型的自主智能体工作。该智能体可自主规划并执行动作,自由交错地进行缺陷信息收集、修复素材获取与修复验证,并依据已收集信息与过往修复尝试的反馈决定调用哪些工具。其关键贡献包括:面向程序修复的工具集、支持 LLM 与工具交互的动态更新提示格式,以及引导工具调用的有限状态机。在 Defects4J 上的评估显示,RepairAgent 自主修复了 164 个缺陷,其中 39 个为既有技术未能修复的缺陷;每个缺陷平均消耗 27 万 token,按 GPT-3.5 定价约合 14 美分。

问题
现有自动化程序修复方法依赖固定提示或固定反馈回路,无法根据修复进展自主决定收集何种信息、使用何种工具。
方法
将 LLM 视为可自主规划与行动的智能体,为其配备程序修复工具集、动态更新的提示格式与引导工具调用的有限状态机,使其交错进行信息收集、素材获取与修复验证。
评估
在常用的 Defects4J 数据集上评估,修复 164 个缺陷(含 39 个此前技术未修复的缺陷),并统计每缺陷平均 270k token、约 14 美分的成本。
原文摘要(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 Repair Agent, 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. Repair Agent 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 Repair Agent 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 Repair Agent's effectiveness in autonomously repairing 164 bugs, including 39 bugs not fixed by prior techniques. Interacting with the LLM imposes an average cost of 270k tokens per bug, which, under the current pricing of OpenAI's GPT-3.5 model, translates to 14 cents 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.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot8827,
  title = {RepairAgent: An Autonomous, LLM-Based Agent for Program Repair},
  author = {Islem Bouzenia and Premkumar Devanbu and Michael Pradel},
  booktitle = {ICSE},
  year = {2025},
  doi = {10.1109/icse55347.2025.00157}
}