mlsanityData to 14 Oct 2026

Coeditor: Leveraging Contextual Changes for Multi-round Code Auto-editing

arXiv 2305.18584 ↗First posted 29 May 2023cs.SE cs.LG cs.PLcited by 9

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

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,320
  2. 2020Longformer: The Long-Document Transformercited by 3,413
  3. 2020Big Bird: Transformers for Longer Sequencescited by 1,684
  4. 2022Competition-Level Code Generation with AlphaCodecited by 1,462
  5. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,310
  6. 2020Leveraging Passage Retrieval with Generative Models for Open Domain Question Answeringcited by 1,210
  7. 2021CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generationcited by 906
  8. 2023StarCoder: may the source be with you!cited by 799
  9. 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 498
  10. 2023RepoCoder: Repository-Level Code Completion Through Iterative Retrieval and Generationcited by 367
  11. 2021Unified Pre-training for Program Understanding and Generationcited by 366
  12. 2020Unsupervised Translation of Programming Languagescited by 263
16 more
  1. 2023SantaCoder: don't reach for the stars!cited by 170
  2. 2022CM3: A Causal Masked Multimodal Model of the Internetcited by 142
  3. 2021Towards Automating Code Review Activitiescited by 54
  4. 2022CoditT5: Pretraining for Source Code and Natural Language Editingcited by 45
  5. 2020LambdaNet: Probabilistic Type Inference using Graph Neural Networkscited by 44
  6. 2022Code Translation with Compiler Representationscited by 42
  7. 2018CODIT: Code Editing with Tree-Based Neural Modelscited by 40
  8. 2020Fast and Memory-Efficient Neural Code Completioncited by 38
  9. 2019TypeWriter: Neural Type Prediction with Search-based Validationcited by 32
  10. 2020Learning to Update Natural Language Comments Based on Code Changescited by 31
  11. 2022Learning to Model Editing Processescited by 30
  12. 2021Learning to Complete Code with Sketchescited by 23
  13. 2020Copy that! Editing Sequences by Copying Spanscited by 13
  14. 2023TypeT5: Seq2seq Type Inference using Static Analysiscited by 12
  15. 2021SOAR: A Synthesis Approach for Data Science API Refactoringcited by 8
  16. 2021Learning to Describe Solutions for Bug Reports Based on Developer Discussionscited by 5

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2023: 2; 2024: 4; 2025: 1; 2026: 2.

9 papers.