Skip to main content
Top
Published in: The Journal of Supercomputing 2/2023

01-08-2022

Probabilistic detection of GoF design patterns

Authors: Niloofar Bozorgvar, Abbas Rasoolzadegan, Ahad Harati

Published in: The Journal of Supercomputing | Issue 2/2023

Log in

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

Abstract

Detecting design patterns from source code of software systems can help to understand the structure and the behavior of the software systems. The better understanding of software systems is helpful in reengineering and refactoring. As software progression, refactoring has become more valuable. One way to reduce the refactoring costs is to detect design patterns. The key criteria for accurately detecting design patterns is signatures. Achieving fine signatures is not an easy forward task. Instead of improving signatures, more accurate detection can be achieved by having probabilistic viewpoints. Since each of the design patterns has variants or may be implemented differently, having a probabilistic approach in detection can increase coverage as well as help in software refactoring. In this study, the main purpose is to identify the design patterns in source code with a non-crisp approach and measuring the possibility of the presence of the design patterns in the source code. Considering main body of design patterns and their corresponding signatures, design patterns are represented as appropriate features. We try to get features from design pattern signatures that do not change in the face of variations that occur during implementation. Then, through these features, the probability of presence of the roles forming the design patterns is determined, using neural network and regression analysis. After this step, using probabilistic graphical models the probability of presenting design patterns in source code is measured. The results of the proposed method show the similarity of each code to the design patterns in the range between 0 and 1. The results of other valid methods are a subset of the results of proposed method. Results that are 50% to 100% similar to the design patterns are presented in the evaluation section.

Dont have a licence yet? Then find out more about our products and how to get one now:

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Literature
2.
go back to reference Rasool G, Streitfdert D (2011) A survey on design pattern recovery techniques. J Comput Sci Issues 8(6):251–260 Rasool G, Streitfdert D (2011) A survey on design pattern recovery techniques. J Comput Sci Issues 8(6):251–260
12.
go back to reference Gamma E, Helm R, Johnson R, Vlissides J (1996) Design Patterns: Elements of Reusable Software Gamma E, Helm R, Johnson R, Vlissides J (1996) Design Patterns: Elements of Reusable Software
13.
go back to reference Ampatzoglou A, Charalampidou S, Stamelos I (2013) Research state of the art on GoF design patterns: a mapping study. J Syst Softw 86(7):1945–1964CrossRef Ampatzoglou A, Charalampidou S, Stamelos I (2013) Research state of the art on GoF design patterns: a mapping study. J Syst Softw 86(7):1945–1964CrossRef
17.
go back to reference Nazar N, Aleti A, Zheng Y (2022) Feature-based software design pattern detection. J Syst Softw 185:111179CrossRef Nazar N, Aleti A, Zheng Y (2022) Feature-based software design pattern detection. J Syst Softw 185:111179CrossRef
25.
go back to reference Hayashi S, Katada J, Sakamoto R, Kobayashi T (2008) Design pattern detection by using meta patterns. IEICE—Trans Inf Syst 4:933–944CrossRef Hayashi S, Katada J, Sakamoto R, Kobayashi T (2008) Design pattern detection by using meta patterns. IEICE—Trans Inf Syst 4:933–944CrossRef
26.
go back to reference Cointe HAP, Jussien YGN, Cedex N (2001) Instantiating and detecting design patterns : putting bits and pieces together, Proc 16th Annu Int Conf Autom Softw Eng (ASE 2001), pp. 166–173 Cointe HAP, Jussien YGN, Cedex N (2001) Instantiating and detecting design patterns : putting bits and pieces together, Proc 16th Annu Int Conf Autom Softw Eng (ASE 2001), pp. 166–173
28.
go back to reference Sahraoui H, Zaidi F (2004) Fingerprinting Design Patterns, 11th Work Conf Reverse Eng, pp. 1–10 Sahraoui H, Zaidi F (2004) Fingerprinting Design Patterns, 11th Work Conf Reverse Eng, pp. 1–10
29.
go back to reference von Detten M, Becker S (2011) Combining clustering and pattern detection for the reengineering of component-based software systems, Proc Jt ACM SIGSOFT Conf.—QoSA ACM SIGSOFT Symp—ISARCS Qual. Softw. Archit.—QoSA Archit Crit Syst—ISARCS—QoSA-ISARCS ’11, p. 23, https://doi.org/10.1145/2000259.2000265 von Detten M, Becker S (2011) Combining clustering and pattern detection for the reengineering of component-based software systems, Proc Jt ACM SIGSOFT Conf.—QoSA ACM SIGSOFT Symp—ISARCS Qual. Softw. Archit.—QoSA Archit Crit Syst—ISARCS—QoSA-ISARCS ’11, p. 23, https://​doi.​org/​10.​1145/​2000259.​2000265
33.
go back to reference Blewitt A, Bundy A, Stark I (2005) Automatic Verification of Design Patterns in Java Categories and Subject Descriptors, ASE ’05 Proc 20th IEEE/ACM Int Conf Autom Softw Eng, pp. 224–232 Blewitt A, Bundy A, Stark I (2005) Automatic Verification of Design Patterns in Java Categories and Subject Descriptors, ASE ’05 Proc 20th IEEE/ACM Int Conf Autom Softw Eng, pp. 224–232
34.
go back to reference Niere J, Sch W, Wadsack JP, Wendehals L, Welsh J (2002) Towards Pattern-Based Design Recovery, ICSE ’02 Proc 24th Int Conf Softw Eng, pp. 338–348 Niere J, Sch W, Wadsack JP, Wendehals L, Welsh J (2002) Towards Pattern-Based Design Recovery, ICSE ’02 Proc 24th Int Conf Softw Eng, pp. 338–348
48.
go back to reference Mayvan BB, Rasoolzadegan A, Ebrahimi AM (2019) A new benchmark for evaluating pattern mining methods based on the automatic generation of Testbeds, Inf Softw Technol Mayvan BB, Rasoolzadegan A, Ebrahimi AM (2019) A new benchmark for evaluating pattern mining methods based on the automatic generation of Testbeds, Inf Softw Technol
Metadata
Title
Probabilistic detection of GoF design patterns
Authors
Niloofar Bozorgvar
Abbas Rasoolzadegan
Ahad Harati
Publication date
01-08-2022
Publisher
Springer US
Published in
The Journal of Supercomputing / Issue 2/2023
Print ISSN: 0920-8542
Electronic ISSN: 1573-0484
DOI
https://doi.org/10.1007/s11227-022-04718-7

Other articles of this Issue 2/2023

The Journal of Supercomputing 2/2023 Go to the issue

Premium Partner