Skip to main content

A Structural Rule-Based Approach for Design Patterns Recovery

  • Chapter
  • First Online:
Software Engineering Research, Management and Applications (SERA 2017)

Abstract

Design patterns have a key role in the software development process. They describe both structure, behavior of classes and their relationships. Design patterns can improve software documentation, speed up the development process and enable large-scale reuse of software architectures. This paper presents a Multiple Levels Detection Approach (MLDA) to recover design pattern instances from Java source code. MLDA is able to extract design pattern instances based on a generated class level representation of an investigated system. Specifically, MLDA presents what is the so-called Structural Search Model (SSM) which incrementally builds the structure of each design pattern based on the generated source code model. Moreover, MLDA uses a rule-based approach to match the method signatures of the candidate design instances to that of the subject system. As the experiment results illustrate, MLDA is able to extract 23 design patterns with reasonable detection accuracy.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

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

    MATH  Google Scholar 

  2. CLIPS: A Tool for Building Expert Systems. http://www.clipsrules.net/ (2016). 5 Jan 2017

  3. Frost, R., Hafiz, R., Callaghan, P.: Parser combinators for ambiguous left-recursive grammars. In: 10th International Symposium on Practical Aspects of Declarative Languages (PADL), ACM-SIGPLAN, vol. 4902, pp. 167–181 (2008)

    Google Scholar 

  4. Github. : JavaParser by javaparser. https://javaparser.github.io/javaparser/ (2015). 1 Mar 2015

  5. Forgy, C.L.: Rete: a fast algorithm for the many pattern/many object pattern match problem. Artif. Intell. 19(1), 17–37 (1982)

    Article  Google Scholar 

  6. Frakes, W.B., Baeza-Yates, R.: Information Retrieval: Data Structure and Algorithms. Prentice Hall (1992)

    Google Scholar 

  7. Guéhéneuc, Y.G., Sahraoui, H., Zaidi, F.: Fingerprinting design patterns. In Proceedings of the 11th Working Conference on Reverse Engineering (WCRE), pp. 172–181. IEEE Computer Society Press, Washington, DC, USA (2004)

    Google Scholar 

  8. Guéhéneuc, Y.G., Jussien, N.: Using explanations for design patterns identification. In: Proceedings of the First IJCAI Workshop Modelling and Solving Problems with Constraints, pp. 57–64 (2001)

    Google Scholar 

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

    Article  Google Scholar 

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

    Google Scholar 

  11. Yu, D., Zhang, Y., Chen, Z. : A comprehensive approach to the recovery of design pattern instances based on sub-patterns and method signatures. J. Syst. Softw. 103, 1–16 (2015)

    Google Scholar 

  12. Shi, N., Olsson, R.: Reverse engineering of design patterns from java source code. In: ASE 06: Proceedings of the 21st IEEE International Conference on Automated Software Engineering, pp. 123–134 (2006)

    Google Scholar 

  13. Uchiyama, S., Kubo, A., Washizaki, H., Fukazawa, Y.: Detecting design patterns in object-oriented program source code by using metrics and machine learning. J. Softw. Eng. Appl. 7, 983–998 (2014)

    Article  Google Scholar 

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

    Google Scholar 

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

    Article  Google Scholar 

  16. Zanoni, M.: Data mining techniques for design pattern detection. Ph.D. Dissertation, Universita degli Studi di Milano-Bicocca (2012)

    Google Scholar 

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

    Google Scholar 

  18. Arcelli Fontana, F., Caracciolo, A., Zanoni, M.: DPB: a benchmark for design pattern detection tools. In Proceedings of the 16th European Conference on Software Maintenance and Reengineering (CSMR 12) pp. 235–244. IEEE Computer Society, Szeged, Hungary (2012)

    Google Scholar 

  19. Ampatzoglou, A., Michou, O., Stamelos, I.: Building and mining a repository of design pattern instances: practical and research benefits. Entertain. Comput. 4, 131–142 (2013)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mohammed Ghazi Al-Obeidallah .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer International Publishing AG

About this chapter

Cite this chapter

Al-Obeidallah, M.G., Petridis, M., Kapetanakis, S. (2018). A Structural Rule-Based Approach for Design Patterns Recovery. In: Lee, R. (eds) Software Engineering Research, Management and Applications. SERA 2017. Studies in Computational Intelligence, vol 722. Springer, Cham. https://doi.org/10.1007/978-3-319-61388-8_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-61388-8_7

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-61387-1

  • Online ISBN: 978-3-319-61388-8

  • eBook Packages: EngineeringEngineering (R0)

Publish with us

Policies and ethics