计算机工程与应用2018,Vol.54Issue(11):53-61,9.DOI:10.3778/j.issn.1002-8331.1703-0576
基于修改日志克隆代码跟踪及演化模式识别
Clone code tracking and evolution pattern identifying based on modify log
摘要
Abstract
Recently,most clone tracking is based on release version of software,which loses much change information of clone code during the process of software development. Definition of evolution pattern is unclear, and its perspective is not distinguished.This paper proposes a method of tracing clone code based on modify log,and identifies clone evolution pattern by different perspectives(clone class,clone fragment,clone code content).Firstly,regarding each submission as one small version,and detecting clone of each version by NiCad;Secondly,mapping clone class initially based on leven-shtein distance of token; Thirdly, mapping clone fragment based on modify log; Fourthly, revising clone class mapping based on the result of clone fragment mapping;Finally,identifying clone evolution pattern in different perspectives.The experiment is conducted on nearly 8 thousand versions of 6 open-source software.The results show that more than 97% clone code is in"stable"evolution pattern,"separate","merge","complex"is no more than 0.01%, and"consistent change","inconsistent change"is less than 2%.Contrast to the similar tool named gCad,recall(increased by 2%)and precision(increased by 2%)of this method are significantly higher,and running speed is also faster in the same environment.关键词
克隆代码/克隆跟踪/演化模式/修改日志Key words
clone code/clone tracking/evolution pattern/modify log分类
信息技术与安全科学引用本文复制引用
葛广帅,刘东升,张丽萍,侯敏,包萨仁娜..基于修改日志克隆代码跟踪及演化模式识别[J].计算机工程与应用,2018,54(11):53-61,9.基金项目
国家自然科学基金(No.61462071,No.61363017) (No.61462071,No.61363017)
内蒙古自然科学基金(No.2016MS0612,No.2015MS0606). (No.2016MS0612,No.2015MS0606)