一句话:提出 TraceRepair,将运行时执行轨迹作为客观约束,通过多智能体交叉验证与辩论迭代精化补丁,在 Defects4J 上修复 392 个缺陷。
自动程序修复(APR)旨在无需人工干预地消除软件缺陷,但复杂逻辑错误——尤其是无崩溃信号的静默失败——仍难以处理。现有基于 LLM 的修复方法依赖对话反馈、检索增强生成或静态分析工具,本质上仍是静态的,仅利用源码与基本测试输出,难以准确刻画复杂运行时行为与动态数据依赖。受人类调试实践启发,论文主张将运行时证据(执行轨迹所暴露的具体状态变迁与数据依赖)引入 APR;但单个 LLM 孤立解读轨迹时容易固守某一修复假设,导致测试过拟合,生成的补丁只是偶然通过轨迹与测试套件而非逻辑正确。为此作者提出 TraceRepair:一个多智能体框架,把运行时事实当作候选补丁必须满足的共享约束。其中探针智能体捕获关键变量的执行快照,为修复提供客观依据;专门的智能体委员会对候选补丁进行交叉验证,暴露不一致并迭代精化。在 Defects4J 基准上,TraceRepair 正确修复 392 个缺陷,显著优于现有 LLM 方法;在新构建的近期缺陷数据集上亦表现出更高效率与强泛化能力,说明性能提升源于动态推理而非记忆。
Automated Program Repair (APR) aims to resolve software bugs without human intervention. However, handling complex logic errors, especially silent failures that produce incorrect outputs without any explicit crash signals, remains a significant challenge. Current LLM-based APR approaches attempt to address this issue through conversational feedback, retrieval-augmented generation, or static analysis tools. However, these methods are fundamentally static, relying only on source code and basic test outputs, and thus struggle to capture complex runtime behaviors and dynamic data dependencies accurately. Inspired by human debugging practice, incorporating runtime evidence into APR provides direct access to program behavior through execution traces, which expose concrete state transitions and data dependencies. However, even with such runtime evidence, a single LLM interpreting it in isolation tends to commit to a specific repair hypothesis, leading to test overfitting and producing patches that satisfy the observed traces and test suite by coincidence rather than correct logic. This observation suggests that runtime evidence should not be treated merely as additional input, but as objective constraints that candidate patches must satisfy. Building on this insight, we propose TraceRepair, a multi-agent framework that leverages runtime facts as shared constraints for patch validation. A probe agent captures execution snapshots of critical variables, forming an objective basis for repair, while a committee of specialized agents cross-verifies candidate patches to expose inconsistencies and iteratively refine them. Evaluated on the Defects4J benchmark, TraceRepair substantially improves repair effectiveness, correctly fixing 392 defects and outperforming existing LLM-based approaches. Extensive experiments further demonstrate improved efficiency and strong generalization on a newly constructed dataset of recent bugs, suggesting that the performance gains arise from dynamic reasoning rather than memorization.
@inproceedings{paperbot12312,
title = {From Guessing to Seeing: Enhancing LLM-Based Program Repair via Trace-Guided Multi-strategy Debate},
author = {Jiaqing Wu and Tong Wu and Manqing Zhang and Yunwei Dong and Bo Shen},
booktitle = {ASE},
year = {2026},
doi = {10.1145/3832783.3837458}
}