Font Size: a A A

Research And Realization Of Recognition Method On C Program Similar Code

Posted on:2009-07-18Degree:MasterType:Thesis
Country:ChinaCandidate:P ZhangFull Text:PDF
GTID:2178360242967435Subject:Detection Technology and Automation
Abstract/Summary:PDF Full Text Request
Recognition of program code similarity is to estimate the similarity and measure the similarity degree between two program codes with a kind of detection method. Aiming at the demands of program design's objectivity and authenticity in the computer teaching examination; Researching recognition method of C program code similarity and designing detection software for meaturing similarity degree.Realizing automatic detection of C code similarity degree in teaching evaluation and improving examination efficiency.According to similarity problem between two program codes, researching feature and types of similar code, attribute features, pretreatment of source program, attribute database establishment and evaluation standard of similarity degree. Combining attribute counting and object code compare to identify code similarity, which can realize the automatic acquisition of two input programs similarity degree and evaluation results. The application of Longest Common Subsequence algorithm can also compare the structure similarity of two C source programs. The system software design is based on .NET development platform, adopting object-oriented function modular design. On the basis of the attribute database establishment, five function modules including pretreatment module, attribute detection module, similar object code detection module and similarity evaluation module are designed and developed. Simple and friendly interface, shows data of similarity evaluation integrity and clearly, convenient for browsing and querying.Design of software recognition system has passed debugging. Test shows it can detect common copying C programs and enhance the identification ability to those who are a little more complex. The recognition software has high precision. Design and application of similar code detection and evaluation method has more practical value. In the weighing attribute recognition method, the weighing theory of attribute eigenvector is adopted to strengthen the infection of attribute elements with covert codes, make the similar codes estimation more objective, and improve the quality and veracity of the similarity recognition. Experiments show that the method can identify codes similarity such as the space characters, parameter variables and sentence sequence, improve integrated similarity degree by 4 percent compared with primary attribute recognition method. Comparing with ideality results, the measure precision in the cases of middle and high similarity degree can be up to at least 94 percent.
Keywords/Search Tags:Code Similarity Degree, Pretreatment Process, Attribute Eigenvector, Similarity Dgree Detection
PDF Full Text Request
Related items