Rethinking Automated Program Repair: The Impact of Bug Complexity, Fault Localization, and LLM Cost-efficiency

📄 arXiv: 2608.14065v1 📥 PDF

作者: Junchi Liu, Ali Bigdeli, Roya Daneshi, Atu Ambala, Sudipto Ghosh, Fabio Santos

分类: cs.SE, cs.AI

发布日期: 2026-08-14

备注: 20 pages, 6 figures, 10 tables. Accepted at ESEM 2026


💡 一句话要点

提出基于LLM的自动程序修复方法以应对复杂错误问题

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 自动程序修复 大型语言模型 错误复杂性 故障定位 成本效益

📋 核心要点

  1. 现有的APR方法在处理复杂错误和不精确故障定位时表现不佳,导致修复效果不理想。
  2. 本研究通过实证分析探讨了LLM-based APR的修复性能,重点关注错误复杂性和故障定位的影响。
  3. 实验结果显示,低成本的LLM-based APR技术能够修复超过50%的中等复杂性错误,且不同技术间的修复效果差异显著。

📝 摘要(中文)

背景:软件缺陷在开发中仍然是一个关键挑战,迫切需要有效的自动程序修复(APR)技术。尽管基于大型语言模型(LLM)的APR系统展现出潜力,但先前研究主要集中在整体修复效果上,缺乏对错误复杂性、故障定位、推理设置和修复成本效益的深入探讨。目标:本研究通过全面的实证分析,探讨LLM-based APR的修复性能如何受到错误复杂性、故障定位、推理设置和成本的影响。方法:我们评估了两种APR技术(ChatRepair和CodeCorrector),使用三种LLM(DeepSeek、GPT和Llama),并通过多维实证框架和统计分析考察它们在不同错误复杂性和定位策略下的表现。结果:尽管结构复杂的错误和不精确的故障定位使修复更加困难,但基于LLM的APR技术仍然实现了竞争性的修复效果。结论:超过50%的中等复杂性错误可以通过低成本的LLM-based APR技术修复。

🔬 方法详解

问题定义:本论文旨在解决现有APR技术在处理复杂软件错误和不精确故障定位时的不足,尤其是如何提高修复效果和成本效益。

核心思路:通过对不同LLM(如DeepSeek、GPT和Llama)在多种错误复杂性和定位策略下的表现进行系统评估,探索影响修复性能的关键因素。

技术框架:研究采用多维实证框架,首先对APR技术进行分类,然后通过统计分析比较不同技术在修复效果和成本效益上的表现。主要模块包括错误复杂性评估、故障定位策略分析和修复效果比较。

关键创新:本研究的创新在于系统性地分析了错误复杂性和故障定位对APR技术性能的影响,揭示了高成本LLM与修复效果之间的非线性关系。

关键设计:在实验中,设置了不同的错误复杂性级别和故障定位策略,采用了多种LLM进行对比,重点关注修复效果与计算成本之间的权衡。具体参数设置和损失函数设计在实验中进行了详细记录。

🖼️ 关键图片

fig_0
fig_1

📊 实验亮点

实验结果表明,GPT-5在修复复杂错误方面的表现优于DeepSeek-V4-pro和DeepSeek-V3.2,分别多修复了7个和39个复杂错误。同时,DeepSeek-V3.2在总修复成本上表现出最佳的成本效益。

🎯 应用场景

该研究的潜在应用领域包括软件开发、自动化测试和维护等,能够为开发者提供更高效的错误修复工具,降低软件维护成本。未来,随着LLM技术的进步,APR技术有望在更复杂的软件系统中得到广泛应用。

📄 摘要(原文)

Background: Software bugs remain a critical challenge in development, necessitating effective Automated Program Repair (APR) techniques. While Large Language Model (LLM)-based APR systems have shown promise, prior studies primarily focus on overall repair effectiveness. The effects of bug complexity, fault localization, reasoning settings, and repair cost-effectiveness remain insufficiently explored. Aims: This study presents a comprehensive empirical analysis of LLM-based APR, focusing on how repair performance is shaped by bug complexity, fault localization, reasoning settings, and costs. Method: We evaluate two APR techniques (ChatRepair and CodeCorrector) using three LLMs (DeepSeek, GPT, and Llama), and examine their performance across diverse levels of bug complexity and localization strategies through a multi-dimensional empirical framework and statistical analysis. Results: Although structurally complex bugs and imprecise fault localization make repair more challenging, LLM-based APR techniques still achieve competitive repair effectiveness. Imprecise fault localization can substantially enlarge the performance gap between APR techniques. Furthermore, higher-cost LLMs and stronger reasoning settings do not consistently yield better cost-efficiency, revealing a nontrivial trade-off between repair effectiveness and computational cost. Conclusions: Over 50% of moderately complex bugs can be repaired by low-cost LLM-based APR techniques. The repair effectiveness gap between APR techniques becomes larger as fault localization becomes less precise. GPT-5 repairs 7 and 39 more complex bugs than DeepSeek-V4-pro and DeepSeek-V3.2, respectively; whereas the total repair cost of DeepSeek-V3.2 shows the best cost-efficiency performance.