摘要
为了检测程序设计类课程中出现的作业抄袭行为,提出了基于抽象语法树的抄袭检测方法。运用语法分析工具对代码进行语法分析生成抽象语法树(AST),通过计算生物学中序列匹配的算法进行程序相似度的计算。提取程序相似部分的AST特征,生成空间向量,聚类分析找出"抄袭团伙"。实验结果表明,该方法对抄袭行为具有较好的检测效果,并能比较准确地找到"抄袭团伙"。
To detect plagiarism on programming course, a AST-based plagiarism detection method is proposed. Firstly, the code is parsed by syntax analysis tool to generate the corresponding abstract syntax tree (AST). Biology sequence matching algo rithms are used to calculate the similarity of the program. The similar part of the code is found, and then the AST feature is ex tracted in this part. A vector space model is generated, and then "copy cluster" is found by clustered the feature. Experiments show that this method has a good effect on the detection of plagiarism and can find the "copy cluster" accurate.
出处
《计算机工程与设计》
CSCD
北大核心
2012年第4期1660-1664,共5页
Computer Engineering and Design
基金
国家自然科学基金项目(60940027)
内蒙古自然科学基金项目(2010MS0906)