Repairing Code Defects Through Multiple LLM Collaboration and Failure Information Capturing

In recent years, the advent of large language models (LLMs) has significantly advanced automatic program repair (APR). However, due to a lack of domain-specific software engineering knowledge, base LLMs are prone to hallucinations during the repair process, which compromises the correctness of the generated patches. Although training or fine-tuning domain-specific LLMs can mitigate this issue, it is prohibitively expensive. In this paper, we propose a novel APR model based on multiple LLM collaboration and failure information capturing. Without requiring fine-tuning or retrieval-augmented generation (RAG), our model enhances the APR capabilities of base LLMs. It is notable that we utilize sandboxed executions to extract failure contexts for bug root-cause analysis and design a hierarchical coarse-to-fine (i.e., method-to-block) bug localization to constrain edit scopes. By isolating patch generation from irrelevant code, our approach substantially mitigates incorrect patch generation. Evaluations on Defects4J (V1.2 & V2.0), QuixBugs-Java, and HumanEval-Java datasets demonstrate that the proposed DeepSeek-backed model outperforms baseline models, yielding 192, 182, 40, and 158 correct patches, respectively.

Authors

Institutions

Publication Details

Journal
Software
Published
2026-10-29
DOI
https://doi.org/10.3390/software5040047
Primary Topic
Software Testing and Debugging Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Repairing Code Defects Through Multiple LLM Collaboration and Failure Information Capturing

Binyuan Yan, Jiaxuan Han, Qiucheng Ban, Zeyuan Zhou et al.
3 links
Software
Software Testing and Debugging Techniques
article

Repairing Code Defects Through Multiple LLM Collaboration and Failure Information Capturing

Binyuan Yan, Jiaxuan Han, Qiucheng Ban, Zeyuan Zhou, Yongjin Cheng, Gang Cao
article en

Abstract

In recent years, the advent of large language models (LLMs) has significantly advanced automatic program repair (APR). However, due to a lack of domain-specific software engineering knowledge, base LLMs are prone to hallucinations during the repair process, which compromises the correctness of the generated patches. Although training or fine-tuning domain-specific LLMs can mitigate this issue, it is prohibitively expensive. In this paper, we propose a novel APR model based on multiple LLM collaboration and failure information capturing. Without requiring fine-tuning or retrieval-augmented generation (RAG), our model enhances the APR capabilities of base LLMs. It is notable that we utilize sandboxed executions to extract failure contexts for bug root-cause analysis and design a hierarchical coarse-to-fine (i.e., method-to-block) bug localization to constrain edit scopes. By isolating patch generation from irrelevant code, our approach substantially mitigates incorrect patch generation. Evaluations on Defects4J (V1.2 & V2.0), QuixBugs-Java, and HumanEval-Java datasets demonstrate that the proposed DeepSeek-backed model outperforms baseline models, yielding 192, 182, 40, and 158 correct patches, respectively.

SoftwareVol. 5(4)
Guizhou Electric Power Design and Research Institute (CN), Guizhou Power Grid Co., Ltd. (China) (CN)
Openalex Percentile: Top 4%
Software Testing and Debugging Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon