一句话:提出 PReMM,通过分而治之与双智能体 LLM 生成跨多方法补丁,修复多方法缺陷。
现有基于大语言模型(LLM)的自动程序修复技术虽能生成高质量补丁,但主要针对可由修改单个错误方法修复的缺陷,难以处理需要跨多个方法修改的补丁。本文提出 PReMM 技术,核心包括三部分:基于错误方法间依赖关系进行聚类的错误方法聚类技术,以支持分而治之的修复策略;故障上下文提取技术,收集额外信息以更好指导故障诊断和补丁生成;双智能体补丁生成技术,使用两个不同角色的 LLM 智能体更精确地分析故障并生成更高质量补丁。作者实现了同名工具,并在 Defects4J V1.2 和 V2.0 的真实缺陷上进行评估。PReMM 共为 307 个缺陷生成正确补丁,相比当前最先进的基于 LLM 的修复技术 ThinkRepair 多修复 102 个缺陷,提升 49.8%。
Large-language models (LLMs) have been leveraged to enhance the capability of automated program repair techniques in recent research. While existing LLM-based program repair techniques compared favorably to other techniques based on heuristics, constraint-solving, and learning in producing high-quality patches, they mainly target bugs that can be corrected by changing a single faulty method, which greatly limits the effectiveness of such techniques in repairing bugs that demand patches spanning across multiple methods. In this work, we propose the PReMM technique to effectively propose patches changing multiple methods. PReMM builds on three core component techniques: the faulty method clustering technique to partition the faulty methods into clusters based on the dependence relationship among them, enabling a divide-and-conquer strategy for the repairing task; the fault context extraction technique to gather extra information about the fault context which can be utilized to better guide the diagnosis of the fault and the generation of correct patches; the dual-agent-based patch generation technique that employs two LLM-based agents with different roles to analyze the fault more precisely and generate patches of higher-quality. We have implemented the PReMM technique into a tool with the same name and applied the tool to repair real-world bugs from datasets Defects4J V1.2 and V2.0. PReMM produced correct patches for 307 bugs in total. Compared with ThinkRepair, the state-of-the-art LLM-based program repair technique, PReMM correctly repaired 102 more bugs, achieving an improvement of 49.8%.
@article{paperbot2979,
title = {PReMM: LLM-Based Program Repair for Multi-method Bugs via Divide and Conquer},
author = {Linna Xie and Zhong Li and Yu Pei and Zhongzhen Wen and Kui Liu and Tian Zhang and Xuandong Li},
journal = {Proceedings of the ACM on Programming Languages},
volume = {9},
number = {OOPSLA2},
year = {2025},
doi = {10.1145/3763097}
}