An Empirical Study of Long-Lived Code Clones

被引:0
作者
Cai, Dongxiang [1 ]
Kim, Miryung [2 ]
机构
[1] Hong Kong Univ Sci & Technol, Hong Kong, Hong Kong, Peoples R China
[2] Univ Texas Austin, Austin, TX 78712 USA
来源
FUNDAMENTAL APPROACHES TO SOFTWARE ENGINEERING | 2011年 / 6603卷
关键词
Software evolution; empirical study; code clones; refactoring; SUPPORT;
D O I
暂无
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Previous research has shown that refactoring code clones as soon as they are formed or discovered is not always feasible or worthwhile to perform, since some clones never change during evolution and some disappear in a short amount of time, while some undergo repetitive similar edits over their long lifetime. Toward a long-term goal of developing a recommendation system that selectively identifies clones to refactor, as a first step, we conducted an empirical investigation into the characteristics of long-lived clones. Our study of 13558 clone genealogies from 7 large open source projects, over the history of 33.25 years in total, found surprising results. The size of a clone, the number of clones in the same group, and the method-level distribution of clones are not strongly correlated with the survival time of clones. However, the number of developers who modified clones and the time since the last addition or removal of a clone to its group are highly correlated with the survival time of clones. This result indicates that the evolutionary characteristics of clones may be a better indicator for refactoring needs than static or spatial characteristics such as LOG, the number of clones in the same group, or the dispersion of clones in a system.
引用
收藏
页码:432 / +
页数:4
相关论文
共 50 条
  • [31] An Empirical Study of the Impact of Code Smell on File Changes
    Zhu, Can
    Zhang, Xiaofang
    Feng, Yang
    Chen, Lin
    2018 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE QUALITY, RELIABILITY AND SECURITY (QRS 2018), 2018, : 238 - 248
  • [32] An empirical study on bug propagation through code cloning
    Mondal, Manishankar
    Roy, Banani
    Roy, Chanchal K.
    Schneider, Kevin A.
    JOURNAL OF SYSTEMS AND SOFTWARE, 2019, 158
  • [33] An empirical study of Android behavioural code smells detection
    Dimitri Prestat
    Naouel Moha
    Roger Villemaire
    Empirical Software Engineering, 2022, 27
  • [34] Empirical Evidence of Code Decay: A Systematic Mapping Study
    Bandi, Ajay
    Williams, Byron J.
    Allen, Edward B.
    2013 20TH WORKING CONFERENCE ON REVERSE ENGINEERING (WCRE), 2013, : 341 - 350
  • [35] Will this clone be short-lived? Towards a better understanding of the characteristics of short-lived clones
    Thongtanunam, Patanamon
    Shang, Weiyi
    Hassan, Ahmed E.
    EMPIRICAL SOFTWARE ENGINEERING, 2019, 24 (02) : 937 - 972
  • [36] Will this clone be short-lived? Towards a better understanding of the characteristics of short-lived clones
    Patanamon Thongtanunam
    Weiyi Shang
    Ahmed E. Hassan
    Empirical Software Engineering, 2019, 24 : 937 - 972
  • [37] Cloud Programming Languages and Infrastructure from Code: An Empirical Study
    Simhandl, Georg
    Zdun, Uwe
    PROCEEDINGS OF THE 17TH ACM SIGPLAN INTERNATIONAL CONFERENCE ON SOFTWARE LANGUAGE ENGINEERING, SLE 2024, 2024, : 143 - 156
  • [38] On the Robustness of Code Generation Techniques: An Empirical Study on GitHub Copilot
    Mastropaolo, Antonio
    Pascarella, Luca
    Guglielmi, Emanuela
    Ciniselli, Matteo
    Scalabrino, Simone
    Oliveto, Rocco
    Bavota, Gabriele
    2023 IEEE/ACM 45TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, ICSE, 2023, : 2149 - 2160
  • [39] Code Review Practices for Refactoring Changes: An Empirical Study on OpenStack
    AlOmar, Eman Abdullah
    Chouchen, Moataz
    Mkaouer, Mohamed Wiem
    Ouni, Ali
    2022 MINING SOFTWARE REPOSITORIES CONFERENCE (MSR 2022), 2022, : 689 - 701
  • [40] Near-miss function clones in open source software: an empirical study
    Roy, C. K.
    Cordy, J. R.
    JOURNAL OF SOFTWARE MAINTENANCE AND EVOLUTION-RESEARCH AND PRACTICE, 2010, 22 (03): : 165 - 189