Skip Navigation

IEICE Transactions on Information and Systems 2008 E91-D(4):933-944; doi:10.1093/ietisy/e91-d.4.933
This Article
Right arrow Abstract Freely available
Right arrow Full Text (PDF)
Right arrow Alert me when this article is cited
Right arrow Alert me if a correction is posted
Services
Right arrow Email this article to a friend
Right arrow Similar articles in this journal
Right arrow Alert me to new issues of the journal
Right arrow Add to My Personal Archive
Right arrow Download to citation manager
Right arrow Request Permissions
Google Scholar
Right arrow Articles by HAYASHI, S.
Right arrow Articles by SAEKI, M.
Social Bookmarking
 Add to CiteULike   Add to Connotea   Add to Del.icio.us  
What's this?

Copyright © 2008 The Institute of Electronics, Information and Communication Engineers

Special Section on Knowledge-Based Software Engineering -- Papers -- Software Engineering

Design Pattern Detection by Using Meta Patterns

Shinpei HAYASHI1, Junya KATADA1,3, Ryota SAKAMOTO1, Takashi KOBAYASHI2 and Motoshi SAEKI1

1 The authors are with the Department of Computer Science, Graduate School of Information Science and Engineering, Tokyo Institute of Technology, Tokyo, 152–8552 Japan. E-mail: hayashi{at}se.cs.titech.ac.jp, 2 The author is with the Center for Embedded Computing Systems, Graduate School of Information Science, Nagoya University, Nagoya-shi, 464–8601 Japan., 3 Presently, with NTT COMWARE CORPORATION.

One of the approaches to improve program understanding is to extract what kinds of design pattern are used in existing object-oriented software. This paper proposes a technique for efficiently and accurately detecting occurrences of design patterns included in source codes. We use both static and dynamic analyses to achieve the detection with high accuracy. Moreover, to reduce computation and maintenance costs, detection conditions are hierarchically specified based on Pree's meta patterns as common structures of design patterns. The usage of Prolog to represent the detection conditions enables us to easily add and modify them. Finally, we have implemented an automated tool as an Eclipse plug-in and conducted experiments with Java programs. The experimental results show the effectiveness of our approach.

Key Words: design patterns, program understanding, meta patterns, dynamic analysis, Prolog


Manuscript received July 2, 2007. Manuscript revised October 17, 2007.

Reference

[1] E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software, Addison-Wesley, 1995.

[2] H. Kim and C. Boldyreff, "A method to recover design patterns using software product metrics," Proc. 6th International Conference on Software Reuse, pp.318–335, 2000.

[3] T. Muraki and M. Saeki, "Metrics for applying GoF design patterns in refactoring processes," Proc. 4th International Workshop on Principles of Software Evolution, pp.27–36, 2001.

[4] S. Demeyer, S. Ducasse, and O. Nierstrasz, "Finding refactoring via change metrics," Proc. 15th Conference on Object-Oriented Programming, Systems, Languages and Applications, pp.166–177, 2000.

[5] Y.G. Guéhéneuc, H. Sahraoui, and F. Zaidi, "Fingerprinting design patterns," Proc. 11th Working Conference on Reverse Engineering, pp.172–181, 2004.

[6] R. Ferenc, A. Beszedes, L. Fulop, and J. Lele, "Design pattern mining enhanced by machine learning," Proc. 21st International Conference on Software Maintenance, pp.295–304, 2005.

[7] A.L. Correa, C.M.L. Werner, and G. Zaverucha, "Object oriented design expertise reuse: An approach based on heuristics, design patterns and anti-patterns," Proc. 6th International Conference on Software Reuse, pp.336–352, 2000.

[8] C. Krämer and L. Prechelt, "Design recovery by automated search for structural design patterns in object-oriented software," Proc. 3rd Working Conference on Reverse Engineering, pp.208–215, 1996.

[9] Z. Balanyi and R. Ferenc, "Mining design patterns from C++ source code," Proc. 19th International Conference on Software Maintenance, pp.305–314, 2003.

[10] D. Heuzeroth, T. Holl, G. Högström, and W. Löwe, "Automatic design pattern detection," Proc. 11th International Workshop on Program Comprehension, pp.94–103, 2003.

[11] P. Tonella and G. Antoniol, "Object oriented design pattern inference," Proc. 15th International Conference on Software Maintenance, pp.230–239, 1999.

[12] G. Arevalo, F. Buchli, and O. Nierstrasz, "Detecting implicit collaboration patterns," Proc. 11th Working Conference on Reverse Engineering, pp.122–131, 2004.

[13] R. Wuyts, "Declarative reasoning about the structure object-oriented systems," Proc. TOOLS USA '98 Conference, pp.112–124, 1998.

[14] J.M. Smith and D. Stotts, "SPQR: Flexible automated design pattern extraction from source code," Proc. 18th International Conference on Automated Software Engineering, pp.215–224, 2003.

[15] D. Heuzeroth, S. Mandel, and W. Lowe, "Generating design pattern detectors from pattern specifications," Proc. 18th International Conference on Automated Software Engineering, pp.245–248, 2003.

[16] N. Shi and R.A. Olsson, "Reverse engineering of design patterns from Java source code," Proc. 21st International Conference on Automated Software Engineering, pp.123–134, 2006.

[17] G. Kniesel, J. Hannemann, and T. Rho, "A comparison of logic-based infrastructures for concern detection and extraction," Proc. 3rd Workshop on Linking Aspect Technology and Evolution, 2007.

[18] J. Dong, D.S. Lad, and Y. Zhao, "DP-Miner: Design pattern discovery using matrix," Proc. 14th International Conference and Workshops on the Engineering of Computer-Based Systems, pp.371–380, 2007.

[19] J. Dong and Y. Zhao, "Experiments on design pattern discovery," Proc. 3rd International Workshop on Predictor Models in Software Engineering, 2007.

[20] J. Crupi, D. Malks, and D. Alur, Core J2Ee Patterns: Best Practices and Design Strategies, Prentice Hall PTR, 2001.

[21] W. Pree, Design Pattern for Object-Oriented Software Development, Addison-Wesley, 1996.

[22] Eclipse project, available at http://www.eclipse.org/

[23] Eclipse Java development tools (JDT) subproject, available at http://www.eclipse.org/jdt/

[24] E. Denti, A. Omicini, and A. Ricci, "Multi-paradigm Java-Prolog integration in tuProlog," Science of Computer Programming, vol.57, no.2, pp.217–250, 2005.

[25] tuProlog, available at http://tuprolog.alice.unibo.it/

[26] G.T. Leavens, A.L. Baker, and C. Ruby, "JML: Java modeling language," available at http://www.eecs.ucf.edu/~leavens/JML/

[27] J. Vlissides, Pattern Hatching: Design Patterns Applied, Addison-Wesley, 1998.

[28] L. Wendehals and A. Orso, "Recognizing behavioral patterns at runtime using finite automata," Proc. 2006 International Workshop on Dynamic Systems Analysis, pp.33–40, 2006.

[29] M. Grand, Patterns in Java, John Wiley & Sons, 1998.


Add to CiteULike CiteULike   Add to Connotea Connotea   Add to Del.icio.us Del.icio.us    What's this?



This Article
Right arrow Abstract Freely available
Right arrow Full Text (PDF)
Right arrow Alert me when this article is cited
Right arrow Alert me if a correction is posted
Services
Right arrow Email this article to a friend
Right arrow Similar articles in this journal
Right arrow Alert me to new issues of the journal
Right arrow Add to My Personal Archive
Right arrow Download to citation manager
Right arrow Request Permissions
Google Scholar
Right arrow Articles by HAYASHI, S.
Right arrow Articles by SAEKI, M.
Social Bookmarking
 Add to CiteULike   Add to Connotea   Add to Del.icio.us  
What's this?