Improved Plagiarism Detection Algorithm Based on Abstract Syntax Tree
Guo Tao, Dong Guowei, Qin Hu, Baojiang Cui · 2013
Statements with conditionals are widely used in C, C++ and java, such as if and while statements and they are easy to plagiarize by adjusting the logical structure of the corresponding statements. However, the existing relative algorithms and tools cannot effectively detect code plagiarism of these statements. This paper puts forward an improved code plagiarism detection algorithm based on abstract syntax tree. The algorithm calculates the hash value for each node of the abstract syntax tree, and compares the hash values node by node. Based on this, it analyzes the if-statement plagiarism, as if-statements are representative in the statements with conditionals, and puts forward the corresponding detection schemes in order to detect plagiarism effectively. After that, with the results of many experiments, the algorithm is proved effective on detecting if-statement plagiarisms.