|
计算机应用研究 2012
Research on detecting and validating design pattern instances from source code
|
Abstract:
Identifying design patterns from source code is one of the most promising methods for improving software maintainability, reusing experience and facilitating software refactoring. This paper presented an approach that combined static and dynamic analysis on detecting design patterns from java source code and illustrated the static structural analysis phase of identifying pattern candidates. Especially, to improve the detecting precision, the approach executed multiplicity analysis of object creation to validate creational pattern candidates and dynamic analysis to validate behavior pattern candidates. After the validation of behavior candidates, the approach distinguished those instances belonged to patterns which had similar structures but different behaviors successfully. Finally, this paper implemented a tool of extracting design pattern from java source code and the experiment results of applying it on an open source software showed the feasibility and availability of the approach.