TL;DR
This paper introduces a novel structural model for predicting code edits by representing them as paths in the AST, achieving significant improvements over existing sequential and syntactic models.
Contribution
The paper presents a new approach that models structural code edits directly as AST paths, outperforming prior sequential and syntactic models in edit prediction accuracy.
Findings
28% relative gain over state-of-the-art models
2x higher accuracy than syntactic code generation models
Effective modeling of structural edits in code
Abstract
We address the problem of predicting edit completions based on a learned model that was trained on past edits. Given a code snippet that is partially edited, our goal is to predict a completion of the edit for the rest of the snippet. We refer to this task as the EditCompletion task and present a novel approach for tackling it. The main idea is to directly represent structural edits. This allows us to model the likelihood of the edit itself, rather than learning the likelihood of the edited code. We represent an edit operation as a path in the program's Abstract Syntax Tree (AST), originating from the source of the edit to the target of the edit. Using this representation, we present a powerful and lightweight neural model for the EditCompletion task. We conduct a thorough evaluation, comparing our approach to a variety of representation and modeling approaches that are driven by…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
