This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
Design Pattern Detection Using Similarity Scoring
November 2006 (vol. 32 no. 11)
pp. 896-909
The identification of design patterns as part of the reengineering process can convey important information to the designer. However, existing pattern detection methodologies generally have problems in dealing with one or more of the following issues: Identification of modified pattern versions, search space explosion for large systems and extensibility to novel patterns. In this paper, a design pattern detection methodology is proposed that is based on similarity scoring between graph vertices. Due to the nature of the underlying graph algorithm, this approach has the ability to also recognize patterns that are modified from their standard representation. Moreover, the approach exploits the fact that patterns reside in one or more inheritance hierarchies, reducing the size of the graphs to which the algorithm is applied. Finally, the algorithm does not rely on any pattern-specific heuristic, facilitating the extension to novel design structures. Evaluation on three open-source projects demonstrated the accuracy and the efficiency of the proposed method.

[1] H. Albin-Amiot, R. Cointre, Y.-G. Guéhéneuc, and N. Jussien, “Instantiating and Detecting Design Patterns: Putting Bits and Pieces Together,” Proc. 16th Ann. Conf. Automated Software Eng. (ASE '01), pp. 166-173, Nov. 2001.
[2] G. Antoniol, G. Casazza, M. Di Penta, and R. Fiutem, “Object-Oriented Design Patterns Recovery,” J. Systems and Software, vol. 59, no. 2, pp. 181-196, 2001.
[3] ASM Home Page, http:/asm.objectweb.org/, 2006.
[4] Z. Balanyi and R. Ferenc, “Mining Design Patterns from C++ Source Code,” Proc. Int'l Conf. Software Maintenance, (ICSM '03), pp. 305-314, Sept. 2003.
[5] E. Bengoetxea, “Inexact Graph Matching Using Estimation of Distribution Algorithms,” PhD thesis, Ecole Nationale Supérieure des Télécommunications, France, Dec. 2002.
[6] F. Bergenti and A. Poggi, “Improving UML Designs Using Automatic Design Pattern Detection,” Proc. 12th Int'l Conf. Software Eng. and Knowledge Eng. (SEKE '00), July 2000.
[7] V.D. Blondel, A. Gajardo, M. Heymans, P. Senellart, and P. Van Dooren, “A Measure of Similarity between Graph Vertices: Applications to Synonym Extraction and Web Searching,” SIAM Rev., vol. 46, no. 4, pp. 647-666, 2004.
[8] K. Brown, “Design Reverse-Engineering and Automated Design Pattern Detection in Smalltalk,” Technical Report TR-96-07, Dept. of Computer Science, North Carolina State Univ., 1996.
[9] D.J. Cook and L.B. Holder, “Substructure Discovery Using Minimum Description Length and Background Knowledge,” J.Artificial Intelligence Research, vol. 1, pp. 231-255, Feb. 1994.
[10] G. Costagliola, A. De Lucia, V. Deufemia, C. Gravino, and M. Risi, “Design Pattern Recovery by Visual Language Parsing,” Proc. Ninth European Conf. Software Maintainance and Reeng. (CSMR '05), pp. 102-111, Mar. 2005.
[11] Design Pattern Detection, http://java.uom.gr/~nikospattern-detection.html , 2006.
[12] R. Ferenc, A. Beszedes, L. Fulop, and J. Lele, “Design Pattern Mining Enhanced by Machine Learning,” Proc. 21st IEEE Int'l Conf. Software Maintenance (ICSM '05), pp. 295-304, Sept. 2005.
[13] M. Fowler, Refactoring: Improving the Design of Existing Code. Addison Wesley, 1999.
[14] FrontEndART Ltd., http:/www.frontendart.com. 2006.
[15] E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software. Addison Wesley, 1995.
[16] Y.-G. Guéhéneuc, H. Sahraoui, and F. Zaidi, “Fingerprinting Design Patterns,” Proc. 11th Working Conf. Reverse Eng. (WCRE'04), Nov. 2004.
[17] D. Heuzeroth, T. Holl, G. Högström, and W. Löwe, “Automatic Design Pattern Detection,” Proc. 11th IEEE Int'l Workshop Program Comprehension (IWPC '03), May 2003.
[18] JHotDraw Start Page, http:/www.jhotdraw.org, 2006.
[19] JRefactory, http:/jrefactory.sourceforge.net/, 2006.
[20] JUnit, http:/www.junit.org, 2006.
[21] J.M. Kleinberg, “Authoritative Sources in a Hyperlinked Environment,” J. ACM, vol. 46, no. 5, pp. 604-632, Sept. 1999.
[22] B.T. Messmer and H. Bunke, “Efficient Subgraph Isomorphism Detection: A Decomposition Approach,” IEEE Trans. Knowledge and Data Eng., vol. 12, no. 2, pp. 307-323, Mar./Apr. 2000.
[23] L. Prechelt and C. Krämer, “Functionality versus Practicality: Employing Existing Tools for Recovering Structural Design Patterns,” J. Universal Computer Science, vol. 4, no. 12, pp. 866-882, Dec. 1998.
[24] C. Rich and R. Waters, “The Programmer's Apprentice: A Research Overview,” IEEE Computer, vol. 21, no. 11, pp. 11-24, Nov. 1998.
[25] J.M. Smith, “An Elemental Design Pattern Catalog,” Technical Report TR-02-040, Dept. of Computer Science, Univ. of North Carolina, Oct. 2002.
[26] J.M. Smith and D. Stotts, “SPQR: Flexible Automated Design Pattern Extraction from Source Code,” Proc. 18th IEEE Int'l Conf. Automated Software Eng. (ASE '03), Oct. 2003.
[27] P. Tonella and G. Antoniol, “Object Oriented Design Pattern Inference,” Proc. IEEE Conf. Software Maintenance (ICSM '99), pp.230-238, 1999.
[28] J.R. Ullman, “An Algorithm for Subgraph Isomorphism,” J. ACM, vol. 23, no. 1, pp. 31-42, Jan. 1976.
[29] M. Vokač, “Defect Frequency and Design Patterns: An Empirical Study of Industrial Code,” IEEE Trans. Software Eng., vol. 30, no. 12, pp. 904-917, Dec. 2004.
[30] M. Vokač, “An Efficient Tool for Recovering Design Patterns from C++ Code,” J. Object Technology, vol. 2, no. 2, July/Aug. 2005.
[31] L. Wendehals, “Improving Design Pattern Instance Recognition by Dynamic Analysis,” Proc. Workshop Dynamic Analysis (WODA '03), May 2003.
[32] L. Wendehals, “Specifying Patterns for Dynamic Pattern Instance Recognition with UML 2.0 Sequence Diagrams,” Proc. Sixth Workshop Software Reeng. (WSR '04), pp. 63-64, May 2004.

Index Terms:
Patterns, object-oriented design methods, graph algorithms, restructuring, reverse engineering, reengineering.
Citation:
Nikolaos Tsantalis, Alexander Chatzigeorgiou, George Stephanides, Spyros T. Halkidis, "Design Pattern Detection Using Similarity Scoring," IEEE Transactions on Software Engineering, vol. 32, no. 11, pp. 896-909, Nov. 2006, doi:10.1109/TSE.2006.112
Usage of this product signifies your acceptance of the Terms of Use.