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 条
  • [41] Bug priority change: An empirical study on Apache projects
    Li, Zengyang
    Cai, Guangzong
    Yu, Qinyi
    Liang, Peng
    Mo, Ran
    Liu, Hui
    JOURNAL OF SYSTEMS AND SOFTWARE, 2024, 212
  • [42] An Empirical Study of the Effects of Expert Knowledge on Bug Reports
    Huo, Da
    Ding, Tao
    McMillan, Collin
    Gethers, Malcom
    2014 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME), 2014, : 1 - 10
  • [43] Bug Analysis in Jupyter Notebook Projects: An Empirical Study
    De Santana, Taijara Loiola
    Da Mmota Silveira Neto, Paulo Anselmo
    De Almeida, Eduardo Santana
    Ahmed, Iftekhar
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2024, 33 (04)
  • [44] An empirical study on the effect of community smells on bug prediction
    Eken, Beyza
    Palma, Francis
    Ayse, Basar
    Ayse, Tosun
    SOFTWARE QUALITY JOURNAL, 2021, 29 (01) : 159 - 194
  • [45] An empirical study on the effect of community smells on bug prediction
    Beyza Eken
    Francis Palma
    Başar Ayşe
    Tosun Ayşe
    Software Quality Journal, 2021, 29 : 159 - 194
  • [46] A Comprehensive Study on Code Clones in Automated Driving Software
    Mo, Ran
    Jiang, Yingjie
    Zhan, Wenjing
    Wang, Dongyu
    Li, Zengyang
    2023 38TH IEEE/ACM INTERNATIONAL CONFERENCE ON AUTOMATED SOFTWARE ENGINEERING, ASE, 2023, : 1073 - 1085
  • [47] A Project Hahn empirical replication study
    Paul Lan
    Rob Sveen
    John Davidson
    Journal of Outdoor and Environmental Education, 2004, 8 (1) : 37 - 43
  • [48] Bug reports priority classification models. Replication study
    Galbin-Nasui, Andreea
    Vescan, Andreea
    AUTOMATED SOFTWARE ENGINEERING, 2024, 31 (01)
  • [49] A Preliminary Study on Using Code Smells to Improve Bug Localization
    Takahashi, Aoi
    Sae-Lim, Natthawute
    Hayashi, Shinpei
    Saeki, Motoshi
    2018 IEEE/ACM 26TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2018), 2018, : 324 - 327
  • [50] An empirical study of sentiments in code reviews
    El Asri, Ikram
    Kerzazi, Noureddine
    Uddin, Gias
    Khomh, Foutse
    Idrissi, M. A. Janati
    INFORMATION AND SOFTWARE TECHNOLOGY, 2019, 114 : 37 - 54