SOTAVerified

An Empirical Investigation into Learning Bug-Fixing Patches in the Wild via Neural Machine Translation

2018-09-07Accepted to the ACM Transactions on Software Engineering and Methodology 2018Unverified0· sign in to hype

Michele Tufano College of William and Mary Williamsburg, USA Cody Watson College of William and Mary Williamsburg, USA Gabriele Bavota Università della Svizzera italiana (USI) Lugano, Switzerland Massimiliano Di Penta University of Sannio Benevento, Italy Martin White College of William and Mary Williamsburg, VA, USA Denys Poshyvanyk College of William and Mary

Unverified — Be the first to reproduce this paper.

Reproduce

Abstract

Millions of open-source projects with numerous bug fixes are available in code repositories. This proliferation of software development histories can be leveraged to learn how to fix common programming bugs. To explore such a potential, we perform an empirical study to assess the feasibility of using Neural Machine Translation techniques for learning bug-fixing patches for real defects.We mine millions of bug-fixes from the change histories of GitHub repositories to extract meaningful examples of such bug-fixes. Then, we abstract the buggy and corresponding fixed code, and use them to train an Encoder-Decoder model able to translate buggy code into its fixed version. Our model is able to fix hundreds of unique buggy methods in the wild. Overall, this model is capable of predicting fixed patches generated by developers in 9% of the cases.

Tasks

Reproductions