Code Comparison System based on Abstract Syntax Tree

Baojiang Cui,Jiansong Li,Tao Guo,Jianxin Wang
DOI: https://doi.org/10.1109/ICBNMT.2010.5705174
2010-01-01
Abstract:The code comparison technology plays a very important part in the work of plagiarism detection and software evaluation. Software plagiarism mainly appears as copy-and-paste or with a little modification after this, which will not change the function of the code, such as replacing the name of methods or variables, reordering the sequence of the statements etc. This paper introduces a plagiarism detection tool named CCS (Code Comparison System) which is based on the Abstract Syntax Tree (AST). According to the syntax tree's characteristics, CCS calculates their hash values, transforms their storage forms, and then compares them node by node. As a result, the efficiency improves. Moreover, CCS preprocesses a large amount of source code in its database for potential use, which also accelerate the course of plagiarism detection. CCS also takes special measurement to reduce mistakes when calculating the hash values of the operations like subtraction and division. It performs well in the code comparison field, and is able to help with the copyright protecting of the source code.
What problem does this paper attempt to address?