Playing roles in design patterns: An empirical descriptive and analytic study

This work presents a descriptive and analytic study of classes playing zero, one, or two roles in six different design patterns (and combinations thereof). First, we answer three research questions showing that (1) classes playing one or two roles do exist in programs and are not negligible and that there are significant differences among the (2) internal (class metrics) and (3) external (change-proneness) characteristics of classes playing zero, one, or two roles. Second, we revisit a previous work on design patterns and changeability and show that its results were, in a great part, due to classes playing two roles. Third, we exemplify the use of the study results to provide a ranking of the occurrences of the design patterns identified in a program. The ranking allows developers to balance precision and recall.

[1]  Steffen Zschaler,et al.  Finding the pattern you need: the design pattern intent ontology , 2007, MODELS'07.

[2]  Jacob Cohen Statistical Power Analysis for the Behavioral Sciences , 1969, The SAGE Encyclopedia of Research Design.

[3]  Viviane Jonckers,et al.  Building an OMT-editor using design patterns: an experience report , 1998, Proceedings. Technology of Object-Oriented Languages. TOOLS 26 (Cat. No.98EX176).

[4]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[5]  James M. Bieman,et al.  Coupling of design patterns: common practices and their benefits , 2001, 25th Annual International Computer Software and Applications Conference. COMPSAC 2001.

[6]  Joshua Kerievsky,et al.  Refactoring to Patterns , 2004, XP/Agile Universe.

[7]  Philip H. Ramsey Nonparametric Statistical Methods , 1974, Technometrics.

[8]  Albert Zündorf,et al.  Rewriting poor Design Patterns by good Design Patterns , 1997 .

[9]  David P. Tegarden,et al.  A software complexity model of object-oriented systems , 1995, Decis. Support Syst..

[10]  Victor R. Basili,et al.  A Methodology for Collecting Valid Software Engineering Data , 1984, IEEE Transactions on Software Engineering.

[11]  Yann-Gaël Guéhéneuc,et al.  Fingerprinting design patterns , 2004, 11th Working Conference on Reverse Engineering.

[12]  Peter Wendorff,et al.  Assessment of design patterns during software reengineering: lessons learned from a large commercial project , 2001, Proceedings Fifth European Conference on Software Maintenance and Reengineering.

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

[14]  Charles W. Butler,et al.  Design complexity measurement and testing , 1989, CACM.

[15]  Martin Hitz,et al.  Measuring coupling and cohesion in object-oriented systems , 1995 .

[16]  Premkumar T. Devanbu,et al.  An Investigation into Coupling Measures for C++ , 1997, Proceedings of the (19th) International Conference on Software Engineering.

[17]  James M. Bieman,et al.  OO design patterns, design structure, and program changes: an industrial case study , 2001, Proceedings IEEE International Conference on Software Maintenance. ICSM 2001.

[18]  Diomidis Spinellis A tale of four kernels , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[19]  Gregor Kiczales,et al.  Design pattern implementation in Java and aspectJ , 2002, OOPSLA '02.

[20]  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.

[21]  Marek Vokác Defect frequency and design patterns: an empirical study of industrial code , 2004, IEEE Transactions on Software Engineering.

[22]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[23]  Foutse Khomh,et al.  Do Design Patterns Impact Software Quality Positively? , 2008, 2008 12th European Conference on Software Maintenance and Reengineering.

[24]  Giuliano Antoniol,et al.  Design pattern recovery in object-oriented software , 1998, Proceedings. 6th International Workshop on Program Comprehension. IWPC'98 (Cat. No.98TB100242).

[25]  Yann-Gaël Guéhéneuc,et al.  DeMIMA: A Multilayered Approach for Design Pattern Identification , 2008, IEEE Transactions on Software Engineering.

[26]  Danny B. Lange,et al.  Interactive visualization of design patterns can help in framework understanding , 1995, OOPSLA.

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

[28]  Ralph E. Johnson,et al.  Patterns Generate Architectures , 1994, ECOOP.