基于决策树推荐克隆重构的方法  被引量:3

Recommending clone refactoring method based on decision tree

在线阅读下载全文

作  者:折蓉蓉 张丽萍[1] 侯敏[1] 闫盛[1] SHE Rongrong;ZHANG Liping;HOU Min;YAN Sheng(College of Computer and Information Engineering,Inner Mongolia Normal University,Hohhot Nei Mongol 010022,China)

机构地区:[1]内蒙古师范大学计算机与信息工程学院,呼和浩特010022

出  处:《计算机应用》2018年第7期2037-2043,2069,共8页journal of Computer Applications

基  金:国家自然科学基金资助项目(61462071);内蒙古自然科学基金资助项目(2016MS0612)~~

摘  要:针对克隆代码的大量使用会导致长期软件维护问题甚至引入错误,提出了一种基于决策树的分类器来推荐克隆进行重构。首先,使用Ni Cad进行克隆检测;其次,收集了与克隆关系、克隆代码段和克隆上下文都相关的特征;然后,利用决策树分类器训练;最后,利用K折交叉评估分类结果。在5款开源软件中对近600多个克隆实例进行实验,实验结果表明所提方法为每个目标系统推荐克隆重构实例时达到80%的精度。Aiming at long-term software maintenance even introduction of errors due to extensive use of cloned code, a classifier based on decision tree was proposed to recommend clone for refactoring. Firstly, clone detection was performed using NiCad. Secondly, the features related to cloning relationship, cloned code segment and clonal context were collected. Thirdly, a decision tree classifier was used for training. Finally, the classification results were evaluated by K-fold crossover. The experiments were conducted on nearly 600 clones in five kinds of open-source software. The experimental results show that the proposed method achieves 80% accuracy when recommending clonal refactoring instances for each target system.

关 键 词:克隆代码 克隆重构 克隆检测 决策树 特征选择 

分 类 号:TP311.5[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象