arrow
返回

Leveraging Large Language Model for Automatic Patch Correctness Assessment

delete2024-11-01
delete0
PRE
AI
X
Xin Zhou
B
Bowen Xu *
K
Kisub Kim
D
DongGyun Han
H
Hung Huu Nguyen
T
Thanh Le-Cong
J
Junda He
X
Xuan-Bach D. Le
D
David Lo
DOI:10.1109/TSE.2024.3452252delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Automated Program Repair (APR) techniques have shown more and more promising results in fixing real-world bugs. Despite the effectiveness, APR techniques still face an overfitting problem: a generated patch can be incorrect although it passes all tests. It is time-consuming to manually evaluate the correctness of generated patches that can pass all available test cases. To address this problem, many approaches have been proposed to automatically assess the correctness of patches generated by APR techniques. These approaches are mainly evaluated within the cross-validation setting. However, for patches generated by a new or unseen APR tool, users are implicitly required to manually label a significant portion of these patches (e.g., 90% in 10-fold cross-validation) in the cross-validation setting before inferring the remaining patches (e.g., 10% in 10-fold cross-validation). To mitigate the issue, in this study, we propose LLM4PatchCorrect, the patch correctness assessment by adopting a large language model for code. Specifically, for patches generated by a new or unseen APR tool, LLM4PatchCorrect does not need labeled patches of this new or unseen APR tool for training but directly queries the large language model for code to get predictions on the correctness labels without training. In this way, LLM4PatchCorrect can reduce the manual labeling effort when building a model to automatically assess the correctness of generated patches of new APR tools. To provide knowledge regarding the automatic patch correctness assessment (APCA) task to the large language model for code, LLM4PatchCorrect leverages bug descriptions, execution traces, failing test cases, test coverage, and labeled patches generated by existing APR tools, before deciding the correctness of the unlabeled patches of a new or unseen APR tool. Additionally, LLM4PatchCorrect prioritizes labeled patches from existing APR tools that exhibit semantic similarity to those generated by new APR tools, enhancing the accuracy achieved by LLM4PatchCorrect for patches from new APR tools. Our experimental results showed that LLM4PatchCorrect can achieve an accuracy of 84.4% and an F1-score of 86.5% on average although no labeled patch of the new or unseen APR tool is available. In addition, our proposed technique significantly outperformed the prior state-of-the-art.
Keyword:
Computer bugs
Codes
Task analysis
Large language models
Feature extraction
Training
Manuals
Automatic patch correctness assessment
large language models of code
in-context learning

期刊

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

机构

S
Singapore Management University
学者数:
1.5K
论文数: 2.5K
被引数: 3.5K
R
Royal Holloway University London
学者数:
2.8K
论文数: 2.2K
被引数: 47
U
university of london
学者数:
21.5W
论文数: 19.7W
被引数: 305
N
North Carolina State University
学者数:
2.6W
论文数: 2.3W
被引数: 3.7W
学者 查看更多机构
引用论文

引用论文

Relaxation of persistent photoconductivity inAl0.3Ga0.7As
err1990-09-15
err0
PREAI
errJ. Y. Lin; A. Dissanayake; G. Brown; H. X. Jiang
err分享
err收藏
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收藏
NICE guidance
err2009-05-01
err0
PREAI
errTina Bishop
err分享
err收藏
err
IF0
err
err0
PREAI
err
err分享
err收藏
学者 查看更多内容