Skip to main content
Log in

A Customizable Approach to Design Patterns Recognition Based on Feature Types

  • Research Article - Computer Engineering and Computer Science
  • Published:
Arabian Journal for Science and Engineering Aims and scope Submit manuscript

Abstract

Accurate recognition of design patterns from source code supports development-related tasks such as program comprehension, maintenance, reverse engineering, and re-engineering. Researchers focused on this problem for many years, and a variety of recognition approaches have been proposed. Though, much progress has been made, we still identify a lack of flexibility and accuracy in the pattern recognition process. This paper evaluates different design pattern recovery approaches and examines the detection accuracy of these approaches. We found that the major impedance in the accurate recovery of design patterns is the large number of variations for implementing the same pattern. Furthermore, we realized that the combination of multiple searching techniques is required to improve accuracy of pattern detection. Based on these observations, we propose variable pattern definitions, which can be customized and improved towards a pattern catalog that detects patterns in all their variations. The customizable pattern definitions are created from reusable feature types. Each feature type can use one or more searching techniques for efficient detection. The proposed approach supports detection of patterns from multiple programming languages. A prototype implementation of the approach was tested on seven different open-source software projects. For each software project, a baseline was determined and the trustworthiness of each pattern–project combination was rated. The extracted results have been compared with established baselines and with the results of previous techniques.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Gamma E., Helm R., Johnson R., Vlissides J.: Design Patterns: Elements of Reusable Object Oriented Software. Addison Wesley, Boston (1995)

    Google Scholar 

  2. Krämer, C.; Prechelt, L.: Design recovery by automated search for structural design patterns in object-oriented software. In Working conference on reverse engineering (WCRE), pp. 208–215. Monterey-CA, EUA, November (1996)

  3. Arcelli, F.; Luca, C.: Enhancing software evolution through design pattern detection. In: Third international IEEE workshop on software evolvability, 2007, pp. 7–14 October (2007)

  4. Guéhéneuc Y., Antoniol G.: DeMIMA: a multilayered approach for design pattern identification. IEEE Trans. Softw. Eng. 34(5), 667–684 (2008)

    Article  Google Scholar 

  5. Antoniol, G.; Casazza, G.; Di Penta, M.; Fiutem, R.: Object-oriented design patterns recovery. J. Syst. Softw. 59(2), 181–196, ISSN: 0164-1212 (2001)

  6. Shi, N.; Olsson, R. A.: Reverse engineering of design patterns from java source code. In: 21st IEEE international conference on automated software engineering (ASE’06), pp. 123–134 (2006)

  7. Tsantalis N., Chatzigeorgiou A., Stephanides G., Halkidis S.T.: Design pattern detection using similarity scoring. IEEE Trans. Softw. Eng. 32(11), 896–909 (2006)

    Article  Google Scholar 

  8. Rasool, G.; Mäder, P.: Flexible design pattern detection based on feature types. In: International conference on automated software engineering (ASE), 26th IEEE/ACM, pp. 243–252 (2011)

  9. Pettersson N., Löwe W., Nivre J.: Evaluation of accuracy in design pattern occurrence detection. IEEE Trans. Softw. Eng. 36(4), 575–590 (2010) doi:10.1109/TSE.2009.92

    Article  Google Scholar 

  10. Arcelli Fontana, F.; Zanoni, M.; Caracciolo, A.: A benchmark platform for design pattern detection. In: IARIA, 2010, pp. 42–47 (2010)

  11. Fulop, L.J.; Ferenc, R.; Gyimothy, T.: Towards a benchmark for evaluating design pattern miner tools. In: European conference on software maintenance and reengineering, pp. 143–152 (2008)

  12. Experimental results for the five evaluated systems. URL http://research.ciitlahore.edu.pk/Groups/SERC/DesignPatterns.aspx (2013)

  13. De Lucia A, Deufemia V., Gravino C., Risi M.: Design pattern recovery through visual language parsing and source code analysis. J. Syst. Softw. 82(7), 1177–1193 (2009)

    Article  Google Scholar 

  14. Dong J., Zhao Y., Peng T.: A review of design pattern mining techniques. Int. J. Softw. Eng. Knowl. Eng. 19(6), 823–855 (2009)

    Article  Google Scholar 

  15. Ampatzoglou, A; Charalampidou, S; Stamelos, I: Research state of the art on GoF design patterns: a mapping study. J. Syst. Softw. 86(7), 1945–164 (2013)

  16. Costagliola, G.; De Lucia, A.; Deufemia, V.; Gravino, C.; Risi, M.: Case studies of visual language based design patterns recovery. In: Conference on software maintenance and reengineering (CSMR’06), pp. 165–174. IEEE Computer Society. ISBN 0-7695-2536-9 (2006). doi:10.1109/CSMR.2006.14

  17. De Lucia, A.; Deufemia, V.; Gravino, C.; Risi, M.: A two phase approach to design pattern recovery. In 11th European conference on software maintenance and reengineering (CSMR’07), pp. 297–306 (2007)

  18. De Lucia, A.; Deufemia, V.; Gravino, C.; Risi, M.: Behavioral pattern identification through visual language parsing and code instrumentation. In: Proceedings of the 2009 European conference on software maintenance and reengineering, pp. 99–108. IEEE Computer Society, Washington (2009)

  19. De Lucia, A.; Deufemia, V.; Gravino, C.; Risi, M.: Improving behavioral design pattern detection through model checking. In: 14th European conference on Software maintenance and reengineering (CSMR), pp. 176–185 (2010)

  20. Guéhéneuc Y.-G., Guyomarc’h J.-Y., Sahraoui H.A.: Improving design-pattern identification: a new approach and an exploratory study. Softw. Qual. J. 18(1), 145–174 (2010) doi:10.1007/s11219-009-9082-y

    Article  Google Scholar 

  21. Dong, J.; Lad, D.S.; Zhao, Y.: DP-miner: design pattern discovery using matrix. In: 14th annual IEEE international conference and workshops on the engineering of computer-based systems (ECBS’07), pp. 371–380 (2007)

  22. Kniesel, G.; Binun, A.: Standing on the shoulders of giants—a data fusion approach to design pattern detection. In: IEEE 17th international conference on Program comprehension, 2009. ICPC ’09, pp. 208–217 (2009)

  23. Arcelli Fontana, F.; Maggioni, S.; Raibulet, C.: Design patterns: a survey on their micro-structures. J. Softw. Maint. Evol. Res. Pract. 25(5), 27–52 (2011)

  24. Arcelli Fontana, F.; Maggioni, S.; Raibulet, C.: Understanding the relevance of micro-structures for design patterns detection. J. Syst. Softw. 84(12), 2334–2347 (2011)

  25. Nickel, U.; Niere, J.; Zündorf, A.: The fujaba environment. In: Proceedings of the 22nd IEEE international conference on software engineering (ICSE), pp. 742–745. Limerick, Ireland (2000)

  26. Smith, J.M.C.; Stotts, D.: Case studies in automated design pattern detection in C++ code using SPQR. Technical Report TR05-013, Department of Computer Science, University of North Carolina, Chapel Hill, June 7 (2005)

  27. Alnusair, A.; Zhao, T.: Towards a model driven approach for reverse engineering design patterns. In: Workshop on transformation and weaving ontologies in model driven engineering (TWOMDE 2009) (2009)

  28. Arcelli Fontana, F.; Perin, F.; Raibulet, C.; Ravani, S.: JADEPT: behavioral design pattern detection through dynamic analysis. In: 4th international conference on evaluation of novel approaches to software engineering—ENASE 2009, pp. 95–106. INSTICC, 2009. Stefan Jablonski and Leszek Maciaszek (eds)

  29. Ferenc, R.; Beszédes, A.; Fülöp, L.; Lele, J.: Design pattern mining enhanced by machine learning. In 21st IEEE international conference on software maintenance (ICSM’05),pp. 295–304. IEEE Computer Society (2005)

  30. Kaczor, O.; Guéhéneuc, Y.-G.; Hamel, S.: Efficient identification of design patterns with bit-vector algorithm. In: Conference on software maintenance and reengineering (CSMR’06), pp. 175–184 (2006)

  31. Philippow I., Streitferdt D., Riebisch M., Naumann S.: An approach for reverse engineering of design patterns. Softw. Syst. Model. 4(1), 55–70 (2005)

    Article  Google Scholar 

  32. Sartipi, K.; Hu, L.: Behavior-driven design pattern recovery. In: IASTED international conference on software engineering and applications (SEA 2008), pp. 179–185 (2008)

  33. Stencel, K.; Wegrzynowicz, P.: Detection of diverse design pattern variants. In: 15th Asia-Pacific software engineering conference (APSEC’08), pp. 25–32. IEEE Computer Society (2008)

  34. Wang, W.; Tzerpos, V.: Design pattern detection in eiffel systems. In: 12th working conference on reverse engineering (WCRE 2005), pp. 165–174. IEEE Computer Society (2005)

  35. Heuzeroth, D.; Mandel, S.; Lowe, W.: Generating design pattern detectors from pattern specifications. 18th international IEEE conference On automated software engineering (2003)

  36. Gil, J.; Maman, I.: Micro patterns in java code. In: Proceedings of the 20th conference on object-oriented programming systems languages and applications (OOPSLA), pp. 97–116. New York, NY, (2005)

  37. Arcelli Fontana F., Zanoni M.: A tool for design pattern detection and software architecture reconstruction. Inf. Sci. 181(7), 1306–1324 (2011)

    Article  Google Scholar 

  38. Merriam-Webster Online Dictionary, March. URL http://www.merriam-webster.com (2003)

  39. Bayley, I.; Zhu, H.: Formal specification of the variants and behavioural features of design patterns. J. Syst. Softw. 83(2):209–221. ISSN 0164-1212 (2010). doi:10.1016/j.jss.2009.09.039

  40. Rasool G., Philippow I., Mäder P.: Design pattern recovery based on annotations. Adv. Eng. Softw. 41(4), 519–526 (2010)

    Article  MATH  Google Scholar 

  41. Mössenböck, H.; Wöß, A.; Löberbauer, M.: Der compiler generator coco/r. In: Blaschek, G.; Ferscha, A.; Mössenböck, H.; Pomberger, G. (eds.) Peter Rechenberg Festschrift zum 70. Geburtstag. Trauner-Verlag (2003)

  42. Bieman, J.M.; Straw, G.; Wang, H.; Munger, P.W.; Alexander, R.T.: Design patterns and change proneness: an examination of five evolving systems. In: Proceedings of the 9th international symposium on software metrics, pp. 40–49, Washington, DC, USA, (2003)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ghulam Rasool.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Rasool, G., Mäder, P. A Customizable Approach to Design Patterns Recognition Based on Feature Types. Arab J Sci Eng 39, 8851–8873 (2014). https://doi.org/10.1007/s13369-014-1449-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s13369-014-1449-0

Keywords

Navigation