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

Nan Jiang, Thibaud Lutellier, Lin Tan
2/26/2021
cs.SEcs.AIcs.LG

Official code: lin-tan/CURE (58 stars, Python, last commit 2022-12-08).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

lin-tan/CUREOfficial100%

For our ICSE21 paper "CURE: Code-Aware Neural Machine Translation for Automatic Program Repair" by Nan Jiang, Thibaud Lutellier, and Lin Tan

5815Python, JavaAug 27, 20203 years agoNOASSERTION
deep-learninglanguage-modelneural-networkprogram-repairsoftware-reliability

Similar Papers

Cite this paper

@article{jiang2021cure,
  title  = {CURE: Code-Aware Neural Machine Translation for Automatic Program Repair},
  author = {Nan Jiang and Thibaud Lutellier and Lin Tan},
  year   = {2021},
  eprint = {2103.00073},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2103.00073}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2103.00073.svg)](https://codeofpaper.com/paper/2103.00073)

Discussion