Automated Code Editing with Search-Generate-Modify
Not on the map. Why?
Abstract (arXiv)
Code editing is essential in evolving software development. Many automated code editing tools have been proposed that leverage both Information Retrieval-based techniques and Machine Learning-based code generation and code editing models. Each technique comes with its own promises and perils, and they are often used together to complement their strengths and compensate for their weaknesses. This paper proposes a hybrid approach to better synthesize code edits by leveraging the power of code search, generation, and modification. Our key observation is that a patch obtained by search and retrieval, even if imperfect, can provide helpful guidance to a code generation model. However, a retrieval-guided patch produced by a code generation model can still be a few tokens off from the intended patch. Such generated patches can be slightly modified to create the intended patches. SARGAM is a novel tool designed to mimic a real developer's code editing behavior. Given an original code version, the developer may search for related patches, generate or write the code, and then modify the generated code to adapt it to the right context. Our evaluation of SARGAM on edit generation shows superior performance with respect to current state-of-the-art techniques. SARGAM also shows great effectiveness on automated program repair tasks.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). First posted on arXiv 10 Jun 2023.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 3; 2025: 4; 2026: 1.
8 papers.
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Surveycited by 354
- 2024Automatic Programming: Large Language Models and Beyondcited by 36
- 2024CigaR: Cost-efficient Program Repair with LLMscited by 15
- 2025Retrieval-Augmented Generation in Industry: An Interview Study on Use Cases, Requirements, Challenges, and Evaluationcited by 8
- 2025kAgent: An execution-guided crash resolution agent for the Linux kernelcited by 4
- 2025Next Edit Prediction: Learning to Predict Code Edits from Context and Interaction Historycited by 3
- 2025NES: An Instruction-Free, Low-Latency Next Edit Suggestion Framework Powered by Learned Historical Editing Trajectoriescited by 2
- 2026AdaptAgent: A Multi-agent, Domain-Guided Reasoning Framework for Code Adaptationcited by 0
- 2026AdaptAgent: A Multi-agent, Domain-Guided Reasoning Framework for Code Adaptation5 Aug 2026
- 2025Next Edit Prediction: Learning to Predict Code Edits from Context and Interaction History13 Aug 2025
- 2025Retrieval-Augmented Generation in Industry: An Interview Study on Use Cases, Requirements, Challenges, and Evaluation11 Aug 2025
- 2025NES: An Instruction-Free, Low-Latency Next Edit Suggestion Framework Powered by Learned Historical Editing Trajectories4 Aug 2025
- 2025kAgent: An execution-guided crash resolution agent for the Linux kernel29 Apr 2025
- 2024Automatic Programming: Large Language Models and Beyond3 May 2024
- 2024Retrieval-Augmented Generation for AI-Generated Content: A Survey29 Feb 2024
- 2024CigaR: Cost-efficient Program Repair with LLMs9 Feb 2024