CoCoNuT: combining context-aware neural translation models using ensemble for program repair
By Thibaud Lutellier, Hung Viet Pham, Lawrence Pang, Yitong Li, Moshi Wei, Lin Tan. 2020
436 citations recorded by the source corpus.
Automated generate-and-validate (GV) program repair techniques (APR) typically rely on hard-coded rules, thus only fixing bugs following specific fix patterns. These rules require a significant amount of manual effort to discover and it is hard to adapt these rules to different programming languages. To address these challenges, we propose a new G&V technique—CoCoNuT, which uses ensemble learning on the combination of convolutional neural networks (CNNs) and a new context-aware neural machine translation (NMT) architecture to automatically fix bugs in multiple programming languages. To better represent the context of a bug, we introduce a new context-aware NMT architecture that represents the buggy source code and its surrounding context separately. CoCoNuT uses CNNs instead of recurrent neural networks (RNNs), since CNN layers can be stacked to extract hierarchical features and better model source code at different granularity levels (e.g., statements and functions). In addition, CoCoNuT takes advantage of the randomness in hyperparameter tuning to build multiple models that fix different bugs and combines these models using ensemble learning to fix more bugs. Our evaluation on six popular benchmarks for four programming languages (Java, C, Python, and JavaScript) shows that CoCoNuT correctly fixes (i.e., the first generated patch is semantically equivalent to the developer’s patch) 509 bugs, including 309 bugs that are fixed by none of the 27 techniques with which we compare.
Subfields: Information Systems, Software, Code Generation & Program Synthesis, Program Analysis & Verification
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Information Systems
- Chun Xia
- Lingming Zhang
- Vincent J. Hellendoorn
- Baishakhi Ray
- Prem Devanbu
- Neel Sundaresan
- Alexey Svyatkovskiy
- Yangruibo Ding
In Software
- Chun Xia
- Lingming Zhang
- Prem Devanbu
- Vincent J. Hellendoorn
- Neel Sundaresan
- Alexey Svyatkovskiy
- Baishakhi Ray
- Yangruibo Ding
In Code Generation & Program Synthesis
- Prem Devanbu
- Chun Xia
- Lingming Zhang
- Yangruibo Ding
- Baishakhi Ray
- Vincent J. Hellendoorn
- Wasi Uddin Ahmad
- Saikat Chakraborty
In Program Analysis & Verification
- Vincent J. Hellendoorn
- Chun Xia
- Lingming Zhang
- Prem Devanbu
- Lu Zhang
- Neel Sundaresan
- Yangruibo Ding
- Baishakhi Ray
Citations in the corpus
- Unified Pre-training for Program Understanding and Generation (2021, background): “, 2020), Program Repair (Chen et al., 2019; Chakraborty et al., 2020; Lutellier et al., 2020), Code Translation (Chen et al.”
- AutoCodeRover: Autonomous Program Improvement (2024, neutral): “Learning-based APR techniques [20, 30, 39] often train a deep learning model with large code repositories and are guided by a specific representation of code syntax and semantics to predict the next tokens that are most likely to be correct patch.”
- Automated Program Repair in the Era of Large Pre-trained Language Models (2022, neutral): “This is the preferred comparison setting as it eliminates the impact of differences in fault localization have on the result [21], [22], [24], [71].”
- InferFix: End-to-End Program Repair with LLMs (2023, methodology): “Lutellier et al. [24] employed ensemble learning with CNNs and NMT to generate patches with CoCoNuT.”
- A syntax-guided edit decoder for neural program repair (2021, methodology): “To check the correctness of the patches, we manually examined every patch if it is the same with or semantically equivalent to the patch provided by Defects4J, as in previous works [15, 24, 36, 40, 44].”
- RepairAgent: An Autonomous, LLM-Based Agent for Program Repair (2024, neutral): “…the challenge of automatically fixing bugs [1], including techniques based on manually designed [2], [3] and (semi-)automatically extracted [4], [5], [6] fix patterns, based on symbolic constraints [7], [8], [9], and various machine learning-based approaches [10], [11], [12], [13], [14], [15], [16].”
- An Analysis of the Automatic Bug Fixing Performance of ChatGPT (2023, methodology): “Overall, we find bug fixes for 19 benchmark problems with ChatGPT, 21 are reported for Codex, 19 for CoCoNut, and only 7 for the standard approaches.”
- Patching as Translation: the Data and the Metaphor (2020, background): “CoCoNuT [22] ensembles multiple NMT models to capture diverse fix patterns.”
- Less training, more repairing please: revisiting automated program repair via zero-shot learning (2022, methodology): “Current learning-based APR tools first pass the context including the buggy code elements into an encoder as plain texts [32, 51] or structured representations [42, 80].”