CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- URL: http://arxiv.org/abs/2103.00073v1
- Date: Fri, 26 Feb 2021 22:30:28 GMT
- Title: CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
- Authors: Nan Jiang, Thibaud Lutellier, Lin Tan
- Abstract summary: We propose CURE, a new NMT-based APR technique with three major novelties.
CURE pre-trains a programming language (PL) model on a large software to learn developer-like source code before the APR task.
Second, CURE designs a new code-aware search strategy that finds more correct fixes by focusing on compilable patches and patches that are close in length to the buggy code.
- Score: 11.556110575946631
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Automatic program repair (APR) is crucial to improve software reliability.
Recently, neural machine translation (NMT) techniques have been used to fix
software bugs automatically. While promising, these approaches have two major
limitations. Their search space often does not contain the correct fix, and
their search strategy ignores software knowledge such as strict code syntax.
Due to these limitations, existing NMT-based techniques underperform the best
template-based approaches.
We propose CURE, a new NMT-based APR technique with three major novelties.
First, CURE pre-trains a programming language (PL) model on a large software
codebase to learn developer-like source code before the APR task. Second, CURE
designs a new code-aware search strategy that finds more correct fixes by
focusing on compilable patches and patches that are close in length to the
buggy code. Finally, CURE uses a subword tokenization technique to generate a
smaller search space that contains more correct fixes.
Our evaluation on two widely-used benchmarks shows that CURE correctly fixes
57 Defects4J bugs and 26 QuixBugs bugs, outperforming all existing APR
techniques on both benchmarks.
Related papers
- Investigating the Transferability of Code Repair for Low-Resource Programming Languages [57.62712191540067]
Large language models (LLMs) have shown remarkable performance on code generation tasks.
Recent works augment the code repair process by integrating modern techniques such as chain-of-thought reasoning or distillation.
We investigate the benefits of distilling code repair for both high and low resource languages.
arXiv Detail & Related papers (2024-06-21T05:05:39Z) - A Novel Approach for Automatic Program Repair using Round-Trip
Translation with Large Language Models [50.86686630756207]
Research shows that grammatical mistakes in a sentence can be corrected by translating it to another language and back.
Current generative models for Automatic Program Repair (APR) are pre-trained on source code and fine-tuned for repair.
This paper proposes bypassing the fine-tuning step and using Round-Trip Translation (RTT): translation of code from one programming language to another programming or natural language, and back.
arXiv Detail & Related papers (2024-01-15T22:36:31Z) - T5APR: Empowering Automated Program Repair across Languages through Checkpoint Ensemble [2.7036595757881323]
We propose T5APR, a novel neural program repair approach that provides a unified solution for bug fixing across multiple programming languages.
T5APR correctly fixes 1,985 bugs, including 1,442 bugs that none of the compared techniques has fixed.
arXiv Detail & Related papers (2023-09-27T15:54:08Z) - Guess & Sketch: Language Model Guided Transpilation [59.02147255276078]
Learned transpilation offers an alternative to manual re-writing and engineering efforts.
Probabilistic neural language models (LMs) produce plausible outputs for every input, but do so at the cost of guaranteed correctness.
Guess & Sketch extracts alignment and confidence information from features of the LM then passes it to a symbolic solver to resolve semantic equivalence.
arXiv Detail & Related papers (2023-09-25T15:42:18Z) - RAP-Gen: Retrieval-Augmented Patch Generation with CodeT5 for Automatic
Program Repair [75.40584530380589]
We propose a novel Retrieval-Augmented Patch Generation framework (RAP-Gen)
RAP-Gen explicitly leveraging relevant fix patterns retrieved from a list of previous bug-fix pairs.
We evaluate RAP-Gen on three benchmarks in two programming languages, including the TFix benchmark in JavaScript, and Code Refinement and Defects4J benchmarks in Java.
arXiv Detail & Related papers (2023-09-12T08:52:56Z) - KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program
Repair [33.04645845117822]
Automated Program Repair (APR) improves software reliability by generating patches for a buggy program automatically.
Recent APR techniques leverage deep learning (DL) to build models to learn to generate patches from existing patches and code corpora.
We propose a DL-based APR approach, which incorporates domain knowledge to guide patch generation in a direct and comprehensive way.
arXiv Detail & Related papers (2023-02-03T17:02:56Z) - BigIssue: A Realistic Bug Localization Benchmark [89.8240118116093]
BigIssue is a benchmark for realistic bug localization.
We provide a general benchmark with a diversity of real and synthetic Java bugs.
We hope to advance the state of the art in bug localization, in turn improving APR performance and increasing its applicability to the modern development cycle.
arXiv Detail & Related papers (2022-07-21T20:17:53Z) - Quality-Aware Decoding for Neural Machine Translation [64.24934199944875]
We propose quality-aware decoding for neural machine translation (NMT)
We leverage recent breakthroughs in reference-free and reference-based MT evaluation through various inference methods.
We find that quality-aware decoding consistently outperforms MAP-based decoding according both to state-of-the-art automatic metrics and to human assessments.
arXiv Detail & Related papers (2022-05-02T15:26:28Z) - ENCORE: Ensemble Learning using Convolution Neural Machine Translation for Automatic Program Repair [7.026028136636735]
We propose ENCORE, a new generate-and-validate (G&V) program repair technique.
It uses ensemble learning on convolutional neural machine translation (NMT) models to automatically fix bugs in multiple programming languages.
ENCORE is the first G&V repair technique to be applied to four popular programming languages.
arXiv Detail & Related papers (2019-06-20T15:25:16Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.