Font Size: a A A

A Degree-driven Approach To Design Pattern Mining And Customized Refactoring Based On Templates

Posted on:2019-01-18Degree:MasterType:Thesis
Country:ChinaCandidate:P ZhangFull Text:PDF
GTID:2428330548476450Subject:Computer technology
Abstract/Summary:PDF Full Text Request
Good design patterns play a crucial role in the maintenance,upgrade and refactoring of software systems.However,many legacy systems are not clear to the original design decisions due to the lack of specification and documentation of the development process,which increases the difficulty of software maintenance.By detecting the design patterns in the system,software engineers can understand the system structure and reduce the difficulty of the software maintenance.This paper presents a degree-driven pattern mining method based on graph matching,which mines design pattern instances from source code.In the meantime,a customized refactoring template is provided for each type of the design pattern instances that have been mined so that the user can refactor the design pattern according to the requirement.The main work and research results of this paper are as follows:1)An efficient method of subgraph mining based on subsystems graph and optimal search order is proposed.First,four kinds of structural features and seven kinds of behavioral characteristics of the design pattern are obtained.Secondly,the software system is transformed into a data graph,which is divided into several subsystems graph for eliminating irrelevant classes in the system to reduce the search space.According to the structure and behavioral characteristics of design patterns,the search order of design patterns is constructed,so as to mine the candidate design patterns.2)13 kinds of basic operations and 10 kinds of combinational operations are classified for design pattern code refactoring are proposed.Based on these operations,a series of customized refactoring templates for different Go F design patterns are obtained.According to the refactoring template,the detected design pattern instances can be reconstructed according to user requirements.3)A complete design pattern mining tool for 23 kinds of Go F design patterns,using cross-validation of the structure and behavior is implemented.The tool combines structural and behavioral characteristics of general interest effectively.Experimental results show that the accuracy of this method reaches 100%,the recall rate increases by 5% and the time efficiency by 10% compared with the existed method.At the same time,the developed prototype refactoring system also validates the validity of the template-based refactoring framework and process proposed in this paper.
Keywords/Search Tags:Design pattern mining, Graph matching, Data graph, In-degree, Out-degree, Design pattern reconstruction
PDF Full Text Request
Related items