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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Longman Publishing Co., Inc., Boston (1995)
CLIPS: A Tool for Building Expert Systems. http://www.clipsrules.net/ (2016). 5 Jan 2017
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)
Github. : JavaParser by javaparser. https://javaparser.github.io/javaparser/ (2015). 1 Mar 2015
Forgy, C.L.: Rete: a fast algorithm for the many pattern/many object pattern match problem. Artif. Intell. 19(1), 17–37 (1982)
Frakes, W.B., Baeza-Yates, R.: Information Retrieval: Data Structure and Algorithms. Prentice Hall (1992)
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)
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)
Tsantalis, N., Chatzigeorgiou, A., Stephanides, G., Halkidis, S.: Design pattern detection using similarity scoring. IEEE Trans. Softw. Eng. 32, 11 (2006)
Guéhéneuc, Y., Antoniol, G.: DeMIMA: a multilayered approach for design pattern identification. IEEE Trans. Softw. Eng. 34 (2008)
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)
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)
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)
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)
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)
Zanoni, M.: Data mining techniques for design pattern detection. Ph.D. Dissertation, Universita degli Studi di Milano-Bicocca (2012)
Guéhéneuc,Y.-G.: P-MARt: Pattern-like micro architecture repository. In: Proceedings of the 1st EuroPLoP Focus Group on Pattern Repositories (2007)
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)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)