Font Size: a A A

A Similarity Evaluation Algorithm Of C Source Program Based On Code Fingerprint

Posted on:2017-10-18Degree:MasterType:Thesis
Country:ChinaCandidate:F LiuFull Text:PDF
GTID:2348330503972502Subject:Computer technology
Abstract/Summary:
In the teaching process, source code plagiarism is a behavior which is very complex and difficult to be defined, but also a very common phenomenon. With the rapid development of social networks, for the programming course, plagiarism has become increasingly simple. However, most universities in the domestic, source inspection still be determined by hand wholly. This article is to resolve this problem, improve existing detection dilemma, and propose a algorithm of code similarity detection.Through the analysis of the internal program structure and the external code organized rule, firstly, from the angle of variables change in the program, we put forward the concepts of variable table, variable item, variable string. Variable table is a specific forms of fingerprint code, and as an important tool for code detection. Secondly, according to the program rules of arrangement, we proposes a local independent similarity detection algorithm. It is used as core framework and mean of detection, and its main principle is to ignore the arrangement of elements in the local scope and only to focus on the combination of elements. For the code, we detecte the similarity by variable table and variable items. Thirdly, in order to facilitate the calculation of code similarity, a similarity measure formula is designed, which is a weighted average similarity. Finally, using the above definitions, methods and formulas, we design a similarity evaluation algorithm of c source program based on code fingerprint, and implement a code similarity detection system.Taking the test objects of C language program works from the undergraduates of grade 2012, computer science, and using the combination system detection and manual verification determine the similarity of the codes. All experiments show that it can deal with many kinds of plagiarism, and even various forms of equivalent transformation, and thus reflect the similarity between the codes more realistically.
Keywords/Search Tags:Source Plagiarism, Similarity Detection, Code Fingerprint, Variable Table, Local Independence Similarity Detection Algorithm
Related items