[Paper Review] Impact of Code Language Models on Automated Program Repair
The paper evaluates ten code language models (CLMs) on four APR benchmarks, showing that CLMs can outperform state-of-the-art DL-based APR methods, and that fine-tuning CLMs with APR data yields substantial improvements.
Automated program repair (APR) aims to help developers improve software reliability by generating patches for buggy programs. Although many code language models (CLM) are developed and effective in many software tasks such as code completion, there has been little comprehensive, in-depth work to evaluate CLMs' fixing capabilities and to fine-tune CLMs for the APR task. Firstly, this work is the first to evaluate ten CLMs on four APR benchmarks, which shows that surprisingly, the best CLM, as is, fixes 72% more bugs than the state-of-the-art deep-learning (DL)-based APR techniques. Secondly, one of the four APR benchmarks was created by us in this paper to avoid data leaking for a fair evaluation. Thirdly, it is the first work to fine-tune CLMs with APR training data, which shows that fine-tuning brings 31%-1,267% improvement to CLMs and enables them to fix 46%-164% more bugs than existing DL-based APR techniques. Fourthly, this work studies the impact of buggy lines, showing that CLMs, as is, cannot make good use of the buggy lines to fix bugs, yet fine-tuned CLMs could potentially over-rely on buggy lines. Lastly, this work analyzes the size, time, and memory efficiency of different CLMs. This work shows promising directions for the APR domain, such as fine-tuning CLMs with APR-specific designs, and also raises awareness of fair and comprehensive evaluations of CLMs and calls for more transparent reporting of open-source repositories used in the pre-training data to address the data leaking problem.
Motivation & Objective
- Evaluate the fixing capabilities of ten code language models on real-world and fair APR benchmarks.
- Assess whether fine-tuning CLMs with APR training data improves repair performance.
- Analyze how buggy lines influence CLM-based fixes and compare with DL-based APR techniques.
- Study size, time, and memory efficiency across CLMs of different scales.
Proposed method
- Evaluate ten CLMs (PLBART, CodeT5, CodeGen, InCoder) on four APR benchmarks (Defects4J v1.2, Defects4J v2.0, QuixBugs, HumanEval-Java).
- Create a fair, leak-free benchmark (HumanEval-Java) by converting HumanEval to Java and injecting bugs.
- Compare CLMs with four state-of-the-art DL-based APR techniques (CURE, RewardRepair, Recoder, KNOD).
- Test CLMs with two prompts, with and without buggy lines, to measure reliance on buggy context.
- Fine-tune ten CLMs on a large APR training set (143,666 instances; 129,300 train, 14,366 val) and re-evaluate.
- Analyze model size, time, and memory efficiency across CLMs during APR tasks.
Experimental results
Research questions
- RQ1RQ1: How do pre-trained CLMs perform on real-world Java bug benchmarks compared to DL-based APR techniques?
- RQ2RQ2: How does fine-tuning CLMs with APR training data affect their bug-fixing performance and data-size sensitivity?
- RQ3RQ3: How do CLMs of different sizes compare in terms of patch generation time, memory usage, and compilability?
- RQ4RQ4: What is the impact of providing buggy lines as part of the prompt on CLM performance?
- RQ5RQ5: What are the implications for fair evaluation and data leakage in CLM-based APR research.
Key findings
- CLMs, without fine-tuning, fix more bugs overall than state-of-the-art DL-based APR techniques on the four benchmarks.
- The best un-tuned CLM, InCoder-6B, fixes 105 bugs, 72% more than KNOD, the top DL-based APR method.
- Providing buggy lines in prompts generally reduces the number of correct fixes for CLMs, though some unique fixes are enabled.
- Fine-tuning CLMs with APR data yields 31%–1,267% improvements, with fine-tuned CLMs outperforming DL-based APR techniques by 46%–164% on average.
- CodeT5 and CodeGen achieve top fixing capability after 10,000 APR training instances, while InCoder benefits most from 50,000 training instances; increasing data beyond these points can reduce fixes for some models.
- Size-efficiency favors CodeT5 and InCoder, with CodeT5, PLBART, and InCoder offering better time/memory profiles than CodeGen.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.