Granularity-based Comparison of the Bug-proneness of Code Clones

被引:1
作者
Mondal, Smritikana [1 ]
Mondal, Manishankar [1 ]
Debnath, Rameswar [1 ]
机构
[1] Khulna Univ, Comp Sci & Engn Discipline, Khulna, Bangladesh
来源
2023 IEEE 17TH INTERNATIONAL WORKSHOP ON SOFTWARE CLONES, IWSC 2023 | 2023年
关键词
Code Clones; Clone types; Method level clones; Fragment level clones; Clone Bug-proneness;
D O I
10.1109/IWSC60764.2023.00009
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Exactly or nearly similar code pieces residing in a software system's code-base are known as code clones in the literature. The existing studies have investigated the bug-proneness of code clones in different ways. However, there is no study on the bug-proneness of code clones considering their granularities (i.e., method level or fragment level granularity). Thus, whether method level or fragment level code clones are more vulnerable for software evolution and maintenance is still unknown. If a particular clone category appears to be more vulnerable, we can prioritize refactoring code clones of that category to minimize clone related bugs in software systems. Focusing on this, we investigate and compare the bug-proneness of method level and fragment level code clones in our research. We detect code clones using the well-known NiCad clone detector and analyze their evolutionary history by automatically examining the changes that occurred to them during their evolution. We investigate and compare the bug-proneness of two categories of code clones: method level clones and fragment level clones. According to our investigation on three types (Type 1, 2, and 3) of code clones from thousands of revisions of six software systems: method level code clones are significantly more bug-prone than fragment level code clones during evolution. Also, method level clones are significantly more change-prone than fragment level clones. We should thus prioritize method level clones over fragment level clones while performing clone management activities.
引用
收藏
页码:8 / 14
页数:7
相关论文
共 32 条
[1]  
[Anonymous], 2013, JOINT M EUROPEAN SOF
[2]  
[Anonymous], 2023, Research data and implementation
[3]   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
[4]   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
[5]   The NiCad Clone Detector [J].
Cordy, James R. ;
Roy, Chanchal K. .
2011 IEEE 19TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2011, :219-+
[6]  
Göde N, 2011, 2011 33RD INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), P311, DOI 10.1145/1985793.1985836
[7]   Incremental Clone Detection [J].
Goede, Nils ;
Koschke, Rainer .
13TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING: CSMR 2009, PROCEEDINGS, 2009, :219-228
[8]  
Inoue K., 2012, 2012 Proceedings of the 6th International Workshop on Software Clones (IWSC 2012), P94, DOI 10.1109/IWSC.2012.6227882
[9]  
Islam J.F., 2017, SEKE, P436
[10]  
Islam JF, 2019, 2019 IEEE 26TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER), P73, DOI [10.1109/saner.2019.8667993, 10.1109/SANER.2019.8667993]