arrow
返回

Automated Code Editing With Search-Generate-Modify

delete2024-07-01
delete0
delete
OA
AI
C
Changshu Liu *
P
Pelin Cetin
Y
Yogesh Patodia
B
Baishakhi Ray
S
Saikat Chakraborty
Y
Yangruibo Ding
DOI:10.1109/TSE.2024.3376387delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Code editing is essential in evolving software development. In literature, several automated code editing tools are proposed, which leverage Information Retrieval-based techniques and Machine Learning-based code generation and code editing models. Each technique comes with its own promises and perils, and for this reason, 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 that is obtained by search & retrieval, even if incorrect, 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. We developed a novel tool to solve this challenge: SarGaM, which is designed to follow a real developer's code editing behavior. Given an original code version, the developer may search for the 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 w.r.t. the current state-of-the-art techniques. SarGaM also shows its effectiveness on automated program repair tasks.
Keyword:
Bug fixing
automated program repair
edit-based neural network
Bug fixing
automated program repair
edit-based neural network

期刊

IEEE Transactions on Software Engineering 封面图
IEEE Transactions on Software Engineering
IF:
5.6
论文数:
2.8K
被引数:
1.1W

机构

C
Columbia University
学者数:
7.1W
论文数: 6.4W
被引数: 263
M
Microsoft
学者数:
3.0K
论文数: 2.7K
被引数: 7
引用论文

引用论文

Identification of effective DNA barcodes for Triticum plants through chloroplast genome-wide analysis
err2017-12-01
err0
PREAI
errMohamed Awad; Ragab M. Fahmy; Kareem A. Mosa; Mohamed Helmy; Fawzy A. El-Feky
err分享
err收藏
Balanocarpol, a new polyphenol from Balanocarpus zeylanicus(trimen) and Hopea jucunda(Thw.)(Dipterocarpaceae)
err1985-01-01
err0
PREAI
errM. N. Champika Diyasena; Subramaniam Sotheeswaran; Sivagnanasunderam Surendrakumar; Sinnathamby Balasubramanian; Michael Bokel; Wolfgang Kraus
err分享
err收藏
err分享
err收藏
Caveolin-1 and -2 regulate cell motility in castration-resistant prostate cancer
err2018-10-01
err0
errOAAI
errToyoharu Kamibeppu; Koji Yamasaki; Kozue Nakahara; Takahiro Nagai; Naoki Terada; Hiromasa Tsukino; Shoichiro Mukai; Toshiyuki Kamoto
err分享
err收藏
Chapter Twenty‐Eight Qualitative and Quantitative Characterization of Autophagy in Caenorhabditis elegans by Electron Microscopy
err2008-01-01
err0
PREAI
errTimea Sigmond; Judit Fehér; Attila Baksa; Gabriella Pásti; Zsolt Pálfia; Krisztina Takács‐Vellai; János Kovács; Tibor Vellai; Attila L. Kovács
err分享
err收藏
Autophagy protects against PI3K/Akt/mTOR-mediated apoptosis of spinal cord neurons after mechanical injury
err2017-08-01
err0
PREAI
errZhenYu Wang; LinQuan Zhou; XiaoTing Zheng; Gang Chen; RongFeng Pan; JinHuang Li; WenGe Liu
err分享
err收藏
学者 查看更多内容