Font Size: a A A

Research On An Approach For Identifying Code Refactoring Change Patterns

Posted on:2019-03-17Degree:MasterType:Thesis
Country:ChinaCandidate:M R SunFull Text:PDF
GTID:2428330548986988Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
Code refactoring is an important means of code adjustment for improve software quality.By adjusting the internal structure of software,the intelligibility,maintainability and extensibility of software can be improved,it does not change the external behavior of software.It provides a code collation technology of higher and controlled.The purpose is to make the original code clearer,and the structure is more reasonable.When the requirements changed and modified the code or adding functionality on the basis of existing software,the project can be implemented smoothly.Software refactoring is widely used in daily software development and maintenance.Code refactoringchanged patterns is the inverse process of code refactoring.Understanding the refactoring activities is a valuable piece of information for code changed.It can help researchers understand the changed process of software evolution.How do the developer do refactoring,the use of refactoring tools,refactoring driven motivation,refactoring risk,the impact of refactoring on the quality of the code.In addition,which refactoring patterns are used In the history of the system version helps to carry out the actual task.at present,there are no substantive study about that various refactoring patterns handled the frequency of the use of various code bad.We need to use different refactoring patterns to adjust the bad smell of codes,in different application scenarios.Located the refactoring patterns of code changes,and recommends different refactoring techniques.Research on these problems can help refactoring patterns recognition algorithm to better identified the opportunity for code refactoring,recommend better refactoring skills.This paper analyzes the refactoring patterns operation on 4 open source projects.It is observed that over 95% of the refactoring operations are dealing with bad code caused by repetitive code.Such as: extract method,extract class,move method,extract superclass and other refactoring patterns.To identify the operation of various refactoring patterns in open source projects.A method of refactoring patterns identified is proposed.it based on both Fine-grained identification code change and text similarity comparison is used to judge the extraction relation between text blocks.This method refatoring patterns identify by comparing the history of two adjacent files in software.According to the characteristics of each refactoring patterns,extract method and move method together are to identify,extract class and extract superclass together are to identify.Secondly,by statistical analysis of the measured data,In all the refactoring patterns,the extract method was 17%,the move method was 0.5%,extract class was 47.2%,and the extract Superclass was 27.4%.This explains that extract class is the most commonly used refactoring method in the bad taste of code caused by duplication of code,generally not using the move method.
Keywords/Search Tags:Refactoring patterns, Extract Method, Extract Class, Move Method, Extract Superclass
PDF Full Text Request
Related items