Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Probabilistic detection of GoF design patterns

Published: 01 August 2022 Publication History

Abstract

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.

References

[1]
Dong J, Zhao Y, and Peng T a Review of design pattern mining techniques Int J Softw Eng Knowl Eng 2009 19 06 823-855
[2]
Rasool G and Streitfdert D A survey on design pattern recovery techniques J Comput Sci Issues 2011 8 6 251-260
[3]
Mayvan BB, Rasoolzadegan A, Yazdi ZG (2016) The state of the art on design patterns: a systematic mapping of the literature, J. Syst. Softw. 37.
[4]
Ampatzoglou A, Chatzigeorgiou A, Charalampidou S, and Avgeriou P The effect of GoF design patterns on stability: a case study IEEE Trans Softw Eng 2015 41 8 781-802
[5]
Chihada A, Jalili S, Hasheminejad SMH, and Zangooei MH design pattern detection from source code by classification approach Appl Soft Comput J 2015 26 357-367
[6]
Yu D, Zhang Y, and Chen Z A comprehensive approach to the recovery of design pattern instances based on sub-patterns and method signatures J Syst Softw 2015 103 1-16
[7]
Ren W, Zhao W (2012) An observer design-pattern detection technique, CSAE 2012—Proceedings, 2012 IEEE Int Conf Comput Sci Autom Eng, 3: 544–547,
[8]
Shi N (2005) Reverse engineering of design patterns for high performance computing, Patterns High Perform. Comput, pp. 1–6, 2005, [Online]. Available: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.137.782&rep=rep1&type=pdf
[9]
Travassos GH, Shull F, Fredericks M, and Basili VR Detecting defects in object oriented designs: using reading techniques to increase software quality Acm Sigplan Not 1999 34 10 47-56
[10]
Arcelli Fontana F and Zanoni M A tool for design pattern detection and software architecture reconstruction Inf Sci (Ny) 2011 181 7 1306-1324
[11]
Kludt SR Metrics and models in software quality engineering—kan, sh J Prod Innov Manag 1996 13 2 182-183
[12]
Gamma E, Helm R, Johnson R, Vlissides J (1996) Design Patterns: Elements of Reusable Software
[13]
Ampatzoglou A, Charalampidou S, and Stamelos I Research state of the art on GoF design patterns: a mapping study J Syst Softw 2013 86 7 1945-1964
[14]
Bafandeh Mayvan B and Rasoolzadegan A Design pattern detection based on the graph theory Knowledge-Based Syst 2017 120 211-225
[15]
De Lucia A, Deufemia V, Gravino C, and Risi M Design pattern recovery through visual language parsing and source code analysis J Syst Softw 2009 82 7 1177-1193
[16]
Rasool G, Philippow I, and Mäder P Design pattern recovery based on annotations Adv Eng Softw 2010 41 4 519-526
[17]
Nazar N, Aleti A, and Zheng Y Feature-based software design pattern detection J Syst Softw 2022 185
[18]
Dong J and Zhao Y Sun Y (2009) A matrix-based approach to recovering design patterns IEEE Trans Syst Man Cybern Part A Syst Humans 2009 39 6 1271-1282
[19]
Liu C A general framework to detect design patterns by combining static and dynamic analysis techniques Int J Softw Eng Knowl Eng 2021 31 1 21-54
[20]
Rasool G, Mader P (2011) Flexible design pattern detection based on feature types, 2011 26th IEEE/ACM Int Conf Autom. Softw Eng (ASE 2011), 243–252, 2011,
[21]
Thongrak M, Vatanawood W (2014) Detection of design pattern in class diagram using ontology, 2014 International Computer Science and Engineering Conference, ICSEC. 97–102.
[22]
De Lucia A, Deufemia V, Gravino C, Risi M (2009) Behavioral Pattern Identification through Visual Language Parsing and Code Instrumentation, 2009 13th Eur Conf Softw Maint Reengineering,
[23]
Shahbazi Z, Rasoolzadegan A, Purfallah Z, Jafari Horestani S (2021) A new method for detecting various variants of GoF design patterns using conceptual signatures, Softw Qual J,
[24]
Alnusair A, Zhao T, and Yan G Rule-based detection of design patterns in program code Int J Softw Tools Technol Transf 2014 16 3 315-334
[25]
Hayashi S, Katada J, Sakamoto R, and Kobayashi T Design pattern detection by using meta patterns IEICE—Trans Inf Syst 2008 4 933-944
[26]
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
[27]
Guéhéneuc YG and Antoniol G DeMIMA: a multilayered approach for design pattern identification IEEE Trans Softw Eng 2008 34 5 667-684
[28]
Sahraoui H, Zaidi F (2004) Fingerprinting Design Patterns, 11th Work Conf Reverse Eng, pp. 1–10
[29]
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,
[30]
Oruc M, Akal F, Sever H (2016) Detecting Design Patterns in Object-Oriented Design Models by Using a Graph Mining Approach, 2016 4th Int Conf Softw Eng Res Innov, pp. 115–121,.
[31]
Issaoui I, Bouassida N, and Ben-Abdallah H Using metric-based filtering to improve design pattern detection approaches Innov Syst Softw Eng 2014 11 1 39-53
[32]
Lanza M, Marinescu R, Ducasse S (2006) Object-Oriented Metrics in Practice. Springer.
[33]
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]
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
[35]
Jamali N, Sadegheih A, Lotfi MM, Wood LC, and Ebadi MJ Estimating the depth of anesthesia during the induction by a novel adaptive neuro-fuzzy inference system: a case study Neural Process Lett 2021 53 1 131-175
[36]
Yu D, Zhang Y, Chen Z (2015) A comprehensive approach to the recovery of design pattern instances based on sub-patterns and method signatures, J Syst Softw, 103(C): 1–16, 2015,
[37]
Issaoui I, Bouassida N, and Ben-abdallah H Predicting the existence of design patterns based on semantics and metrics Int Arab J Inf Technol 2016 13 2 310-319
[38]
Ferenc R, Beszédes Á, Fülöp L, and Lele J Design pattern mining enhanced by machine learning IEEE Int Conf Softw Maintenance ICSM 2005 2005 295-304
[39]
Uchiyama S, Kubo A, Washizaki H, and Fukazawa Y Detecting design patterns in object-oriented program source code by using metrics and machine learning J Softw Eng Appl J Softw Eng Appl 2014 7 7 983-998
[40]
Bafandeh Mayvan B, Rasoolzadegan A, Javan Jafari A (2020) Bad smell detection using quality metrics and refactoring opportunities, J Softw Evol Process, 32(8): 1–33, 2020,
[41]
Nazar N, Aleti A, Zheng Y (2020) Feature-Based Software Design Pattern Detection, pp. 1–15,
[42]
Tsantalis N, Chatzigeorgiou A, Stephanides G, and Halkidis ST Design pattern detection using similarity scoring IEEE Trans Softw Eng 2006 32 11 896-909
[43]
Dwivedi AK, Tirkey A, Ray RB, Rath SK (2017) Software design pattern recognition using machine learning techniques, in IEEE Region 10 Annual International Conference, Proceedings/TENCON, 2017, pp. 222–227.
[44]
Zanoni M, Perin F, Fontana FA, and Viscusi G Design pattern detection using a DSL-driven graph matching approach J Softw Evol Process 2014 26 12 1172-1192
[45]
Chihada A, Jalili S, Hasheminejad SMH, and Zangooei MH Source code and design conformance, design pattern detection from source code by classification approach Appl Soft Comput J 2015 26 357-367
[46]
Nazar N, Aleti A, Zheng Y (2020) Feature-Based Software Design Pattern Detection,.
[47]
Rasool G, Akhtar H (2019) Towards a catalog of design patterns variants,” Proc—2019 Int Conf Front Inf Technol FIT 2019, 156–161,.
[48]
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

Recommendations

Comments

Information & Contributors

Information

Published In

cover image The Journal of Supercomputing
The Journal of Supercomputing  Volume 79, Issue 2
Feb 2023
1222 pages

Publisher

Kluwer Academic Publishers

United States

Publication History

Published: 01 August 2022
Accepted: 11 July 2022

Author Tags

  1. GoF design patterns
  2. Design patterns detection
  3. Regression
  4. Probabilistic

Qualifiers

  • Research-article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 0
    Total Downloads
  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 15 Jan 2025

Other Metrics

Citations

View Options

View options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media