Cited by 68Software Testing and Debugging TechniquesSoftware Engineering ResearchSoftware System Performance and Reliability

ThinkRepair: Self-Directed Automated Program Repair

Open access
Yin, Xin, Ni, Chao, Wang, Shaohua, Li, Zhenhao, Zeng, Limin, Yang, Xiaohu·2024·Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis

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 latter phase targets fixing a bug by first selecting examples for few-shot learning and second automatically interacting with LLMs, optionally appending with feedback of testing information. Evaluations on two widely studied datasets (Defects4J and QuixBugs) by comparing ThinkRepair with 12 SOTA APRs indicate the priority of ThinkRepair in fixing bugs. Notably, ThinkRepair fixes 98 bugs and improves baselines by 27%∼344.4% on Defects4J V1.2. On Defects4J V2.0, ThinkRepair fixes 12∼65 more bugs than the SOTA APRs. Additionally, ThinkRepair also makes a considerable improvement on QuixBugs (31 for Java and 21 for Python at most).

Integrity signals

Registry

Crossref · 10.1145/3650212.3680359

Cites

12 of 12 references verified0 citation errors · 0 not checkable

Statistics

Recomputing p-values needs the paper’s full text.

Claims the paper makes

We couldn’t retrieve this paper’s full text, so its claims and self-check weren’t run. The registry and citation checks still apply.

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

Cites

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Yin, X., Ni, C., Wang, S., Li, Z., Zeng, L., & Yang, X.
Affiliations
  • Zhejiang University (CN)
  • Central University of Finance and Economics (CN)
  • Concordia University (CA)
Venue
Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis
Publisher
ACM
Published
2024-09-11
Pages
1274-1286
OpenAlex
W4402442387
Cited by
68
References
12
Citations by year
2026: 34 · 2025: 32 · 2024: 2
FWCI
18.50
Type
conference paper
Language
en
Open access
Locations
  • ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA) (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Funders
  • National Natural Science Foundation of China (Grant No.62202419)
  • Fundamental Research Funds for the Central Universities (No. 226-2022-00064)
  • Zhejiang Provincial Natural Science Foundation of China (No. LY24F020008)
  • State Street Zhejiang University Technology Center
Topics
  • Physical Sciences › Computer Science › Software › Software Testing and Debugging Techniques
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Computer Networks and Communications › Software System Performance and Reliability
Keywords
automated program repair, large language models, chain-of-thought prompting, prompt engineering, bug fixes, few-shot learning, Defects4J

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review