Journal of Jilin University(Information Science Ed ›› 2014, Vol. 32 ›› Issue (1): 95-100.

Previous Articles     Next Articles

Program Similarity Detection Based on Syntax Tree

SHI Ye, HUANG Long-he, CHE Tian-yang, GAO Si, WANG Jian   

  1. College of Computer Science and Technology, Jilin University, Changchun 130012, China
  • Received:2012-11-09 Online:2014-01-24 Published:2014-04-03

Abstract:

In the view of the code clone and software piracy, we analyzes three kinds of traditional similarity detection method based on program structure, then put forward a similarity detection method based on syntax tree of program. In the method, the source code is parsed and a syntax tree is produced for it. Then the similarity of source codes is calculated by analyzing the structures of their syntax trees. The senior copy means are eliminated from the angle of syntax structure. By using a set of plagiarized scripts as testing programs, the experimental results show that the similarity detection method based on syntax tree is effective to detect 10 kinds of plagiarism means code plagiarism, such as adding redundant statements and replacing control structures with equivalent structures.

Key words: code clone, program structure, similarity detection

CLC Number: 

  • TP301