Research of Identifying Program Code Similarity
- Author
- YuHaiYing
- Advisor
- LiuDongSheng
- School
- Inner Mongolia Normal
- Major
- Educational Technology
- Classification
- TP311.11 Programming method
- Degree
- Master's thesis
- Year
- 2006
- Downloads
- 379
- Citations
- 9
Abstract
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
Table of contents
The Chinese summary 3-4
ABSTRACT 4-9
Chapter Introduction 9-12
a problem raised -10
Second, the purpose of the study and significance the
III in this study , the concept 10-11
choice of development tools 11
five thesis Overview 11-12
program measurable attributes and related research 12-28
a program measurable properties 12-13
II study
13-23 , program code similarity applications in the field of research 23-26
Fourth , SQL language introduced 26
V , VB and database combined operation introduced 26-28
Chapter program code similarity obtain the theoretical basis 28 -38
characteristics of the C language program ( C language identifier token ) 28-30
Second, the program attribute similarity obtained theoretical basis 30 - 33
Third, the program structure similarity obtained theoretical basis ( longest common subsequence algorithm ) 33-38
Chapter program code similarity identification of the design and implementation of 38-47
a function of the design module Figure 38-39
Second, the design of the database 39
access program attribute similarity 39-43
four , program structure similarity obtain 43-45
five output module 45-47
Chapter experimental test data analysis 47-53
a simple program testing and analysis 47-49
II the batch program testing and analysis 49-53
sixth conclusions and future work 53-54
reference 54-57
degree during the published papers 57-58
Acknowledgements 58