CURE: Code-Aware Neural Machine Translation for Automatic Program Repair

02/26/2021
by   Nan Jiang, et al.
0

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.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/20/2019

ENCORE: Ensemble Learning using Convolution Neural Machine Translation for Automatic Program Repair

Automated generate-and-validate (G&V) program repair techniques typicall...
research
04/14/2022

GLAD: Neural Predicate Synthesis to Repair Omission Faults

Existing template and learning-based APR tools have successfully found p...
research
05/10/2021

Neural Program Repair with Execution-based Backpropagation

Neural machine translation (NMT) architectures have achieved promising r...
research
02/03/2023

KNOD: Domain Knowledge Distilled Tree Decoder for Automated Program Repair

Automated Program Repair (APR) improves software reliability by generati...
research
04/08/2021

Perfection Not Required? Human-AI Partnerships in Code Translation

Generative models have become adept at producing artifacts such as image...
research
08/15/2021

On Multi-Modal Learning of Editing Source Code

In recent years, Neural Machine Translator (NMT) has shown promise in au...
research
02/22/2022

Neural Program Repair: Systems, Challenges and Solutions

Automated Program Repair (APR) aims to automatically fix bugs in the sou...

Please sign up or login with your details

Forgot password? Click here to reset