%A Tiantian WANG,Kechao WANG,Xiaohong SU,Peijun MA %T Detection of semantically similar code %0 Journal Article %D 2014 %J Front. Comput. Sci. %J Frontiers of Computer Science %@ 2095-2228 %R 10.1007/s11704-014-3430-1 %P 996-1011 %V 8 %N 6 %U {https://journal.hep.com.cn/fcs/EN/10.1007/s11704-014-3430-1 %8 2014-11-27 %X

The traditional similar code detection approaches are limited in detecting semantically similar codes, impeding their applications in practice. In this paper, we have improved the traditional metrics-based approach as well as the graphbased approach and presented a metrics-based and graphbased combined approach. First, source codes are represented as augmented system dependence graphs. Then, metricsbased candidate similar code extraction is performed to filter out most of the dissimilar code pairs so as to lower the computational complexity. After that, code normalization is performed on the candidate similar codes to remove code variations so as to detect similar code at the semantic level. Finally, program matching is performed on the normalized control dependence trees to output semantically similar codes. Experiment results show that our approach can detect similar codes with code variations, and it can be applied to large software.