-
Abstract
Incremental code editing, as a fundamental task in software development, requires developers to iteratively identify edit locations and modify code. However, existing language model-driven approaches primarily focus on generating edit solutions for a single location, failing to provide comprehensive end-to-end solutions. To address this limitation and support real-world editing scenarios, we propose CoEdPilot, a project-wide interactive code editing recommendation tool. CoEdPilot utilizes edit descriptions and edit history, and recommends the next edit location with solutions across the entire project. It further refines its recommendations based on user editing feedback, enabling an end-to-end, iterative, and interactive editing process. We implement CoEdPilot as a Visual Studio Code extension that monitors user actions, identifies subsequent editing locations, and generates edits throughout the project. Its functionality is powered by a set of back-end language models, which are trained on 180k high-quality commits from 471 open-source repositories. Extensive experiments demonstrate CoEdPilot's capabilities in accurately identifying editing locations (i.e, edit location predicted with an accuracy of 85.03%-88.99%) and generating high-quality edit solutions (i.e., generated edit content with a Top-1 exact match rate (EMR) of 33.48%-48.94%). Our case study and user study of 18 participants further validate CoEdPilot's practicability.
-
-