Skip to main content
Log in

Applying learning-based methods for recognizing design patterns

  • Original Article
  • Published:
Innovations in Systems and Software Engineering Aims and scope Submit manuscript

Abstract

Recognizing design patterns in source code helps in improving the aspect of reusability and maintainability that play an essential role during analysis and design phases of software development process. Software patterns provide design-level documents, which are applied for the recurring design issues. Analysis of design patterns is often carried out by using forward engineering as well as reverse engineering. In this study, a reverse engineering approach has been applied for recognizing design patterns. The study is comprised of two phases such as preparation of requisite dataset based on object-oriented software metrics and recognition of design patterns. The first phase, i.e., dataset preparation, is carried out by various object-oriented metrics. Design pattern recognition is performed by using learning-based algorithms such as artificial neural network and logistic regression. The presented method is validated by using three case studies such as JRefactory, JUnit and Quaqua.

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.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8

Similar content being viewed by others

References

  1. Gamma E, Helm R, Johnson R, Vlissides J (1995) Design patterns: elements of reusable object-oriented software. Addison-Wesley, Boston

    MATH  Google Scholar 

  2. Fowler M (2002) Patterns of enterprise application architecture. Addison-Wesley, Boston

    Google Scholar 

  3. Zhu H, Bayley I (2015) On the composability of design patterns. IEEE Trans Softw Eng 41(11):1138–1152

    Article  Google Scholar 

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

    Article  Google Scholar 

  5. Booch G (2005) The unified modeling language user guide. Addison-Wesley Professional, Boston

    Google Scholar 

  6. Dietrich J, Elgar C (2007) Towards a web of patterns. Web Semant Sci Serv Agents World Wide Web 5(2):108–116

    Article  Google Scholar 

  7. Khwaja S, Alshayeb M (2016) Survey on software design-pattern specification languages. ACM Comput Surv (CSUR) 49(1):21

    Article  Google Scholar 

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

    Article  Google Scholar 

  9. Uchiyama S, Washizaki H, Fukazawa Y, Kubo A (2011) Design pattern detection using software metrics and machine learning. In: 5th International Workshop on Software Quality and Maintainability, SQM 2011

  10. Seguin C, Atkinson M (2003) JRefactory. http://jrefactory.sourceforge.net/. Accessed 22 Oct 2016

  11. Beck K, Gamma E, Saff D, Clark M (2014) JUnit. http://junit.org/junit4/. Accessed 22 Oct 2016

  12. Randelshofer W (2011) Quaqua. https://www.randelshofer.ch/quaqua/. Accessed 22 Oct 2016

  13. Hagan MT, Demuth HB, Beale MH, De Jesús O (1996) Neural network design, vol 20. PWS Publishing Company, Boston

    Google Scholar 

  14. Hosmer DW Jr, Lemeshow S, Sturdivant RX (2013) Applied logistic regression, vol 398. Wiley, London

    Book  MATH  Google Scholar 

  15. Arvanitou E-M, Ampatzoglou A, Chatzigeorgiou A, Avgeriou P (2016) Software metrics fluctuation: a property for assisting the metric selection process. Inf Softw Technol 72:110–124

    Article  Google Scholar 

  16. Lucia AD, Deufemia V, Gravino C, Risi M (2018) Detecting the behavior of design patterns through model checking and dynamic analysis. ACM Trans Softw Eng Methodol (TOSEM) 26(4):13

    Article  Google Scholar 

  17. Yu D, Zhang P, Yang J, Chen Z, Liu C, Chen J (2018) Efficiently detecting structural design pattern instances based on ordered sequences. J Syst Softw 142:35–56

    Article  Google Scholar 

  18. Mayvan BB, Rasoolzadegan A, Yazdi ZG (2017) The state of the art on design patterns: a systematic mapping of the literature. J Syst Softw 125:93–118

    Article  Google Scholar 

  19. Shull F, Melo WL, Basili VR (1998) An inductive method for discovering design patterns from object-oriented software systems. Technical Report UMIACS-TR-96-10, University of Maryland

  20. Antoniol G, Fiutem R, Cristoforetti L (1998) Design pattern recovery in object-oriented software. In: 6th International workshop on program comprehension. IWPC’98. Proceedings. IEEE, pp 153–160

  21. Gueheneuc Y-G, Sahraoui H, Zaidi F (2004) Fingerprinting design patterns. In: 11th Working conference on reverse engineering Proceedings. IEEE, pp 172–181

  22. Issaoui I, Bouassida N, Ben-Abdallah H (2015) Using metric-based filtering to improve design pattern detection approaches. Innov Syst Softw Eng 11(1):39–53

    Article  Google Scholar 

  23. Dong J, Sun Y, Zhao Y (2008) Design pattern detection by template matching. In Proceedings of the 2008 ACM symposium on applied computing. ACM, pp 765–769

  24. Kaczor O, Guéhéneuc Y-G, Hamel S (2010) Identification of design motifs with pattern matching algorithms. Inf Softw Technol 52(2):152–168

    Article  Google Scholar 

  25. 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:1–16

    Article  Google Scholar 

  26. Mayvan BB, Rasoolzadegan A (2017) Design pattern detection based on the graph theory. Knowl Based Syst 120:211–225

    Article  Google Scholar 

  27. Ferenc R, Beszedes A, Fülöp L, Lele J (2005) Design pattern mining enhanced by machine learning. In: Proceedings of the 21st IEEE international conference on software maintenance. ICSM’05. IEEE, pp 295–304

  28. Alhusain S, Coupland S, John R, Kavanagh M (2013) Towards machine learning based design pattern recognition. In: 2013 13th UK workshop on computational intelligence (UKCI). IEEE, pp 244–251

  29. Chihada A, Jalili S, Hasheminejad SMH, Zangooei MH (2015) Source code and design conformance, design pattern detection from source code by classification approach. Appl Soft Comput 26:357–367

    Article  Google Scholar 

  30. Alnusair A, Zhao T, Yan G (2014) Rule-based detection of design patterns in program code. Int J Softw Tools Technol Transf 16(3):315–334

    Article  Google Scholar 

  31. Chidamber SR, Kemerer CF (1994) A metrics suite for object oriented design. IEEE Trans Softw Eng 20(6):476–493

    Article  Google Scholar 

  32. CodeGear. JBuilder (2008) http://www.embarcadero.com/products/jbuilder. Accessed 22 Oct 2016

  33. Zanoni M, Fontana FA, Stella F (2015) On applying machine learning techniques for design pattern detection. J Syst Softw 103:102–117

    Article  Google Scholar 

  34. Guéhéneuc Y-G (2007) P-MARt: pattern-like micro architecture repository. In: Proceedings of the 1st EuroPLoP Focus Group on pattern repositories

  35. Dong J, Zhao Y, Sun Y (2009) A matrix-based approach to recovering design patterns. IEEE Trans Syst Man Cybern Part A Syst Hum 39(6):1271–1282

    Article  Google Scholar 

  36. Blewitt A, Bundy A, Stark I (2005) Automatic verification of design patterns in java. In: Proceedings of the 20th IEEE/ACM international conference on Automated software engineering. ACM, pp 224–232

Download references

Acknowledgements

Authors hereby acknowledge sincere thanks to the sponsor of the Web engineering and Cloud Computing Lab. Project sanctioned by FIST programme, Department of Science and Technology, Govt. of India.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ashish Kumar Dwivedi.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Dwivedi, A.K., Tirkey, A. & Rath, S.K. Applying learning-based methods for recognizing design patterns. Innovations Syst Softw Eng 15, 87–100 (2019). https://doi.org/10.1007/s11334-019-00329-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11334-019-00329-3

Keywords

Navigation