一句话:提出协调者-提议者多智能体框架 MultiFixer,通过上下文构建、迭代生成与两阶段精化修复 multi-hunk 缺陷,在多个基准上取得最优效果。
现有基于大语言模型(LLM)的自动程序修复(APR)方法难以处理需要在多个位置协同修改的 multi-hunk 缺陷,这类缺陷要求仓库级上下文理解、修复顺序调度以及 hunk 级补丁的生成与选择。为此,论文提出 MultiFixer:一个基于协调者-提议者(Coordinator-Proposer)架构的多智能体框架。它先进行工具增强的缺陷分析,构建细粒度的修复上下文,再由协调者与提议者智能体迭代生成补丁,并施加两阶段补丁精化以保证语法与语义正确性。作者在 Defects4J 与三个漏洞基准的 835 个缺陷上评估:Defects4J 上修复 326 个缺陷(含 62 个多方法与 27 个多文件缺陷),在相同基座模型下优于已有 APR 基线;结合 Claude-3.5-Sonnet 时修复 420 个缺陷,刷新该基准的最优结果;VUL4J 上修复 24 个真实漏洞(含 5 个 multi-hunk),在 SEC-bench 与 PatchEval 的 multi-hunk 子集上分别修复 11 与 19 个漏洞,均优于对比基线。
Automated Program Repair (APR) has benefited greatly from Large Language Models (LLMs), but existing LLM-based APR methods still struggle with multi-hunk bugs that require coordinated changes across multiple locations. These bugs demand repository-level context understanding, repair-order scheduling, and effective hunk-level patch generation and selection. To address these challenges, we propose MultiFixer, a novel Coordinator-Proposer based multi-agent framework for multi-hunk repair. MultiFixer performs tool-augmented bug analysis, constructs fine-grained repair context, iteratively generates patches through a Coordinator-Proposer architecture, and applies two-stage patch refinement for syntactic and semantic correctness. We evaluate MultiFixer on 835 bugs from Defects4J and three vulnerability benchmarks. On Defects4J, MultiFixer fixes 326 bugs, including 62 multi-method and 27 multi-file bugs, and outperforms prior APR baselines in the reported comparisons with the same base model. Moreover, MultiFixer also fixes 46 multi-hunk bugs among 95 unique fixes. When combined with Claude-3.5-Sonnet, MultiFixer repairs 420 bugs, establishing a new state of the art on Defects4J. On VUL4J, MultiFixer repairs 24 real-world vulnerabilities, including 5 multi-hunk cases. On the multi-hunk subsets of SEC-bench and PatchEval, MultiFixer fixes 11 and 19 vulnerabilities, respectively, outperforming all compared baselines under GPT-3.5. These results demonstrate the effectiveness of MultiFixer for multi-hunk repair.
@inproceedings{abs-2607-26591,
title = {MultiFixer: A Coordinator-Proposer Based Multi-agent Framework for Fixing Multi-hunk Bugs},
author = {Haichuan Hu and Chunrong Fang and Ye Shang and Jiawei Liu and Weifeng Sun and Guoqing Xie and Chenxing Zhong and Quanjun Zhang},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3837527}
}