Font Size: a A A

Research On Stability Of Clone Code Based On Bugs

Posted on:2018-07-21Degree:MasterType:Thesis
Country:ChinaCandidate:Y W ZhaoFull Text:PDF
GTID:2348330512996459Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Code cloning via copy-and-paste is a common practice in software engineering.Traditionally,this practice has been considered harmful,and a symptom that some important design abstraction is being ignored.As such,many previous studies suggest approaches to facilitate the d iscovery,removal,and refactoring of clones.However,not many studies exist that empirically investigate the relationship of code clones with code quality.Therefore,the cloning code stability analysis was carried out based on the vulnerab ility code density and the modified frequency of the clone code Bugs respectively.In this paper,we conduct an empirical study of 31 open source Java projects(1.7 MSLOC)to explore the relationship between code clones and a set of Bugs patterns reported by PMD.We found that:(i)the defect density in cloned code is 3.7 times less than that of the rest of the code;(ii)66% of the Bugs patterns associated with code clones are related to issues in coding style and practice,the two least problematic of the PMD categories,while that number is 49% for non-cloned code;and(iii)75% of the Bugs patterns in cloned code are duplicated without any changes,while 25% are only present in one of the clones.Focusing on the stability assessment methods of clone code have a few and low accuracy,which propose a method for evaluating the stability of clone code in this paper,it is based on the modification frequency of code files containing Bugs.Firstly,to obtain the software Bugs repair logs from software subversion management system and to standardize.Secondly,to obtain exp licit description information about software Bugs from Bugs' management system,and distill code files containing Bugs which associate Bugs ID and the Bugs ID in repair logs.Third ly,to obtain clone code in software system by using c lone detection tools,and draw clone and non-clone code containing by corresponding Bugs code file path containing Bugs;Finally,counting the modification frequency of clone and non-cloning code containing Bugs by making use of SVN diff tool,and to evaluate the stability of clone code.To 5 open source software with different languages test,Experimental results show that clone code is more stable than non-clone code,and the resulting Bugs hazard is relatively low,which provide the basis for management and maintenance of clone code.
Keywords/Search Tags:Code Clone, Stability Analysis, SVN, Fellegi-Sunter Model
PDF Full Text Request
Related items