Coeditor: Leveraging Contextual Changes for Multi-round Code Auto-editing
Jiayi Wei, Greg Durrett, Isil Dillig

TL;DR
This paper introduces Coeditor, a specialized language model for multi-round code auto-editing that leverages recent changes and static analysis, significantly improving accuracy over existing models in code editing tasks.
Contribution
The paper presents Coeditor, a novel fine-tuned language model designed for multi-round code editing, utilizing static analysis and change history to enhance editing accuracy and efficiency.
Findings
Coeditor outperforms GPT-3.5 and SOTA models in exact-match accuracy (60.4% vs. 34.7%).
In multi-round editing, iterative conditioning on user edits yields substantial improvements.
The dataset from 1650 open-source Python projects supports effective training and evaluation.
Abstract
Developers often dedicate significant time to maintaining and refactoring existing code. However, most prior work on generative models for code focuses solely on creating new code, overlooking the distinctive needs of editing existing code. In this work, we explore a multi-round code auto-editing setting, aiming to predict edits to a code region based on recent changes within the same codebase. Our model, Coeditor, is a fine-tuned language model specifically designed for code editing tasks. We represent code changes using a line diff format and employ static analysis to form large customized model contexts, ensuring the availability of appropriate information for prediction. We collect a code editing dataset from the commit histories of 1650 open-source Python projects for training and evaluation. In a simplified single-round, single-edit task, Coeditor significantly outperforms GPT-3.5…
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.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Scientific Computing and Data Management · Open Source Software Innovations
Methods15 Ways to Contact How can i speak to someone at Delta Airlines · Adam · Cosine Annealing · Weight Decay · {Dispute@FaQ-s}How to file a dispute with Expedia? · Linear Warmup With Cosine Annealing · GPT-3 · Refunds@Expedia|||How do I get a full refund from Expedia? · Multi-Head Attention · Attention Is All You Need
