DeepAI AI Chat
Log In Sign Up

An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation

12/20/2018
by   Michele Tufano, et al.
Unisannio
USI Università della Svizzera italiana
William & Mary
0

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. First, we mine millions of bug-fixes from the change histories of projects hosted on GitHub, in order to extract meaningful examples of such bug-fixes. Next, 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. In our empirical investigation we found that such a model is able to fix thousands of unique buggy methods in the wild. Overall, this model is capable of predicting fixed patches generated by developers in 9-50 cases, depending on the number of candidate patches we allow it to generate. Also, the model is able to emulate a variety of different Abstract Syntax Tree operations and generate candidate patches in a split second.

READ FULL TEXT

page 3

page 7

page 12

page 16

page 19

page 20

12/18/2018

Learning to Generate Corrective Patches using Neural Machine Translation

Bug fixing is generally a manually-intensive task. However, recent work ...
09/30/2018

Tree2Tree Neural Translation Model for Learning Source Code Changes

The way developers edit day-to-day code tend to be repetitive and often ...
10/13/2022

Bug Analysis in Jupyter Notebook Projects: An Empirical Study

Computational notebooks, such as Jupyter, have been widely adopted by da...
01/28/2022

TSSB-3M: Mining single statement bugs at massive scale

Single statement bugs are one of the most important ingredients in the e...
03/22/2021

Multi-Programming-Language Commits in OSS: An Empirical Study on Apache Projects

Modern software systems, such as Spark, are usually written in multiple ...
01/25/2019

On Learning Meaningful Code Changes via Neural Machine Translation

Recent years have seen the rise of Deep Learning (DL) techniques applied...
08/05/2022

Bug-Fix Variants: Visualizing Unique Source Code Changes across GitHub Forks

Forking is a common practice for developers when building upon on alread...