电子科技大学学报2017,Vol.46Issue(6):926-933,8.DOI:10.3969/j.issn.1001-0548.2017.06.023
保持语义不变的C克隆代码预处理方法
Semantic-Preserving Pre-Processing Method for C Clone Code
摘要
Abstract
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-最近邻聚类/克隆代码/克隆不一致性缺陷检测/程序依赖图/重构Key words
adaptive K-nearest neighbor clustering/clone code/clone inconsistency related bugs detection/program dependence graph/refactoring分类
机械制造引用本文复制引用
边奕心,赵松,杜军..保持语义不变的C克隆代码预处理方法[J].电子科技大学学报,2017,46(6):926-933,8.基金项目
黑龙江省自然科学基金(F2016030) (F2016030)