Font Size: a A A

Analysis On Code Defect-Possibilities Based On Clone Mutation And Clone Migration

Posted on:2019-03-01Degree:MasterType:Thesis
Country:ChinaCandidate:K WangFull Text:PDF
GTID:2348330566459845Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Developers copy and change code segments to form code clone.Existing research shows that code clone has a dual role.On the one hand,code clone brings convenience to developers,which can reduce development time and improve work efficiency,then has a positive effect;on the other hand,code clone introduces defects and inconsistent changes in the code base,and the software stability poses a threat and has a negative effect.For the negative impact of code clone,researchers need to efficiently manage code clone.However,the software system contains a large number of code clones,which requires more research on code clone to provide reference.For research purposes,it is critical to understand cloning changes,consider the possibility of code clone defects,and perform cloning management in an orderly manner.The code defect analysis based on clone mutation and clone migration can not only analyze the changes of the code clone in the software evolution,but also analyze the code defect-possibilities of the clone mutation and clone migration to provide reference for the clone management and manage code clone more scientifically.This study aims to Type-1,Type-2,and Type-3 of code clones as research objects,and studies cloning mutation pattern recognition,clone migration pattern recognition,clone mutation analysis,and clone migration defect-possibilities analysis.The specific work is as follows:1.Based on previous research results FClones obtains Type-1,Type-2,and Type-3 of clone detection information,uses heuristic methods to label the code clone,associates the code clone with defects,and establishes clone mapping between adjacent versions,establishment of bases for defect-possibilities analysis of clone mutation and clone migration.2.Classify and identify clone mutation patterns based on the type of clone.The clone mutation patterns include: CCFE<1>,CCFE<2>,CCFE<3>,CCFE<1,2>,CCFE<1,3>,and CCFE<2,3>.Among them,CCFE indicates that the clone fragment is undergoing evolution(Changes of Clone Fragments in Evolutionary).Research on open source software written in six C languages found that the proportions of the above six clone mutation patterns were 5.743%,34.983%,26.645%,17.810%,9.230%,5.588%,respectively,and the average proportion of clone mutations was 32.628%.3.Classification and identification of clone migration patterns based on the trend of the average distance of the clones and the size of the clones.Clone migration patterns include: constant,stable,slightly increased,slightly reduced,increased,and decreased six.Based on the research of six open source software,the proportions of the above six clone migration patterns were 65.435%,18.868%,9.438%,1.773%,2.705%,and 1.78%,respectively,and the average proportion of clone migration was 34.565%.4.Based on the identified clone mutation patterns and clone migration patterns,the effects of different modes of clone mutations and different modes of clone migration were analyzed on the occurrence of clone evolution defects.By analyzing the defect-possibilities of clone mutations,it was found that the degree of influence of the clone mutation pattern on the code defects was different,in which CCFE<3> was more prone to defects than CCFE<2>,CCFE<1,2> and CCFE<1,3> than CCFE<2,3> are more likely to occur defects.Through the analysis of clone migration defect-possibilities,it was found that the impact of clone migration mode on the occurrence of defects was different,and modifying the position of clones would increase the risk of defects,the increase and the slightly increased clone migration patterns were more prone to defects.
Keywords/Search Tags:Code Clone, Clone Mapping, Clone Mutation, Clone Migration, Defect Analysis
PDF Full Text Request
Related items