Conference paper Open Access
Brody, Shaked; Alon, Uri; Yahav, Eran
{ "description": "<p>We address the problem of predicting edit completions based on a learned model that was trained on past edits.<br>\nGiven a code snippet that is partially edited, our goal is to predict a completion of the edit for the rest of the<br>\nsnippet. We refer to this task as the EditCompletion task and present a novel approach for tackling it. The<br>\nmain idea is to directly represent structural edits. This allows us to model the likelihood of the edit itself, rather<br>\nthan learning the likelihood of the edited code. We represent an edit operation as a path in the program’s Abstract<br>\nSyntax Tree (AST), originating from the source of the edit to the target of the edit. Using this representation, we<br>\npresent a powerful and lightweight neural model for the EditCompletion task.</p>\n\n<p><br>\nWe conduct a thorough evaluation, comparing our approach to a variety of representation and modeling<br>\napproaches that are driven by multiple strong models such as LSTMs, Transformers, and neural CRFs. Our<br>\nexperiments show that our model achieves 28% relative gain over state-of-the-art sequential models and 2×<br>\nhigher accuracy than syntactic models that learn to generate the edited code instead of modeling the edits<br>\ndirectly. We make our code, dataset, and trained models publicly available.</p>", "license": "https://creativecommons.org/licenses/by/4.0/legalcode", "creator": [ { "affiliation": "Technion", "@type": "Person", "name": "Brody, Shaked" }, { "affiliation": "Technion", "@type": "Person", "name": "Alon, Uri" }, { "affiliation": "Technion", "@type": "Person", "name": "Yahav, Eran" } ], "headline": "A Structural Model for Contextual Code Changes", "image": "https://zenodo.org/static/img/logos/zenodo-gradient-round.svg", "datePublished": "2020-09-18", "url": "https://zenodo.org/record/4036303", "@type": "ScholarlyArticle", "keywords": [ "Programming Languages", "Machine Learning" ], "@context": "https://schema.org/", "identifier": "https://doi.org/10.5281/zenodo.4036303", "@id": "https://doi.org/10.5281/zenodo.4036303", "workFeatured": { "alternateName": "OOPSLA", "@type": "Event", "name": "Object-Oriented Programming, Systems, Languages and Applications" }, "name": "A Structural Model for Contextual Code Changes" }
All versions | This version | |
---|---|---|
Views | 73 | 73 |
Downloads | 16 | 16 |
Data volume | 488.8 MB | 488.8 MB |
Unique views | 70 | 70 |
Unique downloads | 13 | 13 |