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 条
  • [41] An empirical study on how project context impacts on code cloning
    Perez-Castillo, Ricardo
    Piattini, Mario
    JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2018, 30 (12)
  • [42] Missing Clean Code Acceptance and Support in Practice - An Empirical Study
    Rachow, Paula
    Schroeder, Sandra
    Riebisch, Matthias
    2018 25TH AUSTRALASIAN SOFTWARE ENGINEERING CONFERENCE (ASWEC), 2018, : 131 - 140
  • [43] Analyzing and Forecasting Near-miss Clones in Evolving Software: An Empirical Study
    Zibran, Minhaz F.
    Saha, Ripon K.
    Asaduzzaman, Muhammad
    Roy, Chanchal K.
    2011 16TH IEEE INTERNATIONAL CONFERENCE ON ENGINEERING OF COMPLEX COMPUTER SYSTEMS (ICECCS), 2011, : 295 - 304
  • [44] Bugs in large language models generated code: an empirical study
    Tambon, Florian
    Moradi-Dakhel, Arghavan
    Nikanjam, Amin
    Khomh, Foutse
    Desmarais, Michel C.
    Antoniol, Giuliano
    EMPIRICAL SOFTWARE ENGINEERING, 2025, 30 (03)
  • [45] Ranking code clones to support maintenance activities
    Osama Ehsan
    Foutse Khomh
    Ying Zou
    Dong Qiu
    Empirical Software Engineering, 2023, 28
  • [46] Aspectualization of code clones-an algorithmic approach
    Ajila, Samuel A.
    Gakhar, Angad S.
    Lung, Chung-Horng
    INFORMATION SYSTEMS FRONTIERS, 2014, 16 (05) : 835 - 851
  • [47] Prioritisation of code clones using a genetic algorithm
    Azadi, Umberto
    Walter, Bartosz
    Fontana, Francesca Arcelli
    INFORMATION AND SOFTWARE TECHNOLOGY, 2024, 170
  • [48] Ranking code clones to support maintenance activities
    Ehsan, Osama
    Khomh, Foutse
    Zou, Ying
    Qiu, Dong
    EMPIRICAL SOFTWARE ENGINEERING, 2023, 28 (03)
  • [49] Investigating Context Adaptation Bugs in Code Clones
    Mondal, Manishankar
    Roy, Banani
    Roy, Chanchal K.
    Schneider, Kevin A.
    2019 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2019), 2019, : 157 - 168
  • [50] A comparative study on the intensity and harmfulness of late propagation in near-miss code clones
    Manishankar Mondal
    Chanchal K. Roy
    Kevin A. Schneider
    Software Quality Journal, 2016, 24 : 883 - 915