Standing on the shoulders of giants - A data fusion approach to design pattern detection

Identification of design patterns can deliver important information to designers. Therefore, automated design pattern detection (DPD) is highly desirable when it comes to understanding unknown code. In this paper, we present the results of evaluating five existing DPD tools on various Java projects. These results motivate our proposal of a novel DPD approach based on data fusion. It combines design pattern candidate sets coming from different tools implementing different DPD techniques. We show that a design pattern can be a witness for the existence of another pattern. Our approach is able (1) to provide correct diagnostics even if the inputs from the evaluated tools were partly wrong and (2) to detect patterns instances not identified by the individual tools. For the Decorator, Visitor and Observer pattern, the witness-based approach yields better precision and recall than provided by any single tool. In particular, it detects 24 out of 30 instances of these patterns missed in our experiments by the evaluated tools. We also found that on the analyzed instances of the Bridge, Mediator and Facade pattern data fusion could not improve results, demonstrating that research into improvements of the basic detection techniques is still necessary.

[1]  J. Ng Identification of behavioral and creational design patterns through dynamic analysis , 2008 .

[2]  Claudia Raibulet,et al.  Elemental Design Patterns Recognition In Java , 2005, 13th IEEE International Workshop on Software Technology and Engineering Practice (STEP'05).

[3]  Alexander Chatzigeorgiou,et al.  Design Pattern Detection Using Similarity Scoring , 2006, IEEE Transactions on Software Engineering.

[4]  Yann-Gaël Guéhéneuc,et al.  Instantiating and detecting design patterns: putting bits and pieces together , 2001, Proceedings 16th Annual International Conference on Automated Software Engineering (ASE 2001).

[5]  Jing Dong,et al.  DP-Miner: Design Pattern Discovery Using Matrix , 2007, 14th Annual IEEE International Conference and Workshops on the Engineering of Computer-Based Systems (ECBS'07).

[6]  P. David Stotts,et al.  SPQR: flexible automated design pattern extraction from source code , 2003, 18th IEEE International Conference on Automated Software Engineering, 2003. Proceedings..

[7]  Lothar Wendehals Improving Design Pattern Instance Recognition by Dynamic Analysis , 2003 .

[8]  Jörg Niere,et al.  Handling large search space in pattern-based reverse engineering , 2003, 11th IEEE International Workshop on Program Comprehension, 2003..

[9]  Jason McC. Smith An Elemental Design Pattern Catalog , 2004 .

[10]  Giuliano Antoniol,et al.  Object oriented design pattern inference , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[11]  Yann-Gaël Guéhéneuc,et al.  An empirical study of the relationships between design pattern roles and class change proneness , 2008, 2008 IEEE International Conference on Software Maintenance.

[12]  Cyril S. Ku,et al.  Design Patterns , 2008, Wiley Encyclopedia of Computer Science and Engineering.

[13]  Michele Risi,et al.  A Two Phase Approach to Design Pattern Recovery , 2007, 11th European Conference on Software Maintenance and Reengineering (CSMR'07).

[14]  Yann-Gaël Guéhéneuc,et al.  Efficient identification of design patterns with bit-vector algorithm , 2006, Conference on Software Maintenance and Reengineering (CSMR'06).

[15]  Walter Zimmer,et al.  Relationships between design patterns , 1995 .

[16]  Christopher G. Lasater,et al.  Design Patterns , 2008, Wiley Encyclopedia of Computer Science and Engineering.

[17]  Ronald A. Olsson,et al.  Reverse Engineering of Design Patterns from Java Source Code , 2006, 21st IEEE/ACM International Conference on Automated Software Engineering (ASE'06).

[18]  Lothar Wendehals Struktur- und verhaltensbasierte Entwurfsmustererkennung , 2007, Softwaretechnik-Trends.

[19]  Yann-Gaël Guéhéneuc,et al.  Feature Location Using Probabilistic Ranking of Methods Based on Execution Scenarios and Information Retrieval , 2007, IEEE Transactions on Software Engineering.

[20]  Alessandro Orso,et al.  Recognizing behavioral patterns atruntime using finite automata , 2006, WODA '06.

[21]  Jing Dong,et al.  A Review of Design Pattern Mining Techniques , 2009, Int. J. Softw. Eng. Knowl. Eng..

[22]  Yann-Gaël Guéhéneuc Using explanations for design patterns identification , 2001 .