Abstract
In order to improve the quality of a software system and reuse expert experience in software system design, design patterns have been extensively applied in the software industry. Mining design pattern instances from source codes can assist the understanding of the systems. In this paper, we propose eight sub-patterns based on common structural features of structural design patterns and their variants. We introduce two kinds of graph, of which one represents the system design and the other describes the sub-patterns. Our approach first selects the candidate classes in UML class diagrams to form the sub-graphs of the system graph, which are then checked isomorphic to the sub-pattern graph or not. These isomorphic sub-graphs are regarded as corresponding to instances of the sub-patterns. After that, we combine some relevant sub-patterns and compare the collectives with structural feature models. For these matched ones, we then apply behavioral analysis to obtain the final pattern instances. The results of the experiments demonstrate that our approach obtains better precision than the existing approaches.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)
Dong, J., Zhao, Y.J., Peng, T.: A Review of Design Pattern Mining Techniques. The International Journal of Software Engineering and Knowledge Engineering (IJSEKE) 19, 823–855 (2009)
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns, software engineering, object-oriented programming. Addison-Wesley (1994)
Dong, J., Zhao, Y.J., Sun, Y.T.: A Matrix-Based Approach to Recovering Design Patterns. IEEE Transactions on Systems, Man and Cybernetics – Part A: Systems and Humans 39(6), 1271–1282 (2009)
Dong, J., Lad, D.S., Zhao, Y.: DP-Miner: Design Pattern Discovery Using Matrix. In: Proceedings of the 14th Annual IEEE International Conference on Engineering of Computer Based Systems (ECBS), pp. 371–380. IEEE Press, Tucson (2007)
Antoniol, G., Fiutem, R., Cristoforetti, L.: Design pattern recovery in object-oriented software. In: Proceedings of the 6th IEEE International Workshop on Program Understanding, pp. 153–160. IEEE Press, Ischia (1998)
Gueheneuc, Y., Sahraoui, H., Zaidi, F.: Fingerprinting design patterns. In: Proceedings of the 11th Working Conference on Reverse Engineering (WCRE), pp. 172–180. IEEE Press (2004)
Pande, A., Gupta, M., Tripathi, A.K.: A New Approach for Detecting Design Patterns by Graph Decomposition and Graph Isomorphism. In: Ranka, S., Banerjee, A., Biswas, K.K., Dua, S., Mishra, P., Moona, R., Poon, S.-H., Wang, C.-L. (eds.) IC3 2010. CCIS, vol. 95, pp. 108–119. Springer, Heidelberg (2010)
Qiu, M., Jiang, Q., Gao, A., Chen, E., Qiu, D., Chai, S.: Detecting Design Pattern Using Sub-graph Discovery. In: Nguyen, N.T., Le, M.T., Świątek, J. (eds.) ACIIDS 2010. LNCS, vol. 5990, pp. 350–359. Springer, Heidelberg (2010)
Arcelli, F., Masiero, S., Raibulet, C.: Elemental design patterns recognition in Java. In: Proceedings of 13th Annual International Workshop on Software Technology and Engineering Practice, pp. 196–205. IEEE Press, Budapest (2006)
Posnett, D., Bird, C., Devanbu, P.T.: THEX: Mining meta-patterns from java. In: 7th IEEE Working Conference on Mining Software Repositories, pp. 122–125. IEEE Press, Cape Town (2010)
Fontana, F.A., Maggioni, S., Raibulet, C.: Understanding the relevance of micro-structures for design patterns detection. Journal of Systems and Software 84, 2334–2347 (2011)
Fontana, F.A., Maggioni, S., Raibulet, C.: Design patterns: a survey on their micro-structures. Journal of Software Maintenance and Evolution 33(8), 1–25 (2011)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Yu, D., Liu, Z., Ge, J. (2013). Mining Instances of Structural Design Patterns from Class Diagrams Based on Sub-patterns. In: Favaro, J., Morisio, M. (eds) Safe and Secure Software Reuse. ICSR 2013. Lecture Notes in Computer Science, vol 7925. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-38977-1_17
Download citation
DOI: https://doi.org/10.1007/978-3-642-38977-1_17
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-38976-4
Online ISBN: 978-3-642-38977-1
eBook Packages: Computer ScienceComputer Science (R0)