Fig 1 - uploaded by Amr Kamel
Content may be subject to copyright.
Class diagram of strategy design pattern.

Class diagram of strategy design pattern.

Source publication
Article
Full-text available
This paper presents an approach to detect behavioral design patterns from source code using static analysis techniques. It depends on the concept of Code Property Graph and enriching graph with relationships and properties specific to Design Patterns, to simplify the process of Design Pattern detection. This approach used NoSQL graph database (Neo4...

Contexts in source publication

Context 1
... below class diagram ( Fig. 1) shows the structure of the Strategy Design Pattern. ...
Context 2
... steps to construct these new relations (Fig. 10) ...
Context 3
... Caller Method and Callee Method (Step "h.iii"). m) Create a link between Call Site (Step "c") and Callee Method (Step "h.iii"). After enriching phase, the code graph is ready for the detection phase, the detection phase for State and Strategy design patterns is divide into two steps, first step to detect candidates that can be State or Strategy (Fig. 11), this step captures the structure of these design patterns. The second step is for differentiating between State and Strategy patterns. f) Check of methods from step (c) includes the client method from pattern ...

Citations

Article
Full-text available
Design patterns are common solutions to existing issues in software engineering. In recent decades, design patterns have been researched intensively because they increase the quality factors of software systems such as flexibility, maintainability, and reusability. Design pattern detection refers to the determination of the symmetry between a code fragment and the definition of a design pattern. One of the major challenges in design pattern detection is how to obtain accurate information about the design patterns used in the software system due to the existence of different design pattern variants. Increasing the number of design pattern variants covered by a detection method is one of the main factors that increase its accuracy. In this paper, a step toward solving this challenge was taken by proposing a new feature-based method that builds on concrete definitions of existing design pattern variants and supports the definition and detection of new variants. In this proposed method, the needed features are extracted from the signatures of the design patterns. This method was applied to the 23 Gang of Four (GoF) design patterns and evaluated using four open-source Java projects. Afterward, it was compared with some previous methods using automatically generated testbeds. The experimental results demonstrated that the proposed method has better performance in terms of precision and recall compared to the other methods.