Font Size: a A A

Research Of Identifying Program Code Similarity

Posted on:2007-02-28Degree:MasterType:Thesis
Country:ChinaCandidate:H Y YuFull Text:PDF
GTID:2178360185462153Subject:Education Technology
Abstract/Summary:PDF Full Text Request
Identifying program code similarity is to measure similar degree between two program codes with a kind of detection method. Identifying the similarity of C programming language source codes are focused on in this thesis. The theory foundation, technology supporting and experiment test of making similarity and every function module and concrete implement of this project are mainly introduced.Using the combined method of attribute counting and structure metrics to identify similarity can improve the precision and efficiency of detection. Attribute counting counts Halstead profile (including number of token occurrences, number of unique tokens, Halstead volume), physical profile (including line count, word count, character count), composite profile (Physical + Halstead profile) and can obtain the attribute similarity. Structure metrics which using the longest common subsequence algorithm calculates the optimized value (length) of the longest, strictly incremental, common token subsequence of the ordered token sets according to the top-to-bottom order of the statements and the left-to-right order of the code line of two programs and constructs the longest common token subsequence of two programs can obtains the structure similarity. This project can automatically achieve the code similarity of input programs. Teacher can analyses the thing of student's finishing the programming assignment and holding on programming contents with the similarity of program code, which can promote the development of teaching and the validity of evaluating. Similarity of program code can also be applied in the related research fields, such as program copy detection and detecting the effect of cooperative...
Keywords/Search Tags:Attribute account, Structure metrics, Program code similarity
PDF Full Text Request
Related items