Next Edit Prediction: Learning to Predict Code Edits from Context and Interaction History
Ruofan Lu, Yintong Huo, Meng Zhang, Yichen Li, Michael R. Lyu

TL;DR
This paper introduces Next Edit Prediction, a new task to anticipate developers' next code edits by analyzing recent interaction history, aiming to improve AI-powered coding assistants' proactive suggestions.
Contribution
It defines the Next Edit Prediction task, creates a dataset and benchmark, and evaluates models to enable proactive code editing suggestions based on interaction history.
Findings
Fine-tuned models outperform baselines in predicting next edits.
The approach improves the seamlessness of code editing workflows.
Proactive predictions can reduce context-switching for developers.
Abstract
The rapid advancement of large language models (LLMs) has led to the widespread adoption of AI-powered coding assistants integrated into a development environment. On one hand, low-latency code completion offers completion suggestions but is fundamentally constrained to the cursor's current position. On the other hand, chat-based editing can perform complex modifications, yet forces developers to stop their work, describe the intent in natural language, which causes a context-switch away from the code. This creates a suboptimal user experience, as neither paradigm proactively predicts the developer's next edit in a sequence of related edits. To bridge this gap and provide the seamless code edit suggestion, we introduce the task of Next Edit Prediction, a novel task designed to infer developer intent from recent interaction history to predict both the location and content of the…
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.
