ThinkRepair: Self-Directed Automated Program Repair
Xin Yin, Chao Ni, Shaohua Wang, Zhenhao Li, Limin Zeng, Xiaohu Yang

TL;DR
ThinkRepair introduces a self-directed, LLM-based automated program repair method that automatically collects reasoning chains and interacts with LLMs to fix bugs, significantly outperforming state-of-the-art approaches on multiple datasets.
Contribution
It proposes a novel two-phase self-directed approach using Chain-of-Thought prompts for bug fixing, reducing manual prompt engineering and enhancing repair effectiveness.
Findings
Fixes 98 bugs on Defects4J V1.2, outperforming baselines by up to 344.4%
Fixes 12-65 more bugs than SOTA on Defects4J V2.0
Improves bug fixing on QuixBugs dataset for Java and Python
Abstract
Though many approaches have been proposed for Automated Program Repair (APR) and indeed achieved remarkable performance, they still have limitations in fixing bugs that require analyzing and reasoning about the logic of the buggy program. Recently, large language models (LLMs) instructed by prompt engineering have attracted much attention for their powerful ability to address many kinds of tasks including bug-fixing. However, the quality of the prompt will highly affect the ability of LLMs and manually constructing high-quality prompts is a costly endeavor. To address this limitation, we propose a self-directed LLM-based automated program repair, ThinkRepair, with two main phases: collection phase and fixing phase. The former phase automatically collects various chains of thoughts that constitute pre-fixed knowledge by instructing LLMs with the Chain-of-Thought (CoT) prompt. The…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsCloud Computing and Resource Management · Distributed systems and fault tolerance · Software System Performance and Reliability
