Sie befinden Sich nicht im Netzwerk der Universität Paderborn. Der Zugriff auf elektronische Ressourcen ist gegebenenfalls nur via VPN oder Shibboleth (DFN-AAI) möglich. mehr Informationen...
A declarative approach to detecting design patterns from Java execution traces and source code
Ist Teil von
Information and software technology, 2024-07, Vol.171, p.107457, Article 107457
Ort / Verlag
Elsevier B.V
Erscheinungsjahr
2024
Link zum Volltext
Quelle
Alma/SFX Local Collection
Beschreibungen/Notizen
Design patterns are invaluable for software engineers because they help obtain well-structured and reusable object-oriented software components and contribute towards ease of software comprehension, maintenance, and modification. However, identifying design patterns from an inspection of the source code is not easy because, in most cases, there are no syntactic cues that signal their presence. This topic has therefore elicited considerable interest in the field. The novel aspect of our work is that we propose a set of primitives using which we can declaratively specify design patterns based on a combination of static and dynamic information. Our experimental work is carried out in the context of Java: static information is extracted from Java source code, and dynamic information from an execution trace of a program. Each declarative pattern specification is automatically translated into an SQL query which retrieves all instances of the design pattern present in the program. We illustrate our approach with the well-known Gang-of-Four design patterns and the approach extends to other such design patterns. The experimental results show the efficacy of our approach for representative programs for all GoF patterns in addition to more extensive case studies, JHotDraw, Junit, and QuickUML.