Work experience versus refactoring to design patterns: a controlled experiment

Program refactoring using design patterns is an attractive approach for facilitating anticipated changes. Its benefit depends on at least two factors, namely the effort involved in the refactoring and how effective it is. For example, the benefit would be small if too much effort is required to translate a program correctly into a refactorized form, and whether such a form could effectively guide maintainers to complete anticipated changes is unknown. A metric of effectiveness is the maintainers' performance, which can be affected by their work experience, in realizing the changes. Hence, an interesting question arises. Is program refactoring to introduce additional patterns beneficial regardless of the work experience of the maintainers? In this paper, we report a controlled experiment on maintaining JHotDraw, an open source system deployed with multiple patterns. We compared maintainers with and without work experience. Our empirical results show that, to complete a maintenance task of perfective nature, the time spent even by the inexperienced maintainers on a refactorized version is much shorter than that of the experienced subjects on the original version. Moreover, the quality of their delivered programs, in terms of correctness, is found to be comparable.

[1]  James M. Bieman,et al.  Design patterns and change proneness: an examination of five evolving systems , 2003, Proceedings. 5th International Workshop on Enterprise Networking and Computing in Healthcare Industry (IEEE Cat. No.03EX717).

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

[3]  James Coplien,et al.  Industrial experience with design patterns , 1996, Proceedings of IEEE 18th International Conference on Software Engineering.

[4]  Martin P. Robillard,et al.  How effective developers investigate source code: an exploratory study , 2004, IEEE Transactions on Software Engineering.

[5]  Doris L. Carver,et al.  TRANSACTIONS ON SOFTWARE ENGINEERING , 2004 .

[6]  Peter Sommerlad,et al.  Pattern-Oriented Software Architecture , 1996 .

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

[8]  E. Burton Swanson,et al.  Characteristics of application software maintenance , 1978, CACM.

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

[10]  Marshall Cline The pros and cons of adopting and applying design patterns in the real world , 1996, CACM.

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

[12]  Walter F. Tichy,et al.  A Controlled Experiment in Maintenance Comparing Design Patterns to Simpler Solutions , 2001, IEEE Trans. Software Eng..

[13]  Shing-Chi Cheung,et al.  Proactive views on concrete aspects: a pattern documentation approach to software evolution , 2003, Proceedings 27th Annual International Computer Software and Applications Conference. COMPAC 2003.

[14]  Shing-Chi Cheung,et al.  Enhancing class commutability in the deployment of design patterns , 2005, Inf. Softw. Technol..

[15]  Paul Clements,et al.  Software architecture in practice , 1999, SEI series in software engineering.

[16]  D. Janaki Ram,et al.  JIAD: a tool to infer design patterns in refactoring , 2004, PPDP '04.

[17]  Gail C. Murphy,et al.  Design pattern rationale graphs: linking design to source , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[18]  D. Hung Software Technology , 2003 .

[19]  Shari Lawrence Pfleeger,et al.  Preliminary Guidelines for Empirical Research in Software Engineering , 2002, IEEE Trans. Software Eng..

[20]  Michael Philippsen,et al.  Two Controlled Experiments Assessing the Usefulness of Design Pattern Documentation in Program Maintenance , 2002, IEEE Trans. Software Eng..

[21]  F TichyWalter,et al.  Two Controlled Experiments Assessing the Usefulness of Design Pattern Documentation in Program Maintenance , 2002 .

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

[23]  Martin P. Robillard,et al.  Automatic generation of suggestions for program investigation , 2005, ESEC/FSE-13.

[24]  Walter F. Tichy,et al.  A Controlled Experiment Comparing the Maintainability of Programs Designed with and without Design Patterns—A Replication in a Real Programming Environment , 2004, Empirical Software Engineering.

[25]  B. F. Castro Buschmann, Frank; Meunier, Regine; Rohnert, Hans; Sommerlad, Peter; Stal, Michael. Pattern-oriented software architecture: a system of patterns, John Wiley & Sons Ltd, 1996 , 1997 .