Learning to Generate Corrective Patches using Neural Machine Translation
Not on the map. Why?
Abstract (arXiv)
Bug fixing is generally a manually-intensive task. However, recent work has proposed the idea of automated program repair, which aims to repair (at least a subset of) bugs in different ways such as code mutation, etc. Following in the same line of work as automated bug repair, in this paper we aim to leverage past fixes to propose fixes of current/future bugs. Specifically, we propose Ratchet, a corrective patch generation system using neural machine translation. By learning corresponding pre-correction and post-correction code in past fixes with a neural sequence-to-sequence model, Ratchet is able to generate a fix code for a given bug-prone code query. We perform an empirical study with five open source projects, namely Ambari, Camel, Hadoop, Jetty and Wicket, to evaluate the effectiveness of Ratchet. Our findings show that Ratchet can generate syntactically valid statements 98.7% of the time, and achieve an F1-measure between 0.29 - 0.83 with respect to the actual fixes adopted in the code base. In addition, we perform a qualitative validation using 20 participants to see whether the generated statements can be helpful in correcting bugs. Our survey showed that Ratchet's output was considered to be helpful in fixing the bugs on many occasions, even if fix was not 100% correct.
Key facts. Cited by 10 papers in the map (data through 14 Oct 2026). First posted on arXiv 18 Dec 2018.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2021: 2; 2022: 4; 2023: 3; 2024: 1.
10 papers.
- 2021A Syntax-Guided Edit Decoder for Neural Program Repaircited by 57
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkitcited by 22
- 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generationcited by 16
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generationcited by 5
- 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspectivecited by 3
- 2023Program Repair with Minimal Edits Using CodeT5cited by 2
- 2022Leveraging Causal Inference for Explainable Automatic Program Repaircited by 1
- 2024The Rise and Fall(?) of Software Engineeringcited by 1
- 2022Code Sophistication: From Code Recommendation to Logic Recommendationcited by 0
- 2022Can We Generate Shellcodes via Natural Language? An Empirical Studycited by 0
- 2024The Rise and Fall(?) of Software Engineering14 Jun 2024
- 2023Deep Learning for Code Intelligence: Survey, Benchmark and Toolkit30 Dec 2023
- 2023Program Repair with Minimal Edits Using CodeT526 Sep 2023
- 2023Revisiting and Improving Retrieval-Augmented Deep Assertion Generation19 Sep 2023
- 2022Leveraging Causal Inference for Explainable Automatic Program Repair26 May 2022
- 2022A Survey on Artificial Intelligence for Source Code: A Dialogue Systems Perspective10 Feb 2022
- 2022Can We Generate Shellcodes via Natural Language? An Empirical Study8 Feb 2022
- 2022Code Sophistication: From Code Recommendation to Logic Recommendation19 Jan 2022
- 2021A Syntax-Guided Edit Decoder for Neural Program Repair15 Jun 2021
- 2021Shellcode_IA32: A Dataset for Automatic Shellcode Generation27 Apr 2021