Grouping-Based Incremental Clone Detection Method

Hai WANG,Yun LIN,Xin PENG,Wenyun ZHAO
DOI: https://doi.org/10.3778/j.issn.1673-9418.1311015
2014-01-01
Abstract:Code clones are identical or similar code fragments in software systems, and extensively exist in soft-ware systems, therefore detecting code clones is deemed as an important issue in software maintenance. The majority of clone detectors detect code clones only in one revision. However, the changes on source codes are on-going as software systems evolve incrementally and iteratively. Thus, re-detecting all the code clones whenever any change happens turns out to be very effort and time consuming. In order to address this issue, this paper proposes an incre-mental clone detection algorithm, which divides the source codes into two groups, the changed and unchanged codes, in a subject software project. By detecting clones inside as well as between those two groups, this algorithm can incrementally detect code clones without re-detecting the whole project. Based on the proposed algorithm, this paper implements a prototype tool called ICDBG (incremental clone detector based on grouping). The experimental results show that ICDBG decreases the detecting time with good accuracy.
What problem does this paper attempt to address?