Font Size: a A A

The Program Automatically Detects The Duplicate Code

Posted on:2004-08-04Degree:MasterType:Thesis
Country:ChinaCandidate:H LiuFull Text:PDF
GTID:2208360092980599Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
In this thesis an automatic method which is used to detect the dis- contiguous parameterized duplication code is introduced. The content of the paper is divided into two parts. (1) An improved parameterized matching algorithm is constructed , the improvment is that extending the matching unit from the char to statement, as a result the transform function is redefined and the complexity of the algorithm is decreased, so it is fit for detecting the duplication codes in more large scale program. (2) A fragment combining algorithm is designed to judge the combined ability of the parameterized duplication code fragment which are found by the former method, so the discontiguous parameterized duplication code is detected. The analysis indicates that the new algorithm has an acceptable complexity . The improved parameterized matching algorithm has linear time and space complexity, fragment combining algorithm has 0(n2) time and space complexities(n is the number of statements of the function which the fragment belongs to ).
Keywords/Search Tags:duplication code, parameterized matching, suffix tree, control dependence, data dependence
PDF Full Text Request
Related items