首页 | 本学科首页   官方微博 | 高级检索  
     检索      

基于结构特征聚类的相似代码检索方法
引用本文:王克朝,王甜甜,王知非,任向民.基于结构特征聚类的相似代码检索方法[J].科学技术与工程,2015,15(11).
作者姓名:王克朝  王甜甜  王知非  任向民
作者单位:1. 哈尔滨学院软件学院,哈尔滨150086;哈尔滨工业大学计算机科学与技术学院,哈尔滨150001
2. 哈尔滨工业大学计算机科学与技术学院,哈尔滨,150001
3. 哈尔滨学院软件学院,哈尔滨,150086
基金项目:国家自然科学基金项目(面上项目,重点项目,重大项目);国家教育部博士点基金
摘    要:针对基于图的相似代码检测方法复杂度高、对代码多样化识别能力有限等问题,提出基于结构特征聚类的方法。首先将代码表示为控制依赖树,在此基础上执行代码标准化,消除代码表达方式的多样化,以便识别语法表示不同,而语义相似的代码;然后采用特征向量描述程序的结构信息,将复杂的图的相似度求解问题转换为简单的相似向量的聚类问题,快速提取可能相似的候选代码。实验结果表明,方法与Gabel等人提出的方法相比,可以识别更多的代码多样化。

关 键 词:相似代码  语义分析  向量聚类
收稿时间:2014/11/24 0:00:00
修稿时间:2015/3/26 0:00:00

Similar Code Retrieval based on the clustering of structural features
WANG KE CHAO,and.Similar Code Retrieval based on the clustering of structural features[J].Science Technology and Engineering,2015,15(11).
Authors:WANG KE CHAO  and
Abstract:The traditional graph based similar code detection approaches usually have high complexity, and are limited in recognizing code variations. In this paper, we propose a similar code retrieval approach based on the clustering of structural features. Source codes are represented as control dependence trees, and code normalization is performed to eliminate code variations so as to recognize the syntactically different but semantically similar codes. Then, vectors are computed to describe the structural information of source code, and the difficult graph similarity problem is reduced to a simpler vector clustering problem. Candidate similar codes are quickly extracted. Test results show that our method can recognize more code variations than that of the method proposed by Gabel et al.
Keywords:similar  code  semantic  analysis  vector  clustering
本文献已被 CNKI 万方数据 等数据库收录!
点击此处可从《科学技术与工程》浏览原始摘要信息
点击此处可从《科学技术与工程》下载免费的PDF全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号