计算机科学与探索Issue(4):446-455,10.DOI:10.3778/j.issn.1673-9418.1311015
基于分组的代码克隆增量检测方法
Grouping-Based Incremental Clone Detection Method
摘要
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.关键词
程序分析/代码克隆/克隆检测/增量Key words
program analysis/code clone/clone detection/incremental分类
信息技术与安全科学引用本文复制引用
王海,林云,彭鑫,赵文耘..基于分组的代码克隆增量检测方法[J].计算机科学与探索,2014,(4):446-455,10.基金项目
The National High Technology Research and Development Program of China under Grant No.2012AA011202(国家高技术研究发展计划(863计划)) (国家高技术研究发展计划(863计划)