• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

Computer Engineering & Science ›› 2020, Vol. 42 ›› Issue (07): 1191-1196.

Previous Articles     Next Articles

Design and implementation of a high  level code clone detection method

ZOU Yue, WU Ming, XU Yun   

  1. (1.School of Computer Science,University of Science and Technology of China,Hefei 230027;

    2.Key Laboratory of High Performance Computing of Anhui Province,Hefei 230026,China)



  • Received:2019-12-23 Revised:2020-02-24 Accepted:2020-07-25 Online:2020-07-25 Published:2020-07-24

Abstract: Code clone detection is a basic research in software engineering, and it is widely used in software analysis and maintenance. At present, for detecting high-level clone with text difference, namely type-3/type-4 clone defined in the academic field, the existing methods have the problem of low detection rate (recall rate). The PDG (Program Dependency Graph) based detection methods are very important in high-level clone detection area, but these methods mostly rely on the accurate graph matching algorithms such as subgraph isomorphism, which have high time complexity and low recovery. Therefore, we propose a novel high-level code clone detection method, which uses the approximate graph matching algorithm based on Weisfeiler -Lehman graph kernel to detect clones. The experimental results show that our method can detect more high-level clones and run faster than the existing methods.


Key words: code clone detection, program dependency graph, Weisfeiler-Lehman graph kernel