基于抽象语法树和最优映射算法的克隆代码映射研究  

Research on Clone Code Mapping Based on Abstract Syntax Tree and Optimal Mapping Algorithm

在线阅读下载全文

作  者:赵凤荣[1] 姚永婷 张丽萍[1] 赵俊奇 ZHAO Feng-rong;YAO Yong-ting;ZHANG Li-ping;ZHAO Jun-qi(College of Computer and Information Engineering,Inner Mongolia Normal University,Hohhot 010022,China;China United Network Communications Group Co.,Ltd Inner Mongolia Autonomous Region Branch,Hohhot 010050,China)

机构地区:[1]内蒙古师范大学计算机与信息工程学院,呼和浩特010022 [2]中国联合网络通信集团有限公司内蒙古自治区分公司,呼和浩特010050

出  处:《内蒙古大学学报(自然科学版)》2018年第5期521-527,共7页Journal of Inner Mongolia University:Natural Science Edition

基  金:国家自然科学基金资助项目(61462071);内蒙古自然科学基金资助项目(2018MS06009);内蒙古师范大学科研基金项目(2016ZRYB003)

摘  要:以具有嵌套结构的克隆代码为研究对象,使用NiCad检测工具获取克隆代码的检测结果,然后将检测出的克隆代码转换为抽象语法树,利用递归函数返回最优子树,筛选出具有相同嵌套结构的克隆代码;再利用最优映射算法对具有相同嵌套结构的克隆对进行映射.此方法更好地支持了Type-3类型克隆代码的映射,为进一步研究克隆代码重构奠定了基础.Taking the clone code with a nested structure as an object of the study,the research gets results of clone code by the detection tool of NiCad.Then,the clone code is transferred to an abstract syntax tree.Using the recursive function,the optimal subtree is returned,and the clone code which has the same nested structure is selected out.Finally,the optimal mapping algorithm is used to map the clone pair which has the same nested structure.This method supports the mapping of Type-3 clone code better,and lays a foundation for further research on clone code refactoring.

关 键 词:克隆代码 克隆映射 抽象语法树 最优映射算法 

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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