Font Size: a A A

Research On Software Clone Genealogies Construction And Evolution Features Extraction

Posted on:2016-05-07Degree:MasterType:Thesis
Country:ChinaCandidate:Y TuFull Text:PDF
GTID:2308330464466288Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Code clones are identical or similar pieces of source code in software, which have an important impact in software development and maintenance. Although code clones may make software maintenance more difficult, aggressive refactoring or removing is not the best solution for all code clones. Many long-lived, unchanged clones are usually harmless, and refactoring such clones creates only additional effort. From the software maintenance perspective, it is desirable to fully understand the characteristics of clones and implement targeted clone management. As researches on clone evolution across multiple versions of a system can reveal the patterns and characteristics exhibited by clones as they evolve within a system, developers can use the results to manage clones more effectively. This paper aims to construct clone genealogies and extract evolution features of type-1 and type-2 function clones. The main work lists as below: 1. Get clone detection results of each version of a software system, and map clones between adjacent versions based on the token presentation of clones and some location attributes of clones, such as its contained filename. 2. Identify the clone evolution patterns for each evolution clue based on the mapping results, including same, add, subtract, consistent change and inconsistent change. The statistics of 9 open source systems show that the average percentage of this five evolution patterns are 80.90%, 8.33%, 8.01%, 2.48% and 0.28%, respectively. 3. Combine all of the results of each consecutive version by matching the id number of clone groups to get the clone genealogies. Experimental results show that, for steady evolution software systems, the size of clone genealogies is proportional to the number of versions.4. Extract several features of clone evolution based on genealogies. Analysis of the stability of clones evolution in 9 open source system show that the average lifetime of clones in current version is 72.54 percent of the total number of versions on average, and most of them do not change, which indicate that majority of clones can be well maintained. While some unstable clones may be defect potential, needs to be modified or refactored.
Keywords/Search Tags:code clone, clone genealogy, clone evolution, clone management, software maintenance
PDF Full Text Request
Related items