arrow
返回

Mining Python fix patterns via analyzing fine-grained source code changes

delete2022-01-28
delete11
PRE
AI
Y
Yilin Yang *
T
Tianxing He
Y
Yang Feng
S
Shaoying Liu
B
Baowen Xu
DOI:10.1007/s10664-021-10087-1delete
delete原文链接
delete原文求助
delete分享
delete收藏
摘要

摘要

En 中文
Many code changes are inherently repetitive, and researchers employ repetitiveness of the code changes to generate bug fix patterns. Automatic Program Repair (APR) can automatically detect and fix bugs, thus helping developers to improve the quality of software products. As a critical component of APR, software bug fix patterns have been revealed by existing studies to be very effective in detecting and fixing bugs in different programming languages (e.g., Java/C++); yet the fix patterns proposed by these studies can not be directly applied to improve Python programs because of syntactic incompatibilities and lack of analysis of dynamic features. In this paper, we proposed a mining approach to identify fix patterns of Python programs by extracting fine-grained bug-fixing code changes. We first collected bug reports from GitHub repository and employed the abstract syntax tree edit distance to cluster similar bug-fixing code changes to generate fix patterns. We then evaluated the effectiveness of these fix patterns by applying them to single-hunk bugs in two benchmarks (BugsInPy and QuixBugs). The results show that 13 out of 101 real bugs can be fixed without human intervention; that is, the generated bug patch is identical or semantically equivalent with developer's patches. Also, we evaluated the fix patterns in the wild. For each complex bug, 15% of the bug code could be fixed, and 37% of the bug code could be matched by fix patterns.
Keyword:
Pattern mining
Fix pattern
Program repair
Bug fix changes

期刊

Empirical Software Engineering 封面图
Empirical Software Engineering
IF:
3.6
论文数:
2.0K
被引数:
5.3K

机构

N
nanjing university
学者数:
7.8W
论文数: 5.6W
被引数: 87
H
Hiroshima University
学者数:
2.1W
论文数: 1.5W
被引数: 1.3W
引用论文

引用论文

A Socially Responsible Islamic Finance
err
IF0
err2017-01-01
err0
PREAI
errUmar F. Moghul
err分享
err收藏
On the Naturalness of Software论软件的自然性
err2016-04-26
err164
PREAI
errHindle, Abram; Barr, Earl T.; Gabel, Mark; Su, Zhendong; Devanbu, Premkumar
err分享
err收藏
Hematuria One Stop Clinic: First Experience in Italy with 150 Cases
err2011-02-12
err0
PREAI
errLuca Carmignani; Giorgio Bozzini; Vincenzo Nicosia; Massimo Consentino; Stefano Picozzi; Stefano Casellato; Luca Lunelli
err分享
err收藏
Relaxation of persistent photoconductivity inAl0.3Ga0.7As
err1990-09-15
err0
PREAI
errJ. Y. Lin; A. Dissanayake; G. Brown; H. X. Jiang
err分享
err收藏
学者 查看更多内容