On Learning Meaningful Code Changes via Neural Machine TranslationTechnical Track
Recent years have seen the rise of Deep Learning (DL) techniques applied to source code. Researchers have exploited DL to automate several development and maintenance tasks, such as writing commit messages, generating comments and detecting vulnerabilities among others. One of the long lasting dreams of applying DL to code is the possibility to automate non-trivial coding activities. While some steps in this direction have been taken (e.g., learning how to fix bugs), there is still a lack of empirical evidence on the types of code changes that can be learned and automatically applied by DL. Our goal is to make this first step by quantitatively and qualitatively investigating the ability of a Neural Machine Translation (NMT) model to learn how to automatically apply code changes implemented by developers during pull requests. We train and experiment with the NMT model on a set of 236k pairs of code components before and after the implementation of the changes provided in the pull requests. We show that, when applied in a narrow enough context (i.e., small/medium-sized pairs of methods before/after the pull request changes), NMT can automatically replicate the changes implemented by developers during pull requests in up to 36% of the cases. Moreover, our qualitative analysis shows that the model is capable of learning and replicating a wide variety of meaningful code changes, especially refactorings and bug-fixing activities. Our results pave the way to novel research in the area of DL on code, such as the automatic learning and applications of refactoring.
Wed 29 May Times are displayed in time zone: Eastern Time (US & Canada) change
11:00 - 12:30: Automated Program Repair 1Papers / Journal-First Papers / Technical Track at Laurier Chair(s): Lars GrunskeHumboldt-Universität zu Berlin | |||
11:00 - 11:20 Talk | Learning to Spot and Refactor Inconsistent Method NamesTechnical Track Technical Track Kui LiuUniversity of Luxembourg, Dongsun KimFuriosa.ai, Tegawendé F. BissyandéSnT, University of Luxembourg, Taeyoung KimChonbuk National University, Kisub KimUniversity of Luxembourg, SnT, Anil KoyuncuUniversity of Luxembourg, Luxembourg, Suntae Kim, Yves Le TraonUniversity of Luxembourg Pre-print | ||
11:20 - 11:40 Talk | Harnessing Evolution for Multi-Hunk Program RepairTechnical Track Technical Track Seemanta SahaUniversity of California Santa Barbara, Ripon SahaFujitsu Laboratories of America, Inc., Mukul PrasadFujitsu Laboratories of America | ||
11:40 - 12:00 Talk | On Learning Meaningful Code Changes via Neural Machine TranslationTechnical Track Technical Track Michele TufanoCollege of William and Mary, Jevgenija PantiuchinaUniversità della Svizzera italiana, Cody Watson , Gabriele BavotaUniversità della Svizzera italiana (USI), Denys PoshyvanykWilliam and Mary Pre-print | ||
12:00 - 12:10 Talk | Mining Fix Patterns for FindBugs ViolationsJournal-First Journal-First Papers Kui LiuUniversity of Luxembourg, Dongsun KimFuriosa.ai, Tegawendé F. BissyandéSnT, University of Luxembourg, Shin YooKorea Advanced Institute of Science and Technology, Yves Le TraonUniversity of Luxembourg Pre-print | ||
12:10 - 12:20 Talk | Test-equivalence Analysis for Automatic Patch GenerationJournal-First Journal-First Papers Sergey MechtaevUniversity College London, Xiang GaoNational University of Singapore, Shin Hwei TanSouthern University of Science and Technology, Abhik RoychoudhuryNational University of Singapore | ||
12:20 - 12:30 Talk | Discussion Period Papers |