基于分组的代码克隆增量检测方法

王海,林云,彭鑫,等.基于分组的代码克隆增量检测方法[J].计算机科学与探索,2014,8(4):446-455.

ISSN 1673-9418CODEN JKYTA8

Journal of Frontiers of Computer Science and Technology 1673-9418/2014/08(04)-0446-10doi:10.3778/j.issn.1673-9418.1311015E-mail:fcst@https://www.360docs.net/doc/d612745124.html, https://www.360docs.net/doc/d612745124.html, Tel:+86-10-89056056基于分组的代码克隆增量检测方法*

王海,林云,彭鑫+,赵文耘

复旦大学软件学院软件工程实验室,上海201203

Grouping-Based Incremental Clone Detection Method

WANG Hai,LIN Yun,PENG Xin +,ZHAO Wenyun

Laboratory of Software Engineering,Software School,Fudan University,Shanghai 201203,China

+Corresponding author:E-mail:pengxin@https://www.360docs.net/doc/d612745124.html,

W ANG Hai,LIN Yun,PENG Xin,et al.Grouping-based incremental clone detection method.Journal of Fron-tiers of Computer Science and Technology,2014,8(4):446-455.

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

摘要:代码克隆是指软件程序中一组相同或相近的代码片段,它广泛存在于软件中,因此如何发现代码克隆成为软件维护的一个重要问题。目前已有的克隆检测工具大多针对单一版本进行完整的克隆检测,然而对于*The National High Technology Research and Development Program of China under Grant No.2012AA011202(国家高技术研究发展计划(863计划)).

Received 2013-09,Accepted 2013-11.

CNKI 网络优先出版:2013-12-09,

https://www.360docs.net/doc/d612745124.html,/kcms/doi/10.3778/j.issn.1673-9418.1311015.html

相关主题
相关文档
最新文档