Design pattern detection using a DSL-driven graph matching approach

Abstract

Knowledge about design pattern (DP) instances improves program comprehension and reengineering of object-oriented systems. Effectively, it helps to discover developer design decisions and trade-offs that often are not documented. This work describes an approach to automatically detect DPs in existing object-oriented systems by tracing systems’ source code components with the roles they play in the patterns. In the proposed approach, DPs are modeled based on their high-level structural properties (e.g., inheritance, dependency, invocation, delegation, type nesting, and membership relationships) that are checked, by source code parsing, against the system structure and components. Moreover, the approach can also detect pattern variants, defined by overriding the pattern properties. This paper presents a description of the approach, provides a brief description of the supporting tool, and discusses the results from the experiments carried out to validate it. The approach was validated on seven systems of an open benchmark that contains systems of increasing sizes. For five additional systems, the results have been compared with the ones from a similar approach existing in the literature. The obtained results, the identified DP variants, and the effectiveness of the approach are thoroughly presented and discussed.

Publication
In Journal of Software Evolution and Process, Wiley
Date
Links