CURE: Code-Aware Neural Machine Translation for Automatic Program Repair
arXiv:2103.00073 · doi:10.1109/ICSE43902.2021.00107
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.
arXiv commentThis paper is accepted by 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE)
References in corpus (12)
- Nopol: Automatic Repair of Conditional Statement Bugs in Java Programs
- SequenceR: Sequence-to-Sequence Learning for End-to-End Program Repair
- TBar: Revisiting Template-based Automated Program Repair
- Elixir: Effective object-oriented program repair
- FixMiner: Mining Relevant Fix Patterns for Automated Program Repair
- CC2Vec: Distributed Representations of Code Changes
- On the Efficiency of Test Suite based Program Repair: A Systematic Assessment of 16 Automated Repair Systems for Java Programs
- CODIT: Code Editing with Tree-Based Neural Models
- Bears: An Extensible Java Bug Benchmark for Automatic Program Repair Studies
- Ultra-Large Repair Search Space with Automatically Mined Templates: the Cardumen Mode of Astor
- Synthesize, Execute and Debug: Learning to Repair for Neural Program Synthesis
- Multi-task Learning based Pre-trained Language Model for Code Completion
Cited by in corpus (25)
- Practical Program Repair in the Era of Large Pre-trained Language Models
- Neural Program Repair with Execution-based Backpropagation
- Natural Language Generation and Understanding of Big Code for AI-Assisted Programming: A Review
- Copiloting the Copilots: Fusing Large Language Models with Completion Engines for Automated Program Repair
- How Effective Are Neural Networks for Fixing Security Vulnerabilities
- SelfAPR: Self-supervised Program Repair with Test Execution Diagnostics
- ITER: Iterative Neural Repair for Multi-Location Patches
- Revisiting the Plastic Surgery Hypothesis via Large Language Models
- Neural Program Repair: Systems, Challenges and Solutions
- RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program Repair
- Automated Test Case Repair Using Language Models
- Is this Change the Answer to that Problem? Correlating Descriptions of Bug and Code Changes for Evaluating Patch Correctness
- DrPlanner: Diagnosis and Repair of Motion Planners for Automated Vehicles Using Large Language Models
- MORepair: Teaching LLMs to Repair Code via Multi-Objective Fine-tuning
- Learning the Relation between Code Features and Code Transforms with Structured Prediction
- Practical Program Repair via Preference-based Ensemble Strategy
- CoEdPilot: Recommending Code Edits with Learned Prior Edit Relevance, Project-wise Awareness, and Interactive Nature
- STEAM: Simulating the InTeractive BEhavior of ProgrAMmers for Automatic Bug Fixing
- Learning Project-wise Subsequent Code Edits via Interleaving Neural-based Induction and Tool-based Deduction
- SPVR: syntax-to-prompt vulnerability repair based on large language models
- Seeing is Fixing: Cross-Modal Reasoning with Multimodal LLMs for Visual Software Issue Fixing
- No One-Size-Fits-All: Adaptive Code Editing with Feature-Based Strategy Selection
- MultiMend: Multilingual Program Repair with Context Augmentation and Multi-Hunk Patch Generation
- Show Me Why It's Correct: Saving 1/3 of Debugging Time in Program Repair with Interactive Runtime Comparison
- Assessing the Latent Automated Program Repair Capabilities of Large Language Models using Round-Trip Translation