Bug Replication in Code Clones: An Empirical Study

被引:26
|
作者
Islam, Judith F. [1 ]
Mondal, Manishankar [1 ]
Roy, Chanchal K. [1 ]
机构
[1] Univ Saskatchewan, Dept Comp Sci, Saskatoon, SK S7N 0W0, Canada
关键词
NICAD;
D O I
10.1109/SANER.2016.78
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Code clones are exactly or nearly similar code fragments in the code-base of a software system. Existing studies show that clones are directly related to bugs and inconsistencies in the code-base. Code cloning (making code clones) is suspected to be responsible for replicating bugs in the code fragments. However, there is no study on the possibilities of bug-replication through cloning process. Such a study can help us discover ways of minimizing bug-replication. Focusing on this we conduct an empirical study on the intensities of bug-replication in the code clones of the major clone-types: Type 1, Type 2, and Type 3. According to our investigation on thousands of revisions of six diverse subject systems written in two different programming languages, C and Java, a considerable proportion (i.e., up to 10%) of the code clones can contain replicated bugs. Both Type 2 and Type 3 clones have higher tendencies of having replicated bugs compared to Type 1 clones. Thus, Type 2 and Type 3 clones are more important from clone management perspectives. The extent of bug-replication in the buggy clone classes is generally very high (i.e., 100% in most of the cases). We also find that overall 55% of all the bugs experienced by the code clones can be replicated bugs. Our study shows that replication of bugs through cloning is a common phenomenon. Clone fragments having method-calls and if-conditions should be considered for refactoring with high priorities, because such clone fragments have high possibilities of containing replicated bugs. We believe that our findings are important for better maintenance of software systems, in particular, systems with code clones.
引用
收藏
页码:68 / 78
页数:11
相关论文
共 50 条
  • [31] An Empirical Study of Regression Bug Chains in Linux
    Xiao, Guanping
    Zheng, Zheng
    Jiang, Bo
    Sui, Yulei
    IEEE TRANSACTIONS ON RELIABILITY, 2020, 69 (02) : 558 - 570
  • [32] An Empirical Study of Bug Report Field Reassignment
    Xia, Xin
    Lo, David
    Wen, Ming
    Shihab, Emad
    Zhou, Bo
    2014 SOFTWARE EVOLUTION WEEK - IEEE CONFERENCE ON SOFTWARE MAINTENANCE, REENGINEERING, AND REVERSE ENGINEERING (CSMR-WCRE), 2014, : 174 - +
  • [33] A study of consistent and inconsistent changes to code clones
    Krinke, Jens
    14TH WORKING CONFERENCE ON REVERSE ENGINEERING, PROCEEDINGS, 2007, : 170 - 178
  • [34] An Exploratory Study on Interface Similarities in Code Clones
    Misu, Md Rakib Hossain
    Satter, Abdus
    Sakib, Kazi
    2017 24TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE WORKSHOPS (APSECW), 2017, : 126 - 133
  • [35] An extensive replication study of the ABLoTS approach for bug localization
    Niu, Feifei
    Zhang, Enshuo
    Mayr-Dorn, Christoph
    Assuncao, Wesley Klewerton Guez
    Huang, Liguo
    Ge, Jidong
    Luo, Bin
    Egyed, Alexander
    EMPIRICAL SOFTWARE ENGINEERING, 2024, 29 (06)
  • [36] A Comparative Study of Software Bugs in Micro-clones and Regular Code Clones
    Islam, Judith F.
    Mondal, Manishankar
    Roy, Chanchal K.
    2019 IEEE 26TH INTERNATIONAL CONFERENCE ON SOFTWARE ANALYSIS, EVOLUTION AND REENGINEERING (SANER), 2019, : 73 - 83
  • [37] An Empirical Study of the Impacts of Clones in Software Maintenance
    Mondal, Manishankar
    Rahman, Md. Saidur
    Saha, Ripon K.
    Roy, Chanchal K.
    Krinke, Jens
    Schneider, Kevin A.
    2011 IEEE 19TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2011, : 242 - 245
  • [38] An Empirical Study of Identical Function Clones in CRAN
    Claes, Maelick
    Mens, Tom
    Tabout, Narjisse
    Grosjean, Philippe
    2015 IEEE 9TH INTERNATIONAL WORKSHOP ON SOFTWARE CLONES (IWSC), 2015, : 19 - 25
  • [39] Empirical Study on Restored Code Changes in Code Review
    Wang Q.-Y.
    Wan Z.-Y.
    Li S.-P.
    Xia X.
    Ruan Jian Xue Bao/Journal of Software, 2022, 33 (07): : 2581 - 2598
  • [40] An empirical study on the impact of code contributor on code smell
    Jiang J.
    Zhu C.
    Zhang X.
    International Journal of Performability Engineering, 2020, 16 (07) : 1067 - 1077