重新思考自动程序修复:Bug复杂度、故障定位与LLM成本效率

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

精选理由

论文实测三种LLM的修复能力,发现便宜的DeepSeek-V3.2成本效率反超GPT-5,选模型前值得一看。

AI 摘要

该研究评估了ChatRepair和CodeCorrector两种APR技术在DeepSeek、GPT、Llama三个LLM上的修复表现。结果显示,结构复杂的bug和模糊的故障定位会加大修复难度,但LLM技术仍保持有竞争力的修复效果;定位越不精确,两种技术间的性能差距越大。研究发现,更高成本的LLM和更强的推理设置并不总能带来更好的成本效率。GPT-5修复的复杂bug比DeepSeek-V4-pro多7个、比DeepSeek-V3.2多39个,但DeepSeek-V3.2的总修复成本效率最佳。超过50%的中等复杂bug可由低成本LLM技术修复。

原文 · arXiv: DeepSeek

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

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.

重新思考自动程序修复:Bug复杂度、故障定位与LLM成本效率 · AI 热点