Font Size: a A A

A Textual-based Platform For Online Code Smell Detection And Visualization

Posted on:2022-04-14Degree:MasterType:Thesis
Country:ChinaCandidate:K X WuFull Text:PDF
GTID:2518306725984649Subject:Master of Engineering
Abstract/Summary:PDF Full Text Request
With the rapid development of computer technology,people have higher and higher requirements for code quality.Code smell is a code quality defect caused by the developer's design flaws or the developer's failure to follow good coding rules.It will not cause the program to run wrong,but will reduce the readability,reusability,extensibility and other quality attributes of the program,and increase the cost of future software maintenance.As a result,developers need to use code smell detection tools to detect code smells and refactor code to improve code quality and reduce the cost of maintenance.In order to help developers detect code smells,researchers have implemented a variety of code smell detection tools.Recent studies have shown that compared with structural smells detected by the structural information,textual smells detected by the textual information are more comprehensible and easier to be understood and refactored by developers.However,at present,almost all code smell detection tools choose structural attributes of code as metrics,and it can only detect structural smells of code.Although the textual-based technique for smell detection has been proposed,there is currently no widely accepted textual smell detecting tool.Therefore,how to help developers detect and refactor textual smells of code is an urgent problem to be solved.In addition,the existing code smell detection tools still have some problems,mainly reflected in the following:(1)it can not save the analyzed results.When the same project is analyzed again,the code will be recalculated.It is a waste of time and resources;(2)the local tools in the form of plug-ins or clients are difficult to support multiple people to learn and understand the smells in the same code;(3)it do not provided smell information of history code and code refactoring clues,so the developers cannot know the smell change trend,the time when the smell was introduced,and other information.Thus,it fail to help developers understand and refactor smells.Based on the analysis of above problems,our solutions are as follows :(1)We use a textual-based technique for smell detection;(2)User accounts are introduced to save users' code data and smell data,so as to reduce the waiting time of users for recalculating,and improve user experience;(3)We will implement a platform for textual smell online detection and visualization to detect textual smells of code.Users can comment on smells,and see other users' comments on smells,which facilitates the communication and learning of textual smells among multiple users;(4)Users can detect the smell of history code.Through data statistics,developers can understand the historical change trend of the smell.From the historical change trend,developers can know not only the reason why the smell was introduced or eliminated but also refactoring clues,which is conducive to users' learning and understanding of textual smells.According to the above scheme,we have implemented a textual-based platform for code smell online detection and visualization.The specific work is as follows:1.The platform use a textual-based technique for smell detection.2.The platform assigns a unique identity to each user.When the user analyzes the code,the platform will save the result of the code data and the analyzed results,so that subsequent users can directly view the smell information of the code,avoiding the waiting time of recalculating when users analyze the same project.3.Users can view details of the code smell of different versions of code from the statistics chart,including code content,refactoring clues,smell comments and other information.Users can also add comments on smells,which helps users to communicate and understand smells.4.Users can view the smell trend chart of the historical code,and they can search,screen and view the smell statistics chart on the nodes of the smell trend chart,which is conducive to users' learning and understanding of code smells.
Keywords/Search Tags:Code quality, Code smell, Structural smell, Textual smell, Code refactoring
PDF Full Text Request
Related items