摘要
针对当前克隆代码管理不科学,没有侧重点,提出基于演化模式克隆代码Bugs倾向性分析方法。首先使用自主研发工具CloneCodeTracker跟踪克隆演化,然后结合克隆代码Bugs修复数据分视角讨论不同演化模式下克隆代码Bugs倾向性。经过对12款软件近2万个版本实验,结果表明:克隆群视角下复杂演化模式Bugs倾向性最高,合并演化模式Bugs倾向性较高;克隆片段视角下去除演化模式Bug倾向性明显高于其他演化模式;克隆代码内容视角下一致变化演化模式与不一致变化模式Bugs倾向性差别不明显。这些结论可以为克隆重构、克隆管理提供建议,例如,选择复杂演化模式,合并演化模式,去除演化模式的克隆代码优先重构。
The present clone management is unscientific and lacks emphasis of study, so a method for analyzing clone code Bugs bias based on evolutionary model is proposed. Firstly, the independent development tool CloneCodeTracker is used to conduct clone evolution trace. It makes statistics of fixed clone code Bugs according to code modify logs, and discusses Bugs proneness of clone code in different evolution mode from various perspective. The experiment is made on nearly 20 thousand versions of 12 different softwares. The results show that under the perspective of clone group, complex evolution mode represents stronger Bugs proneness, and Bugs proneness of merge evolution model is higher than other model. However, in view of clone fragments, higher Bugs proneness is expressed in remove evolution model than those in other evolution mode. And under the perspective of clone code itself, Bugs proneness remains stable between consistence and inconsistence evolution mode. These conclusions will provide support for clone refactor and management, such as,clone code of complex evolution model, merge evolution model, and remove evolution model has high priority of refactoring.
作者
葛广帅
闫盛
刘东升
张丽萍
GE Guangshuai;YAN Sheng;LIU Dongsheng;ZHANG Liping(College of Computer and Information Engineering,Inner Mongolia Normal University,Hohhot 010022,China)
出处
《计算机工程与应用》
CSCD
北大核心
2018年第13期59-66,共8页
Computer Engineering and Applications
基金
国家自然科学基金(No.61462071
No.61363017)