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 条
  • [21] An Empirical Study on Bug Severity Estimation Using Source Code Metrics and Static Analysis
    Mashhadi, Ehsan
    Chowdhury, Shaiful
    Modaberi, Somayeh
    Ahmadvand, Hossein
    Hemmati, Hadi
    Uddin, Gias
    SSRN, 2023,
  • [22] An empirical study on bug severity estimation using source code metrics and static analysis
    Mashhadi, Ehsan
    Chowdhury, Shaiful
    Modaberi, Somayeh
    Hemmati, Hadi
    Uddin, Gias
    JOURNAL OF SYSTEMS AND SOFTWARE, 2024, 217
  • [23] Bug-proneness and late propagation tendency of code clones: A Comparative study on different clone types
    Mondal, Manishankar
    Roy, Chanchal K.
    Schneider, Kevin A.
    JOURNAL OF SYSTEMS AND SOFTWARE, 2018, 144 : 41 - 59
  • [24] An Empirical Study of Bug Bounty Programs
    Walshe, Thomas
    Simpson, Andrew
    PROCEEDINGS OF THE 2020 IEEE 2ND INTERNATIONAL WORKSHOP ON INTELLIGENT BUG FIXING (IBF '20), 2020, : 35 - 44
  • [25] An Empirical Study of the Bug Link Rate
    Li, Chenglin
    Zhao, Yangyang
    Yang, Yibiao
    2022 IEEE 22ND INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY, QRS, 2022, : 177 - 188
  • [26] An Empirical Study on Real Bug Fixes
    Zhong, Hao
    Su, Zhendong
    2015 IEEE/ACM 37TH IEEE INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, VOL 1, 2015, : 913 - 923
  • [27] Empirical Study on Software Bug Prediction
    Rizwan, Syed
    Wang Tiantian
    Su Xiaohong
    Salahuddin
    2017 INTERNATIONAL CONFERENCE ON SOFTWARE AND E-BUSINESS (ICSEB 2017), 2015, : 55 - 59
  • [28] An Empirical Study of Bug Fixing Rate
    Zou, Weiqin
    Xia, Xin
    Zhang, Weiqiang
    Chen, Zhenyu
    Lo, David
    39TH ANNUAL IEEE COMPUTERS, SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC 2015), VOL 2, 2015, : 254 - 263
  • [29] An Empirical Study on Bug Assignment Automation Using Chinese Bug Data
    Lin, Zhongpeng
    Shu, Fengdi
    Yang, Ye
    Hu, Chenyong
    Wang, Qing
    ESEM: 2009 3RD INTERNATIONAL SYMPOSIUM ON EMPIRICAL SOFTWARE ENGINEERING AND MEASUREMENT, 2009, : 452 - 456
  • [30] How clones are maintained: An empirical study
    Aversano, Lerina
    Cerulo, Luigi
    Di Penta, Massimiliano
    CSMR 2007: 11TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING, PROCEEDINGS: SOFWARE EVOLUTION IN COMPLEX SOFTWARE INTENSIVE SYSTEMS, 2007, : 81 - +