A Comparative Study of Software Bugs in Micro-clones and Regular Code Clones

被引:0
作者
Islam, Judith F. [1 ]
Mondal, Manishankar [1 ]
Roy, Chanchal K. [1 ]
机构
[1] Univ Saskatchewan, Dept Comp Sci, Saskatoon, SK, Canada
来源
2019 IEEE 26TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER) | 2019年
关键词
Code Clones; Micro-Clones; Software Bugs; NICAD;
D O I
10.1109/saner.2019.8667993
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Reusing a code fragment through copy/pasting, also known as code cloning, is a common practice during software development and maintenance. Most of the existing studies on code clones ignore micro-clones where the size of a micro-clone fragment can be 1 to 4 LOC. In this paper we compare the bug-proneness of micro-clones with that of regular code clones. From thousands of revisions of six diverse open-source subject systems written in three languages (C, C#, and Java), we identify and investigate both regular and micro-clones that are associated with reported bugs. Our experiment reveals that percentage of changed code fragments due to bug-fix commits is significantly higher in micro-clones than regular clones. The number of consistent changes due to bug-fix commits is significantly higher in micro-clones than regular clones. We also observe that significantly higher percentage of files get affected by bug-fix commits in micro-clones than regular clones. Finally, we found that percentage of severe bugs is significantly higher in micro-clones than regular clones. We perform Mann-Whitney-Wilcoxon (MWW) test to evaluate the statistical significance level of our experimental results. Our findings imply that micro-clones should be emphasized during clone management and software maintenance.
引用
收藏
页码:73 / 83
页数:11
相关论文
共 50 条
[1]  
[Anonymous], 2012, P ACM S APPL COMPUTI, DOI DOI 10.1145/2245276.2231969
[2]  
Aversano L, 2007, CSMR 2007: 11TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING, PROCEEDINGS, P81
[3]  
Barbour L., 2011, 2011 IEEE 27th International Conference on Software Maintenance, P273, DOI 10.1109/ICSM.2011.6080794
[4]   An empirical study of faults in late propagation clone genealogies [J].
Barbour, Liliane ;
Khomh, Foutse ;
Zou, Ying .
JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2013, 25 (11) :1139-1165
[5]   The Last Line Effect [J].
Beller, Moritz ;
Zaidman, Andy ;
Karpov, Andrey .
2015 IEEE 23RD INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION ICPC 2015, 2015, :240-243
[6]   Measuring the Efficacy of Code Clone Information in a Bug Localization Task: An Empirical Study [J].
Chatterji, Debarshi ;
Carver, Jeffrey C. ;
Massengill, Beverly ;
Oslin, Jason ;
Kraft, Nicholas A. .
2011 FIFTH INTERNATIONAL SYMPOSIUM ON EMPIRICAL SOFTWARE ENGINEERING AND MEASUREMENT (ESEM 2011), 2011, :20-29
[7]   The NiCad Clone Detector [J].
Cordy, James R. ;
Roy, Chanchal K. .
2011 IEEE 19TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2011, :219-+
[8]  
Dyer R, 2013, PROCEEDINGS OF THE 35TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2013), P422, DOI 10.1109/ICSE.2013.6606588
[9]   Clone Stability [J].
Goede, Nils ;
Harder, Jan .
2011 15TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING (CSMR), 2011, :65-74
[10]  
Göde N, 2011, 2011 33RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), P311, DOI 10.1145/1985793.1985836