Font Size: a A A

Research On The Recovery Of Design Pattern Instances Based On Sub-patterns And Method Signatures

Posted on:2016-12-24Degree:MasterType:Thesis
Country:ChinaCandidate:Y Y ZhangFull Text:PDF
GTID:2308330467482344Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Design patterns are formalized best practices that address concerns related tohigh-level structures for applications being developed. In recent years, designpatterns have been widely applied to software development. It brings softwaredevelopers much convenience, but it also causes some new problems. For example,when the usage information of design patterns is missing, it will greatly reduce theunderstandability and maintainability of the system. Therefore, the efficient andaccurate recovery of design pattern instances will significantly facilitate programcomprehension and software reengineering. However, the recovery of design patterninstances is not a straightforward task. In this paper, we present a novelcomprehensive approach to the recovery of instances of23GoF design patterns fromsource codes.The key point of the approach lies in that we consider different design patterninstances consist of some commonly recurring sub-patterns that are easier to bedetected, and we define23kinds of structural feature models to represent thestructural features of design patterns based on sub-patterns. In this paper we firsttransform the source codes and predefined patterns into graphs. We then identify theinstances of sub-patterns that would be the possible constituents of pattern instancesvia graph isomorphism based on prime number. The sub-pattern instances are furthermerged by the joint classes to see if the collective matches one of the predefinedpatterns. In order to further improve the precision, we compare the behavioralcharacteristics of method invocation with the predefined method signature templatesto obtain the final pattern instances directly. Compared with existing approaches, onthe one hand, the method of combining sub-pattern instances to pattern instances hasreduced the search space. On the other hand, we employ the method signatures toinvestigate the behavioral features to avoid choosing the test cases with full codecoverage, which reduce the difficulty of design pattern detecting work.Finally, we implemented a design pattern instances detection tool based on theresearch of the structural characteristics and behavioral information of designpatterns. The results of the extensive experiments on recovering pattern instancesfrom nine open source software systems demonstrate that our approach obtains the balanced high precision and recall.
Keywords/Search Tags:design patterns, design pattern recovery, sub-patterns, graph mining, method signature
PDF Full Text Request
Related items