Skip to main content
Cornell University
Learn about arXiv becoming an independent nonprofit.
We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate
arxiv logo > cs > arXiv:1812.08693

Help | Advanced Search

arXiv logo
Cornell University Logo

quick links

  • Login
  • Help Pages
  • About

Computer Science > Software Engineering

arXiv:1812.08693 (cs)
[Submitted on 20 Dec 2018 (v1), last revised 21 May 2019 (this version, v2)]

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

Authors:Michele Tufano, Cody Watson, Gabriele Bavota, Massimiliano Di Penta, Martin White, Denys Poshyvanyk
View a PDF of the paper titled An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation, by Michele Tufano and 5 other authors
View PDF
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. 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% of the 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.
Comments: Accepted to the ACM Transactions on Software Engineering and Methodology
Subjects: Software Engineering (cs.SE)
Cite as: arXiv:1812.08693 [cs.SE]
  (or arXiv:1812.08693v2 [cs.SE] for this version)
  https://doi.org/10.48550/arXiv.1812.08693
arXiv-issued DOI via DataCite

Submission history

From: Michele Tufano [view email]
[v1] Thu, 20 Dec 2018 16:52:30 UTC (1,267 KB)
[v2] Tue, 21 May 2019 00:44:58 UTC (1,264 KB)
Full-text links:

Access Paper:

    View a PDF of the paper titled An Empirical Study on Learning Bug-Fixing Patches in the Wild via Neural Machine Translation, by Michele Tufano and 5 other authors
  • View PDF
  • TeX Source
view license
Current browse context:
cs.SE
< prev   |   next >
new | recent | 2018-12
Change to browse by:
cs

References & Citations

  • NASA ADS
  • Google Scholar
  • Semantic Scholar

DBLP - CS Bibliography

listing | bibtex
Michele Tufano
Cody Watson
Gabriele Bavota
Massimiliano Di Penta
Martin White
…
export BibTeX citation Loading...

BibTeX formatted citation

×
Data provided by:

Bookmark

BibSonomy logo Reddit logo

Bibliographic and Citation Tools

Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)

Code, Data and Media Associated with this Article

alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)

Demos

Replicate (What is Replicate?)
Hugging Face Spaces (What is Spaces?)
TXYZ.AI (What is TXYZ.AI?)

Recommenders and Search Tools

Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
  • Author
  • Venue
  • Institution
  • Topic

arXivLabs: experimental projects with community collaborators

arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.

Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.

Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.

Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?)
  • About
  • Help
  • contact arXivClick here to contact arXiv Contact
  • subscribe to arXiv mailingsClick here to subscribe Subscribe
  • Copyright
  • Privacy Policy
  • Web Accessibility Assistance
  • arXiv Operational Status