Skip to main content
Erschienen in: Software Quality Journal 3/2022

29.11.2021

A new method for detecting various variants of GoF design patterns using conceptual signatures

verfasst von: Zeinab Shahbazi, Abbas Rasoolzadegan, Zahra Purfallah, Somayeh Jafari Horestani

Erschienen in: Software Quality Journal | Ausgabe 3/2022

Einloggen

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Software design patterns are well-known solutions for solving commonly occurring problems in software design. Detecting design patterns used in the code can help to understand the structure and behavior of the software, evaluate the quality of the software, and trace important design decisions. To develop and maintain a software system, we need sufficient knowledge of design decisions and software implementation processes. However, the acquisition of knowledge related to design patterns used in complex software systems is a challenging, time-consuming, and costly task. Therefore, using a suitable method to detect the design patterns used in the code reduces software development and maintenance costs. In this paper, we proposed a new method based on conceptual signatures to improve the accuracy of design pattern detection. So we used the conceptual signatures based on the purpose of patterns to detect the patterns’ instances that conform to the standard structure of patterns, and cover more instances of patterns’ variants and implementation versions of the patterns and improve the accuracy of pattern detection. The proposed method is a specific process in two main phases. In the first phase, the conceptual signature and detection formula for each pattern is determined manually. Then in the second phase, each pattern in the code is detected in a semi-automatic process using the conceptual signature and pattern detection formula. To implement the proposed method, we focused on GoF design patterns and their variants. We evaluated the accuracy of our proposed method on five open-source projects, namely, Junit v3.7, JHotDraw v5.1, QuickUML 2001, JRefactory v2.6.24, and MapperXML v1.9.7. Also, we performed our experiments on a set of source codes containing the instances of GoF design patterns’ variants for a comprehensive and fair evaluation. The evaluation results indicate that the proposed method has improved the accuracy of design pattern detection in the code.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

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 "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!

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!

Anhänge
Nur mit Berechtigung zugänglich
Literatur
Zurück zum Zitat Al-Obeidallah, M. G., Petridis, M., & Kapetanakis, S. (2018). A multiple phases approach for design patterns recovery based on structural and method signature features. International Journal of Software Innovation (IJSI), 6(3), 36–52.CrossRef Al-Obeidallah, M. G., Petridis, M., & Kapetanakis, S. (2018). A multiple phases approach for design patterns recovery based on structural and method signature features. International Journal of Software Innovation (IJSI), 6(3), 36–52.CrossRef
Zurück zum Zitat Alex, B., Alan, B., & Ian, S. (2005). Automatic verification of design patterns in Java. In Proceedings of the 20th IEEE/ACM international Conference on Automated software engineering, Long Beach, CA, USA, (pp. 224–232). Association for Computing Machinery. https://doi.org/10.1145/1101908.1101943 Alex, B., Alan, B., & Ian, S. (2005). Automatic verification of design patterns in Java. In Proceedings of the 20th IEEE/ACM international Conference on Automated software engineering, Long Beach, CA, USA, (pp. 224–232). Association for Computing Machinery. https://​doi.​org/​10.​1145/​1101908.​1101943
Zurück zum Zitat Bernardi, M. L., Cimitile, M., Ruvo, G. D., Lucca, G. A. D., & Santone, A. (2015). Improving design patterns finder precision using a model checking approach. CAiSE Forum. Bernardi, M. L., Cimitile, M., Ruvo, G. D., Lucca, G. A. D., & Santone, A. (2015). Improving design patterns finder precision using a model checking approach. CAiSE Forum.
Zurück zum Zitat Binun, A. (2012). High accuracy design pattern detection. Ph.D thesis, Universit¨ats-und Landesbibliothek Bonn. Binun, A. (2012). High accuracy design pattern detection. Ph.D thesis, Universit¨ats-und Landesbibliothek Bonn.
Zurück zum Zitat Cutting, D. (2016). Enhancing legacy software system analysis by combining behavioural and semantic information sources. Ph.D. thesis, University of East Anglia (UEA), Cutting, D. (2016). Enhancing legacy software system analysis by combining behavioural and semantic information sources. Ph.D. thesis, University of East Anglia (UEA),
Zurück zum Zitat Dong, J., Lad, D. S., & Zhao, Y. (2007). DP-miner: Design pattern discovery using matrix. In Proceedings of the 14th Annual IEEE International Conference and Workshops on the Engineering of Computer-Based Systems (ECBS'07) (pp. 371–380) Dong, J., Lad, D. S., & Zhao, Y. (2007). DP-miner: Design pattern discovery using matrix. In Proceedings of the 14th Annual IEEE International Conference and Workshops on the Engineering of Computer-Based Systems (ECBS'07) (pp. 371–380)
Zurück zum Zitat Dong, J., Zhao, Y., & Peng, T. (2009). A review of design pattern mining techniques. International Journal of Software Engineering and Knowledge Engineering, 19, 823–855.CrossRef Dong, J., Zhao, Y., & Peng, T. (2009). A review of design pattern mining techniques. International Journal of Software Engineering and Knowledge Engineering, 19, 823–855.CrossRef
Zurück zum Zitat Dwivedi, A. K., Tirkey, A., & Rath, S. K. (2018). Software design pattern mining using classification-based techniques. Frontiers of Computer Science, 12(5), 908–922.CrossRef Dwivedi, A. K., Tirkey, A., & Rath, S. K. (2018). Software design pattern mining using classification-based techniques. Frontiers of Computer Science, 12(5), 908–922.CrossRef
Zurück zum Zitat Dwivedi, A. K., Tirkey, A., & Rath, S. K. (2019). Applying learning-based methods for recognizing design patterns. Innovations in Systems and Software Engineering, 15(2), 87–100.CrossRef Dwivedi, A. K., Tirkey, A., & Rath, S. K. (2019). Applying learning-based methods for recognizing design patterns. Innovations in Systems and Software Engineering, 15(2), 87–100.CrossRef
Zurück zum Zitat Fontana, F. A., Zanoni, M., & Maggioni, S. (2011b). Using design pattern clues to improve the precision of design pattern detection tools. Journal of Object Technology, 10(4), 1–31. Fontana, F. A., Zanoni, M., & Maggioni, S. (2011b). Using design pattern clues to improve the precision of design pattern detection tools. Journal of Object Technology, 10(4), 1–31.
Zurück zum Zitat Gamma, E., Helm, R., Johnson, R. E., & Vlissides, J. (1995). Design patterns: Elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc. Gamma, E., Helm, R., Johnson, R. E., & Vlissides, J. (1995). Design patterns: Elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc.
Zurück zum Zitat Guéhéneuc, Y.-G. (2007). P-MARt: Pattern-like Micro Architecture Repository. 1st EuroPLoP Focus Group on Pattern Repositories. Guéhéneuc, Y.-G. (2007). P-MARt: Pattern-like Micro Architecture Repository. 1st EuroPLoP Focus Group on Pattern Repositories.
Zurück zum Zitat Guéhéneuc, Y., & Antoniol, G. (2008). DeMIMA: A multilayered approach for design pattern identification. IEEE Transactions on Software Engineering, 34(5), 667–684.CrossRef Guéhéneuc, Y., & Antoniol, G. (2008). DeMIMA: A multilayered approach for design pattern identification. IEEE Transactions on Software Engineering, 34(5), 667–684.CrossRef
Zurück zum Zitat Jing, D., Yongtao, S., & Yajing, Z. (2008). Design pattern detection by template matching In Proceedings of the 2008 ACM symposium on Applied computing, Fortaleza, Ceara, Brazil, (pp. 765–769). Association for Computing Machinery. https://doi.org/10.1145/1363686.1363864 Jing, D., Yongtao, S., & Yajing, Z. (2008). Design pattern detection by template matching In Proceedings of the 2008 ACM symposium on Applied computing, Fortaleza, Ceara, Brazil, (pp. 765–769). Association for Computing Machinery. https://​doi.​org/​10.​1145/​1363686.​1363864
Zurück zum Zitat Liu, C., van Dongen, B. F., Assy, N., & van der Aalst, W. M. (2018). A framework to support behavioral design pattern detection from software execution data. ENASE (pp. 65–76). Liu, C., van Dongen, B. F., Assy, N., & van der Aalst, W. M. (2018). A framework to support behavioral design pattern detection from software execution data. ENASE (pp. 65–76).
Zurück zum Zitat Lucia, A., Deufemia, V., Gravino, C., & Risi, M. (2009). Behavioral pattern identification through visual language parsing and code instrumentation. In Proceedings of the European Conference on Software Maintenance and Reengineering, CSMR (pp. 99–108). https://doi.org/10.1109/CSMR.2009.29 Lucia, A., Deufemia, V., Gravino, C., & Risi, M. (2009). Behavioral pattern identification through visual language parsing and code instrumentation. In Proceedings of the European Conference on Software Maintenance and Reengineering, CSMR (pp. 99–108). https://​doi.​org/​10.​1109/​CSMR.​2009.​29
Zurück zum Zitat Lucia, A., Deufemia, V., Gravino, C., & Risi, M. (2010a). An Eclipse plug-in for the detection of design pattern instances through static and dynamic analysis. In Proceedings of the IEEE International Conference on Software Maintenance (pp. 1–6). https://doi.org/10.1109/ICSM.2010.5609707 Lucia, A., Deufemia, V., Gravino, C., & Risi, M. (2010a). An Eclipse plug-in for the detection of design pattern instances through static and dynamic analysis. In Proceedings of the IEEE International Conference on Software Maintenance (pp. 1–6). https://​doi.​org/​10.​1109/​ICSM.​2010.​5609707
Zurück zum Zitat Lucia, A. D., Deufemia, V., Gravino, C., & Risi, M. (2010b). Improving behavioral design pattern detection through model checking. In Software Maintenance and Reengineering (CSMR) (pp. 176–185). 14th European Conference on, IEEE. https://doi.org/10.1109/CSMR.2010.16 Lucia, A. D., Deufemia, V., Gravino, C., & Risi, M. (2010b). Improving behavioral design pattern detection through model checking. In Software Maintenance and Reengineering (CSMR) (pp. 176–185). 14th European Conference on, IEEE. https://​doi.​org/​10.​1109/​CSMR.​2010.​16
Zurück zum Zitat Lucia, A. D., Deufemia, V., Gravino, C., & Risi, M. (2018). Detecting the behavior of design patterns through model checking and dynamic analysis. ACM Transactions on Software Engineering and Methodology (TOSEM), 26(4), 1–41.CrossRef Lucia, A. D., Deufemia, V., Gravino, C., & Risi, M. (2018). Detecting the behavior of design patterns through model checking and dynamic analysis. ACM Transactions on Software Engineering and Methodology (TOSEM), 26(4), 1–41.CrossRef
Zurück zum Zitat Maggioni, S. (2010). Design pattern detection and software architecture reconstruction: An integrated approach based on software micro-structures. Ph.D. thesis, Universit`a degli Studi di Milano-Bicocca. Maggioni, S. (2010). Design pattern detection and software architecture reconstruction: An integrated approach based on software micro-structures. Ph.D. thesis, Universit`a degli Studi di Milano-Bicocca.
Zurück zum Zitat Markus von, D., & Steffen, B. (2011). Combining clustering and pattern detection for the reengineering of component-based software systems. In Proceedings of the joint ACM SIGSOFT conference -- QoSA and ACM SIGSOFT symposium -- ISARCS on Quality of software architectures -- QoSA and architecting critical systems -- ISARCS, Boulder, Colorado, USA (pp. 23–32). Association for Computing Machinery. https://doi.org/10.1145/2000259.2000265 Markus von, D., & Steffen, B. (2011). Combining clustering and pattern detection for the reengineering of component-based software systems. In Proceedings of the joint ACM SIGSOFT conference -- QoSA and ACM SIGSOFT symposium -- ISARCS on Quality of software architectures -- QoSA and architecting critical systems -- ISARCS, Boulder, Colorado, USA (pp. 23–32). Association for Computing Machinery. https://​doi.​org/​10.​1145/​2000259.​2000265
Zurück zum Zitat Pettersson, N., Löwe, W., & Nivre, J. (2010). Evaluation of accuracy in design pattern occurrence detection. IEEE Transactions on Software Engineering, 36(4), 575–590.CrossRef Pettersson, N., Löwe, W., & Nivre, J. (2010). Evaluation of accuracy in design pattern occurrence detection. IEEE Transactions on Software Engineering, 36(4), 575–590.CrossRef
Zurück zum Zitat Philippow, I., Streitferdt, D., & Riebisch, M. (2003). Design pattern recovery in architectures for supporting product line development and application. In Modelling variability for object-oriented product lines (pp. 42–57) Philippow, I., Streitferdt, D., & Riebisch, M. (2003). Design pattern recovery in architectures for supporting product line development and application. In Modelling variability for object-oriented product lines (pp. 42–57)
Zurück zum Zitat Philippow, I., Streitferdt, D., Riebisch, M., & Naumann, S. (2004). An approach for reverse engineering of design patterns. Software & Systems Modeling, 4, 55–70.CrossRef Philippow, I., Streitferdt, D., Riebisch, M., & Naumann, S. (2004). An approach for reverse engineering of design patterns. Software & Systems Modeling, 4, 55–70.CrossRef
Zurück zum Zitat Quatrani, T. (2000). Visual modelling with Rational Rose 2000 and UML: Addison-Wesley Longman Ltd. Quatrani, T. (2000). Visual modelling with Rational Rose 2000 and UML: Addison-Wesley Longman Ltd.
Zurück zum Zitat Rasool, G. (2011). Customizable feature based design pattern recognition integrating multiple techniques. Ph.D. thesis, Technische Universit¨at Ilmenau, Germany, Rasool, G. (2011). Customizable feature based design pattern recognition integrating multiple techniques. Ph.D. thesis, Technische Universit¨at Ilmenau, Germany,
Zurück zum Zitat Rasool, G., & Akhtar, H. (2019). Towards a catalog of design patterns variants. Paper presented at the 2019 International Conference on Frontiers of Information Technology (FIT). Rasool, G., & Akhtar, H. (2019). Towards a catalog of design patterns variants. Paper presented at the 2019 International Conference on Frontiers of Information Technology (FIT).
Zurück zum Zitat Shi, N., & Olsson, R. A. (2006). Reverse engineering of design patterns from Java source code. Paper presented at the 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06), 18–22 Shi, N., & Olsson, R. A. (2006). Reverse engineering of design patterns from Java source code. Paper presented at the 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06), 18–22
Zurück zum Zitat Simone, R., Giuseppe, S., Michele, R., & Carmine, G. (2011). Clustering and lexical information support for the recovery of design pattern in source code. In Proceedings of the 2011 27th IEEE International Conference on Software Maintenance (pp. 500–503). IEEE Computer Society. https://doi.org/10.1109/icsm.2011.6080818 Simone, R., Giuseppe, S., Michele, R., & Carmine, G. (2011). Clustering and lexical information support for the recovery of design pattern in source code. In Proceedings of the 2011 27th IEEE International Conference on Software Maintenance (pp. 500–503). IEEE Computer Society. https://​doi.​org/​10.​1109/​icsm.​2011.​6080818
Zurück zum Zitat Thaller, H., Linsbauer, L., & Egyed, A. (2019). Feature maps: A comprehensible software representation for design pattern detection. 2019 IEEE 26th international conference on software analysis, evolution and reengineering (SANER) (pp. 207–217). IEEE. Thaller, H., Linsbauer, L., & Egyed, A. (2019). Feature maps: A comprehensible software representation for design pattern detection. 2019 IEEE 26th international conference on software analysis, evolution and reengineering (SANER) (pp. 207–217). IEEE.
Zurück zum Zitat Tsantalis, N., Chatzigeorgiou, A., Stephanides, G., & Halkidis, S. T. (2006). Design pattern detection using similarity scoring. IEEE transactions on software engineering, 32(11), 896–909.CrossRef Tsantalis, N., Chatzigeorgiou, A., Stephanides, G., & Halkidis, S. T. (2006). Design pattern detection using similarity scoring. IEEE transactions on software engineering, 32(11), 896–909.CrossRef
Zurück zum Zitat Walter, Z. (1995). Relationships between design patterns. In Pattern languages of program design (Vol. 1, pp. 345–364): ACM Press/Addison-Wesley Publishing Co. Walter, Z. (1995). Relationships between design patterns. In Pattern languages of program design (Vol. 1, pp. 345–364): ACM Press/Addison-Wesley Publishing Co.
Zurück zum Zitat Xiong, R., & Li, B. (2019). Accurate design pattern detection based on idiomatic implementation matching in java language context. 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER) (pp. 163-174): IEEE. Xiong, R., & Li, B. (2019). Accurate design pattern detection based on idiomatic implementation matching in java language context. 2019 IEEE 26th International Conference on Software Analysis, Evolution and Reengineering (SANER) (pp. 163-174): IEEE.
Zurück zum Zitat Yu, D., Zhang, P., Yang, J., Chen, Z., Liu, C., & Chen, J. (2018). Efficiently detecting structural design pattern instances based on ordered sequences. Journal of Systems and Software, 142, 35–56.CrossRef Yu, D., Zhang, P., Yang, J., Chen, Z., Liu, C., & Chen, J. (2018). Efficiently detecting structural design pattern instances based on ordered sequences. Journal of Systems and Software, 142, 35–56.CrossRef
Zurück zum Zitat Yu, D., Zhang, Y., Ge, J., & Wu, W. (2013). From sub-patterns to patterns: An approach to the detection of structural design pattern instances by subgraph mining and merging. In 37th Annual Computer Software and Applications Conference (pp. 579–588). IEEE Yu, D., Zhang, Y., Ge, J., & Wu, W. (2013). From sub-patterns to patterns: An approach to the detection of structural design pattern instances by subgraph mining and merging. In 37th Annual Computer Software and Applications Conference (pp. 579–588). IEEE
Zurück zum Zitat Zanoni, M. (2012). Data mining techniques for design pattern detection. Ph.D thesis, Universit`a degli Studi di Milano-Bicocca. Zanoni, M. (2012). Data mining techniques for design pattern detection. Ph.D thesis, Universit`a degli Studi di Milano-Bicocca.
Zurück zum Zitat Zhang, P., Yu, D., & Wang, J. (2017). A degree-driven approach to design pattern mining based on graph matching. 2017 24th Asia-Pacific Software Engineering Conference (APSEC) (pp. 179–188). IEEE. Zhang, P., Yu, D., & Wang, J. (2017). A degree-driven approach to design pattern mining based on graph matching. 2017 24th Asia-Pacific Software Engineering Conference (APSEC) (pp. 179–188). IEEE.
Metadaten
Titel
A new method for detecting various variants of GoF design patterns using conceptual signatures
verfasst von
Zeinab Shahbazi
Abbas Rasoolzadegan
Zahra Purfallah
Somayeh Jafari Horestani
Publikationsdatum
29.11.2021
Verlag
Springer US
Erschienen in
Software Quality Journal / Ausgabe 3/2022
Print ISSN: 0963-9314
Elektronische ISSN: 1573-1367
DOI
https://doi.org/10.1007/s11219-021-09576-9

Weitere Artikel der Ausgabe 3/2022

Software Quality Journal 3/2022 Zur Ausgabe

Premium Partner