A Code Comparison Algorithm Based on AST for Plagiarism Detection

Jianglang Feng, Baojiang Cui, Kunfeng Xia · 2013

Plagiarism detection technology plays a very important role in copyright protection of computer software. The plagiarism technology mainly includes text-based, token-based and syntax-based technologies. This paper will introduce a technique based on the Abstract Syntax Tree (AST). This algorithm based on AST can effectively detects the plagiarism cases of changing the names of methods and variables in the code, reordering the sequences of the code and so on. According to algorithm of the Abstract Syntax Tree, we will calculates hash values of every node in the AST, then store the AST, and compare the hash value node by node after completing all of the above. Finally, we will use the experiments to illustrate the superiority of the AST algorithm.

Read the paper · More papers on PaperTik