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

Automated Program Repair in the Era of Large Pre-trained Language Models

Open access
Xia, Chunqiu Steven, Wei, Yuxiang, Zhang, Lingming·2023·2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)

Abstract

Automated Program Repair (APR) aims to help developers automatically patch software bugs. However, current state-of-the-art traditional and learning-based APR techniques face the problem of limited patch variety, failing to fix complicated bugs. This is mainly due to the reliance on bug-fixing datasets to craft fix templates (traditional) or directly predict potential patches (learning-based). Large Pre-Trained Language Models (LLMs), trained using billions of text/code tokens, can potentially help avoid this issue. Very recently, researchers have directly leveraged LLMs for APR without relying on any bug-fixing datasets. Meanwhile, such existing work either failed to include state-of-the-art LLMs or was not evaluated on realistic datasets. Thus, the true power of modern LLMs on the important APR problem is yet to be revealed. In this work, we perform the first extensive study on directly applying LLMs for APR. We select 9 recent state-of-the-art LLMs, including both generative and infilling models, ranging from 125M to 20B in size. We designed 3 different repair settings to evaluate the different ways we can use LLMs to generate patches: 1) generate the entire patch function, 2) fill in a chunk of code given the prefix and suffix 3) output a single line fix. We apply the LLMs under these repair settings on 5 datasets across 3 different languages and compare different LLMs in the number of bugs fixed, generation speed and compilation rate. We also compare the LLMs against recent state-of-the-art APR tools. Our study demonstrates that directly applying state-of-the-art LLMs can already substantially outperform all existing APR techniques on all our datasets. Among the studied LLMs, the scaling effect exists for APR where larger models tend to achieve better performance. Also, we show for the first time that suffix code after the buggy line (adopted in infilling-style APR) is important in not only generating more fixes but more patches with higher compilation rate. Besides patch generation, the LLMs consider correct patches to be more natural than other ones, and can even be leveraged for effective patch ranking or patch correctness checking. Lastly, we show that LLM-based APR can be further substantially boosted via: 1) increasing the sample size, and 2) incorporating fix template information.

Integrity signals

Registry

Crossref · 10.1109/icse48619.2023.00129

Cites

16 of 16 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?

  • A carefully-designed demonstration based on the paper's findings can lead to substantial improvements over widely-used demonstration construction methods.

    “We also show that a carefully-designed demonstration based on our findings can lead to substantial improvements over widely-used demonstration construction methods”
  • Existing studies mainly construct demonstrations by randomly selecting and arranging the demonstration examples.

    “Existing studies [17], [19] mainly construct demonstrations by randomly selecting and arranging the demonstration examples.”
  • AGENTLESS targets complex repository-level issues spanning multiple locations, unlike simplistic bugs studied in most prior work.

    “Furthermore, different from the simplistic bugs studied in most prior work [94], AGENTLESS targets complex repository-level issues spanning multiple locations.”
  • LLM-based APR tools, which sample multiple candidate patches per bug, have been shown to be state-of-the-art due to the powerful coding capability of modern LLMs.

    “Specifically, LLM-based APR tools, which sample multiple candidate patches per bug, have been shown to be the state-of-the-art due to the powerful coding capability of modern LLMs [94].”

Cites

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Xia, C. S., Wei, Y., & Zhang, L.
Affiliations
University of Illinois Urbana-Champaign (US)
Venue
2023 IEEE/ACM 45th International Conference on Software Engineering (ICSE)
Publisher
IEEE
Published
2023-05
Pages
1482-1494
ISSN
0270-5257 (ISSN-L)
OpenAlex
W4384345708
Cited by
433
References
16
Citations by year
2026: 105 · 2025: 157 · 2024: 141 · 2023: 30
FWCI
83.75
Type
conference paper
Language
en
Open access
Locations
  • ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University) (cc-by)
Funders
NSF (CCF-2131943,CCF-2141474)
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 pre-trained language models, bug fixes, patch generation, infilling, model scaling

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