Coeditor: Leveraging Contextual Changes for Multi-round Code Auto-editing
Not on the map. Why?
Abstract (arXiv)
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 and SOTA open-source code completion models (bringing exact-match accuracy from 34.7 up to 60.4), demonstrating the benefits of incorporating editing history for code completion. In a multi-round, multi-edit setting, we observe substantial gains by iteratively conditioning on additional user edits. We have open-sourced our code, data, and model weights to encourage future research and have released a VSCode extension powered by our model for interactive IDE usage.
Key facts. Cited by 9 papers in the map (data through 14 Oct 2026). Builds on 28 of its 35 references that are in the map. First posted on arXiv 29 May 2023.
Builds on
28 of 35 references.
References · 28
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2020Longformer: The Long-Document Transformercited by 3,413
- 2020Big Bird: Transformers for Longer Sequencescited by 1,684
- 2022Competition-Level Code Generation with AlphaCodecited by 1,462
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
- 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,210
- 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
- 2023StarCoder: may the source be with you!cited by 799
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
- 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
- 2021Unified Pre-training for Program Understanding and Generationcited by 366
- 2020Unsupervised Translation of Programming Languagescited by 263
16 more
- 2023SantaCoder: don't reach for the stars!cited by 170
- 2022CM3: A Causal Masked Multimodal Model of the Internetcited by 142
- 2021Towards Automating Code Review Activitiescited by 54
- 2022CoditT5: Pretraining for Source Code and Natural Language Editingcited by 45
- 2020LambdaNet: Probabilistic Type Inference using Graph Neural Networkscited by 44
- 2022Code Translation with Compiler Representationscited by 42
- 2018CODIT: Code Editing with Tree-Based Neural Modelscited by 40
- 2020Fast and Memory-Efficient Neural Code Completioncited by 38
- 2019TypeWriter: Neural Type Prediction with Search-based Validationcited by 32
- 2020Learning to Update Natural Language Comments Based on Code Changescited by 31
- 2022Learning to Model Editing Processescited by 30
- 2021Learning to Complete Code with Sketchescited by 23
- 2020Copy that! Editing Sequences by Copying Spanscited by 13
- 2023TypeT5: Seq2seq Type Inference using Static Analysiscited by 12
- 2021SOAR: A Synthesis Approach for Data Science API Refactoringcited by 8
- 2021Learning to Describe Solutions for Bug Reports Based on Developer Discussionscited by 5
Built on by
Citing papers per year: 2023: 2; 2024: 4; 2025: 1; 2026: 2.
9 papers.
- 2023OctoPack: Instruction Tuning Code Large Language Modelscited by 189
- 2024Agents in Software Engineering: Survey, Landscape, and Visioncited by 60
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projectscited by 47
- 2023InstructCoder: Instruction Tuning Large Language Models for Code Editingcited by 29
- 2024Source Code Foundation Models are Transferable Binary Analysis Knowledge Basescited by 8
- 2024CursorCore: Assist Programming through Aligning Anythingcited by 7
- 2026Learning to Commit: Generating Organic Pull Requests via Online Repository Memorycited by 3
- 2025Treefix: Enabling Execution with a Tree of Prefixescited by 2
- 2026Pull Requests as a Training Signal for Repo-Level Code Editingcited by 1
- 2026Learning to Commit: Generating Organic Pull Requests via Online Repository Memory27 Mar 2026
- 2026Pull Requests as a Training Signal for Repo-Level Code Editing7 Feb 2026
- 2025Treefix: Enabling Execution with a Tree of Prefixes21 Jan 2025
- 2024You Name It, I Run It: An LLM Agent to Execute Tests of Arbitrary Projects13 Dec 2024
- 2024CursorCore: Assist Programming through Aligning Anything9 Oct 2024
- 2024Agents in Software Engineering: Survey, Landscape, and Vision13 Sep 2024
- 2024Source Code Foundation Models are Transferable Binary Analysis Knowledge Bases30 May 2024
- 2023InstructCoder: Instruction Tuning Large Language Models for Code Editing31 Oct 2023
- 2023OctoPack: Instruction Tuning Code Large Language Models14 Aug 2023