Learning from 53.6K Real-World Developer Edits of AI-Generated Code

Jenny T. Liang, Mihika Bairathi, Wayne Chi, Ameet Talwalkar, Nishant Subramani, Valerie ChenarXiv 2026

TL;DR

The paper introduces DECODE (Developer Edits of Code Dataset), the first large-scale, public dataset capturing 53.6K real-world, in-IDE code edits made by over 1,000 developers on AI-generated code. The authors show that fine-tuning small, open-source 3B models on DECODE allows them to predict and generate developer code modifications significantly better than frontier LLMs, all without degrading their base code generation capabilities.

What Problem Does This Paper Address?

While AI programming assistants are widely adopted, the code they generate is rarely perfect. Developers frequently have to manually tweak, rewrite, or completely throw away AI completions to match their specific intent, coding style, or functional requirements.

To build AI tools that can better assist or predict these human adjustments, machine learning models need to understand how developers edit code. Currently, LLMs are trained on publicly available Git data (like commits and pull requests). However, Git data only captures the final, polished state of a codebase. It completely misses the granular, messy, intermediate steps and temporal ordering of how a developer iteratively arrives at a solution inside their Integrated Development Environment (IDE).

Methods

To capture this elusive in-IDE behavior, the authors built a data extraction pipeline around a VS Code extension used by thousands of developers.

  1. Snapshot Collection: The extension saved the state of the active code file every time a developer paused activity for at least one second, capturing fine-grained intermediate states.
  2. Edit Extraction: The pipeline identified accepted AI completions ($y_0$) and tracked subsequent changes using git diff --histogram to isolate the exact lines edited by the developer over time, forming an edit trajectory.
  3. Cleaning & Validation: To ensure data quality, pairs were filtered using a CodeBERTScore threshold of 0.68 to verify that the edits were genuinely relevant to the original AI completion.
  4. Training: The authors framed two tasks: Classification (predicting whether an AI completion will be deleted, modified, or left unmodified) and Generation (predicting the final edited code state). They fine-tuned open-source models (Qwen2.5-Coder-3B/7B and Llama3.2-3B) using LoRA.
Figure 2: Example code edit extraction from DECODE. The data extraction pipeline begins with identifying an original AI completion (gray code snippet). It tracks what changes made to the AI completion, including additions (green) and removals (red), even when the developer changes the surrounding code.

Datasets

The paper introduces DECODE, containing 53.6K before-after code pairs across 5,831 trajectories from 1,141 unique developers.

  • Languages: Python (40,390 pairs), JavaScript (7,993 pairs), and TypeScript (5,231 pairs).
  • Contexts: Spans diverse domains including data analysis, web development, machine learning, and user interfaces.
  • Uniqueness: Unlike existing datasets (such as EditEval or CanItEdit) which rely on synthetic data, laboratory settings, or natural language instructed edits, DECODE consists entirely of real-world, manual, "in-the-wild" developer edits.

Key Insights and Ideas

  • The 15-Minute Abandonment Window: Code edits drop off steeply after the first 15 minutes. If an AI completion doesn't subtly align with a developer's intent, it is quickly abandoned; 31% of edit trajectories resulted in the complete removal of the AI completion.
  • The Editing Lifecycle: Developers follow a distinct sequential process when interacting with AI code. They first decide whether to keep or remove the code (median ~23 mins). If they keep it, they fix quality/syntax errors next (~28 mins), customize it to their style (~49 mins), and finally extend its functionality (~59 mins).
  • Heavy, Yet Bimodal Reliance: The distribution of remaining AI code is highly bimodal—developers either leave the AI completion almost entirely intact or delete it completely. However, when they do keep it, they rarely add large amounts of new code on top of it (a median of 63% of the original AI completion remains).

Key Results

  • Frontier Models Struggle Out-of-the-Box: Massive frontier models struggle to reason about real-world developer edits in zero- or few-shot settings. For the classification task, the best baseline (Claude Sonnet 4.6) achieved an F1 score of just 0.37, barely outperforming a random classifier (0.33).
  • Small Fine-Tuned Models Win: Fine-tuning open-source 3B and 7B models on DECODE led to massive performance leaps. The fine-tuned Qwen2.5-Coder-3B model achieved an F1 score of 0.42 on classification and a Levenshtein similarity of 0.41 on generation, significantly outperforming frontier models like GPT-5.2 and Claude Sonnet 4.6.
  • More Context Helps: As models were exposed to more intermediate edit snapshots ($k \in [0,4]$) during training and inference, their ability to predict the final code state improved steadily, reaching an average Levenshtein similarity of 0.52.
  • No Capabilities Degradation: Crucially, fine-tuning on the iterative edit data did not degrade the models' standard code generation capabilities, showing stable or slightly improved pass@1 scores on HumanEval and MBPP benchmarks.

Limitations and Future Work

The authors note that DECODE only captures edits made to accepted AI completions, omitting instances where a developer rejected a suggestion outright. Additionally, code editing is highly subjective; there are often multiple valid ways to modify a snippet, which makes evaluating the generation task inherently challenging.

For future work, the authors suggest leveraging DECODE to build personalized coding assistants, exploring reinforcement learning from real-world developer interactions, and designing new evaluation metrics centered around code "editability" and retention rather than just raw correctness.

Summary updated

BibTeX
@misc{liang2026learning,
  author = {Jenny T. Liang and Mihika Bairathi and Wayne Chi and Ameet Talwalkar and Nishant Subramani and Valerie Chen},
  title = {{Learning from 53.6K Real-World Developer Edits of AI-Generated Code}},
  year = {2026},
  eprint = {2607.25130},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.25130},
}
Figure