A comparative study on the intensity and harmfulness of late propagation in near-miss code clones

被引:9
作者
Mondal, Manishankar [1 ]
Roy, Chanchal K. [1 ]
Schneider, Kevin A. [1 ]
机构
[1] Univ Saskatchewan, Dept Comp Sci, Saskatoon, SK, Canada
关键词
Code clones; Late propagation; Clone genealogy; Near-miss clones; NICAD;
D O I
10.1007/s11219-016-9305-y
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Exact or nearly similar code fragments in a software system's source code are referred to as code clones. It is often the case that updates (i.e., changes) to a code clone will need to be propagated to its related code clones to preserve their similarity and to maintain source code consistency. When there is a delay in propagating the changes (possibly because the developer is unaware of the related cloned code), the system might behave incorrectly. A delay in propagating a change is referred to as 'late propagation,' and a number of studies have investigated this phenomenon. However, these studies did not investigate the intensity of late propagation nor how late propagation differs by clone type. In this research, we investigate late propagation separately for each of the three clone types (Type 1, Type 2, and Type 3). According to our experimental results on thousands of revisions of eight diverse subject systems written in two programming languages, late propagation occurs more frequently in Type 3 clones compared with the other two clone types. More importantly, there is a higher probability that Type 3 clones will experience buggy late propagations compared with the other two clone types. Also, we discovered that block clones are more involved in late propagation than method clones. Refactoring and tracking of Similarity Preserving Change Pattern (SPCP) clones (i.e., the clone fragments that evolve following a SPCP) can help us minimize the occurrences of late propagation in clones.
引用
收藏
页码:883 / 915
页数:33
相关论文
共 33 条
  • [1] Aversano L, 2007, CSMR 2007: 11TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING, PROCEEDINGS, P81
  • [2] An empirical study of faults in late propagation clone genealogies
    Barbour, Liliane
    Khomh, Foutse
    Zou, Ying
    [J]. JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2013, 25 (11) : 1139 - 1165
  • [3] Bazrafshan S., 2012, 2012 12th IEEE Working Conference on Source Code Analysis and Manipulation (SCAM 2012), P74, DOI 10.1109/SCAM.2012.18
  • [4] The NiCad Clone Detector
    Cordy, James R.
    Roy, Chanchal K.
    [J]. 2011 IEEE 19TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC), 2011, : 219 - +
  • [5] Visualizing Co-Change Information with the Evolution Radar
    D'Ambros, Marco
    Lanza, Michele
    Lungu, Mircea
    [J]. IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2009, 35 (05) : 720 - 735
  • [6] Duala-Ekoko E, 2007, PROC INT CONF SOFTW, P158
  • [7] Duala-Ekoko E, 2008, ICSE'08 PROCEEDINGS OF THE THIRTIETH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, P843, DOI 10.1145/1368088.1368218
  • [8] GODE N, 2011, ICSE, P311
  • [9] Clone Stability
    Goede, Nils
    Harder, Jan
    [J]. 2011 15TH EUROPEAN CONFERENCE ON SOFTWARE MAINTENANCE AND REENGINEERING (CSMR), 2011, : 65 - 74
  • [10] Cloning considered harmful considered harmful: patterns of cloning in software
    Kapser, Cory J.
    Godfrey, Michael W.
    [J]. EMPIRICAL SOFTWARE ENGINEERING, 2008, 13 (06) : 645 - 692