Skip to main content

Mining Instances of Structural Design Patterns from Class Diagrams Based on Sub-patterns

  • Conference paper
Safe and Secure Software Reuse (ICSR 2013)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 7925))

Included in the following conference series:

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.

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 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight 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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

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

    Google Scholar 

  2. 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)

    Article  Google Scholar 

  3. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design patterns, software engineering, object-oriented programming. Addison-Wesley (1994)

    Google Scholar 

  4. 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)

    Article  Google Scholar 

  5. http://www.jhotdraw.org/

  6. http://java.sun.com/j2se/1.5.0/docs/guide/awt/index.html

  7. http://www.junit.org/

  8. 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)

    Google Scholar 

  9. 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)

    Google Scholar 

  10. 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)

    Google Scholar 

  11. 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)

    Chapter  Google Scholar 

  12. 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)

    Chapter  Google Scholar 

  13. 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)

    Google Scholar 

  14. 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)

    Google Scholar 

  15. 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)

    Article  Google Scholar 

  16. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics