Font Size: a A A

Techniques Of Evaluating Software Evolution Based On Code Change Detection

Posted on:2020-12-12Degree:DoctorType:Dissertation
Country:ChinaCandidate:H H LiuFull Text:PDF
GTID:1368330626950320Subject:Software engineering
Abstract/Summary:PDF Full Text Request
In the lifecycle of modern software systems,due to bug fixing,feature enhancement,performance improvement,additional requirement and running environment alternation,software system must have strong evolvability,otherwise it will gradually decay and become harder to maintain,so that it may result in more and more maintenance effort overtime.In order to improve software evolvability and decrease evolution cost,many application scenarios(e.g.,inconsistent code changes,code refactoring gains et al)require to evaluate software evolution behavior characteristics and evolution effect in quantitative or qualitative way.In recent years,development data of open source software(OSS)are more easily available,which subsequently attracted more and more researchers to conduct software evolution evaluation via mining software repository.Their research topics included complexity evolution analysis,software change pattern mining,software evolution prediction as well as code evolvability analysis et al.However,there still existed two main issues towards OSS evolution evaluation as follows:(1)when evaluating software evolution,in most cases,code changes were directly extracted from version control system(e.g.,SVN,Git)which only stored code changes at file level or textual line level,meanwhile,such changes lack semantic information(i.e.,they can not reflect changes about program syntactic structure)and contain lots of noise.As a matter of fact,structural changes are more important to accurately understand the nature of software evolution;(2)the results of evolution evaluation lacked practical guidelines for software developers during software development.In order to solve aforementioned issues,this dissertation selected three commonly used code quality characteristics,i.e.,code cyclomatic complexity(CC),code replaceability,and code structure changeproneness,and then carried out evolution evaluation for their variation.It is expected that our empirical studies can provide a deeper understanding towards the law of software static evolution from code structure changes perspective.On the other hand,we hope that,the evolution evaluation framework and analysis tools developed in this dissertation can improve software evolvability and decrease software evolution cost.The main contents and contribution of this dissertation are listed as follows.(1)In terms of code cyclomatic complexity(CC)analysis and evaluation,this dissertation first defined the cyclomatic complexity of method and class based on extended control graph,and also classified them into three classifications in terms of CC grade,respectively,i.e.,Low,Medium and High.Then,based on code structure changes and Markov model,we analyzed the CC evolution characteristics at three levels of method,class and overall system,respectively.Experimental results on several OSS showed that:(a)in most cases,the cyclomatic complexity grades in recent version did not gradually grow overtime,but were born at the beginning of their creation;(b)the more frequently methods and classes were modified,the higher chance that their CCs would increase overtime;(c)towards factors leading to increasing of overall system CC,classes whose CC increased between two versions and added-classes almost made equal contribution;(d)there were some differences and commonalities between versions with respect to CC grades of method and class,respectively.(2)In terms of code replaceability evolution evaluation,this work first defined the class and package's replaceability based on code coupling and cyclomatic complexity.Then,we focused on analyzing the replaceability of class with different stereotypes,profiling replaceability characteristics for removed and added classes,and exploring the impact of packages designed by feature and by logical layer on their replaceability measures,and assessing how well the JREE tool supported software evolution evaluation process.Experimental results showed that:(a)classes with different stereotypes had divergent replaceability,their differences depended on the quantity of responsibilities taken by classes;(b)during software evolution,replaceability values of removed and added classes were significantly higher than other classes in their same package;(c)replaceability of package designed by feature was significantly higher than the one divided by logical layer;(d)JREE tool can help developers effectively find the root causes resulting in variation of replaceability.(3)In terms of code structure change-proneness prediction and evaluation,when considering change ripple effect and size(measured by lines of code)confounding variable,this dissertation comprehensively analyzed the impact of 13 kinds of bad smell on structural change-proneness.Then,we defined 5 kinds of new smell-evolution metrics based on smell evolution information and structure changes.Finally,we built a structure change-proneness prediction model with considering inspection effort using these smell-evolution metrics(termed as “S” model),and evaluated the prediction performance in the scenarios of ranking and classification.Experimental results showed that:(a)medium and large classes affecting with code smells were more subject to structure changes;(b)the more class contained smell instances,the more they were subject to structure changes;(c)we did not find that there existed significant relationship between each change type considered in this dissertation and “Crucial-Change”;(d)some smells had no positive or negative relationship with each change category,while some other smells indeed significantly increased changeproneness for particular change categories;(e)in comparison to basic prediction model(built based on CK metrics),effort-aware prediction model “S” showed significant superior performance in both ranking and classification scenarios.Therefore,in the practical application,when predicting changes with respect to “API”,“Functionality” and “State”,we recommended to employ “S” model,because such model can not only improve prediction performance,but also guide developers to refactor those most change-prone classes.
Keywords/Search Tags:code change detection, evolution evaluation, cyclomatic complexity, replaceability, code bad smell, change prediction
PDF Full Text Request
Related items