返回
Context-Aware Code Change Embedding for Better Patch Correctness Assessment
DOI:10.1145/3505247.png)
摘要
En 中文
Despite the capability in successfully fixing more and more real-world bugs, existing Automated Program Repair (APR) techniques are still challenged by the long-standing overfitting problem (i.e., a generated patch that passes all tests is actually incorrect). Plenty of approaches have been proposed for automated patch correctness assessment (APCA). Nonetheless, dynamic ones (i.e., those that needed to execute tests) are time-consuming while static ones (i.e., those built on top of static code features) are less precise. Therefore, embedding techniques have been proposed recently, which assess patch correctness via embedding token sequences extracted from the changed code of a generated patch. However, existing techniques rarely considered the context information and program structures of a generated patch, which are crucial for patch correctness assessment as revealed by existing studies. In this study, we explore the idea of context-aware code change embedding considering program structures for patch correctness assessment. Specifically, given a patch, we not only focus on the changed code but also take the correlated unchanged part into consideration, through which the context information can be extracted and leveraged. We then utilize the AST path technique for representation where the structure information from AST node can be captured. Finally, based on several pre-defined heuristics, we build a deep learning based classifier to predict the correctness of the patch. We implemented this idea as CACHE and performed extensive experiments to assess its effectiveness. Our results demonstrate that CACHE can (1) perform better than previous representation learning based techniques (e.g., CACHE relatively outperforms existing techniques by approximate to 6%, approximate to 3%, and approximate to 16%, respectively under three diverse experiment settings), and (2) achieve overall higher performance than existing APCA techniques while even being more precise than certain dynamic ones including PATCH-SIM (92.9% vs. 83.0%). Further results reveal that the context information and program structures leveraged by CACHE contributed significantly to its outstanding performance.
Keyword:
Automated program repair
patch correctness
deep learning
期刊
A
IF:
6.2
论文数:
1.2K
被引数:
3.4K
机构
引用论文
Polysialylated Neural Cell Adhesion Molecule Is Involved in Induction of Long-Term Potentiation and Memory Acquisition and Consolidation in a Fear-Conditioning Paradigm聚唾液酸化的神经细胞粘附分子在恐惧调节范式中参与诱导长期增强和记忆获取和巩固
Sodium channel kinetic changes that produce Brugada syndrome or progressive cardiac conduction system disease产生Brugada综合征或进行性心脏传导系统疾病的钠通道动力学变化
The effect of a novel extracorporeal cytokine hemoadsorption device on IL-6 elimination in septic patients: A randomized controlled trial
PLOS ONE
IF0
Adaptive Energy Management Strategy Calibration in PHEVs Based on a Sensitivity Study基于灵敏度研究的phev自适应能量管理策略标定

