Font Size: a A A

Design And Implementation Of An Approach To Presenting Code Refactoring Based On Hunks

Posted on:2020-12-03Degree:MasterType:Thesis
Country:ChinaCandidate:W ShiFull Text:PDF
GTID:2428330575487999Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Code refactoring is a means of adjusting the structure of the software to improve the comprehensibility and maintainability of the software without changing the features of the software.Refactoring is universal in the process of software evolution.Detecting and removing complex code has become the basic work in the phase of software lifecycle reconstruction.Extracting the change data to visualize the changes when understanding the code changes will help the code refactoring analyst to distinguish which code has a refactoring relationship and help them to understand how the code is changed.The understanding of code changes is generally based on the text differentiation comparison tool,and various versions of the management tools are integrated with a text differentiation comparison tool to help users view the text code changes,and the basic unit of text differentiation comparison tool to process the output is hunk.Therefore,the analysis of the code refactoring pattern based on the hunk is beneficial to the integration into the version management tool in the future.In the process of code evolution,code changes are generated every day.The amount of refactoring code detected by the code refactoring detection tool is also huge.In order to quickly and massively browse data,the use of visualization technology is the preferred method.Visualization technology is to display qualitative or quantitative data in a graphical form,which enables users to quickly and extensively browse data and facilitate the understanding of code changes.However,the existing code visualization method only displays the changed text,and does not show the refactoring pattern before and after the code change,and does not exert the superiority of the visualization technology.This paper designs a code refactoring display method based on hunks,analyzes and processes two consecutive modified versions of a source code file,and displays the code refactoring existing in the code change process.Due to the variety of refactoring patterns and the different feature characteristics of different refactoring patterns,this paper studies and analyzes four common refactoring patterns and conducts experiments in four open source project warehouse data.The parameters of the refactoring pattern are grouped into the hunks of the refactoring relationship,and are displayed in an appropriate way.Demonstrate the relationship between the block and the class,so that the user can analyze and research the refactoring data.
Keywords/Search Tags:Code refactoring, Hunk, Refactoring pattern, Visual display
PDF Full Text Request
Related items