arrow
Return

A declarative approach to detecting design patterns from Java execution traces and source code

delete2024-07-01
delete0
PRE
AI
A
Aswathy Mohan
J
Jayaraman, Swaminathan *
B
Bharat Jayaraman
DOI:10.1016/j.infsof.2024.107457delete
deleteOriginal
deleteOriginal request for help
deleteShare
deleteSave
Abstract

Abstract

En 中文
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.
Keywords:
Augmented call tree
Declarative specification
Design pattern detection
Execution trace
Gang-of-Four patterns
Java
JIVE
Object-oriented software
SQL query
Structure and behavior

Journal

Information and Software Technology cover
Information and Software Technology
IF:
4.3
Papers:
3.8K
Citations:
7.7K

Organization

A
Amrita Vishwa Vidyapeetham
Scholars:
7.0K
Papers: 4.2K
Citations: 3.3K
Cited Papers

Cited Papers

Design pattern recovery through visual language parsing and source code analysis
err2009-07-01
err65
PREAI
errDe Lucia, Andrea; Deufemia, Vincenzo; Gravino, Carmine; Risi, Michele
errShare
errSave
errShare
errSave
Design pattern recovery based on annotations
err2010-04-01
err37
PREAI
errRasool, Ghulam; Philippow, Ilka; Maeder, Patrick
errShare
errSave
errShare
errSave
Pathogenicity and race characterization of Fusarium oxysporum f. sp. phaseoli isolates from Spain and Greece
err2002-10-04
err0
PREAI
errF. M. Alves‐Santos; L. Cordeiro‐Rodrigues; J. M. Sayagués; R. Martín‐Domínguez; P. García‐Benavides; M. C. Crespo; J. M. Díaz‐Mínguez; A. P. Eslava
errShare
errSave
Contribution of ankle motion pattern during landing to reduce the knee-related injury risk
err2024-09-01
err0
PREAI
errDatao Xu; Huiyu Zhou; Meizi Wang; Xin Ma; Fekete Gusztav; Teo-Ee Chon; Justin Fernandez; Julien S. Baker; Yaodong Gu
errShare
errSave
Identification of design motifs with pattern matching algorithms
err2010-02-01
err13
PREAI
errKaczor, Olivier; Gueheneuc, Yann-Gael; Hamel, Sylvie
errShare
errSave
errShare
errSave
researcher View more