CoEdPilot: Recommending Code Edits with Learned Prior Edit Relevance, Project-wise Awareness, and Interactive Nature
Recent years have seen the development of LLM-based code generation. Compared to generating code in a software project, incremental code edits are empirically observed to be more frequent. The emerging code editing approaches usually formulate the problem as generating an edit based on known relevant prior edits and context. However, practical code edits can be more complicated. First, an editing session can include multiple (ir)relevant edits to the code under edit. Second, the inference of the subsequent edits is non-trivial as the scope of its ripple effect can be the whole project.
In this work, we propose CoEdPilot, an LLM-driven solution to recommend code edits by discriminating the relevant edits, exploring their interactive natures, and estimating its ripple effect in the project. Specifically, CoEdPilot orchestrates multiple neural transformers to identify what and how to edit in the project regarding both edit location and edit content. When a user accomplishes an edit with an optional editing description, an Subsequent Edit Analysis first reports the most relevant files in the project with what types of edits (e.g., keep, insert, and replace) can happen for each line of their code. Next, an Edit-content Generator generates concrete edit options for the lines of code, regarding its relevant prior changes reported by an Edit-dependency Analyzer. Last, both the Subsequent Edit Analysis and the Edit-content Generator capture relevant prior edits as feedback to readjust their recommendations. We train our models by collecting over 180K commits from 471 open-source projects in 5 programming languages. Our extensive experiments show that (1) CoEdPilot can well predict the edits (i.e., predicting edit location with accuracy of 70.8%-85.3%, and the edit content with exact match rate of 41.8% and BLEU4 score of 60.7); (2) CoEdPilot can well boost existing edit generators such as GRACE and CCT5 on exact match rate by 8.57% points and BLEU4 score by 18.08. Last, our user study on 18 participants with 3 editing tasks (1) shows that CoEdPilot can be effective in assisting users to edit code in comparison with Copilot, and (2) sheds light on the future improvement of the tool design. The video demonstration of our tool is available at https://sites.google.com/view/coedpilot/home.
Thu 19 SepDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
15:30 - 17:10 | |||
15:30 20mTalk | One-to-One or One-to-Many? Suggesting Extract Class Refactoring Opportunities with Intra-class Dependency Hypergraph Neural Network Technical Papers Di Cui Xidian University, Qiangqiang Wang Xidian University, Yutong Zhao University of Central Missouri, Jiaqi Wang Xidian University, Minjie Wei Xidian University, Jingzhao Hu Xidian University, Luqiao Wang Xidian University, Qingshan Li Xidian University DOI | ||
15:50 20mTalk | CoEdPilot: Recommending Code Edits with Learned Prior Edit Relevance, Project-wise Awareness, and Interactive Nature Technical Papers Chenyan Liu Shanghai Jiao Tong University; National University of Singapore, Yufan Cai Shanghai Jiao Tong University; National University of Singapore, Yun Lin Shanghai Jiao Tong University, Yuhuan Huang Shanghai Jiao Tong University, Yunrui Pei Shanghai Jiao Tong University, Bo Jiang Bytedance Network Technology, Ping Yang Bytedance Network Technology, Jin Song Dong National University of Singapore, Hong Mei Shanghai Jiao Tong University DOI | ||
16:10 20mTalk | Arfa: An Agile Regime-Based Floating-Point Optimization Approach for Rounding Errors Technical Papers Jinchen Xu Information Engineering University, Mengqi Cui Information Engineering University, Fei Li Information Engineering University, Zuoyan Zhang Hunan University, Hongru Yang Information Engineering University, Bei Zhou Information Engineering University, Jie Zhao Hunan University DOI | ||
16:30 20mTalk | Automated Deep Learning Optimization via DSL-Based Source Code Transformation Technical Papers Ruixin Wang Purdue University, Minghai Lu Purdue University, Cody Hao Yu BosonAI, Yi-Hsiang Lai Amazon Web Services, Tianyi Zhang Purdue University DOI |