保持语义不变的C克隆代码预处理方法  

Semantic-Preserving Pre-Processing Method for C Clone Code

在线阅读下载全文

作  者:边奕心 赵松[2] 杜军[2] BIAN Yi-xin;ZHAO Song;DU Jun(Institute of Software Chinese Academy of Sciences Haidian Beijing 100190;College of Computer Science and Information Engineering, Harbin Normal University Harbin 150025)

机构地区:[1]中国科学院软件研究所,北京海淀区100190 [2]哈尔滨师范大学计算机科学与信息工程学院,哈尔滨150025

出  处:《电子科技大学学报》2017年第6期926-933,共8页Journal of University of Electronic Science and Technology of China

基  金:黑龙江省自然科学基金(F2016030)

摘  要:克隆代码检测工具的输出结果由于存在克隆检测不一致性缺陷的误检和检测出的克隆代码不能直接用于重构的问题,需要对检测工具的输出结果进行预处理。为了解决该问题,提出一种新的克隆代码预处理方法。首先,将自适应K-最近邻聚类方法与程序依赖图相结合,用于降低克隆不一致性相关缺陷检测的误检。然后,使用基于代价-收益分析的评估方法,在消除缺陷后的克隆代码中识别可重构的克隆代码。实验结果表明,该预处理方法,不仅降低了克隆不一致性相关缺陷检测工具产生的误检,提高了可重构克隆代码的数量,而且将克隆代码检测与克隆代码重构两个过程连接为一个有机的整体,有利于提高软件的质量,降低软件维护的成本。The output results of clone code detection tool cannot be directly refactored because of the two reasons:one is the false positives of clone inconsistency related bugs detection and the other is that all the detected clones cannot be suitable for refactoring.Therefore,the output results of clone code detection tool need to be pre-processed for reducing the error checking of cloning inconsistencies defect.A pre-processing approach combing adaptive K-nearest neighbor clustering with program dependence graph is proposed in this paper to solve these problems.First,adaptive K-nearest neighbor clustering and program dependence graph are used to reduce the false positives of clones inconsistency related bugs detection.And then the refactorable clone code is identified to reduce the cost of clone maintenance.The results of the study show that our approach not only effectively prunes the false positives of clone inconsistency related bugs but also eliminates the gap between clone code detection and clone refactoring.Therefore,our method contributes to improving the quality of the software and decreasing the cost of software maintenance.

关 键 词:自适应K-最近邻聚类 克隆代码 克隆不一致性缺陷检测 程序依赖图 重构 

分 类 号:TH133[机械工程—机械制造及自动化] TP183[自动化与计算机技术—控制理论与控制工程]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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