Circular dependencies and change-proneness: An empirical study

Advice that circular dependencies between programming artefacts should be avoided goes back to the earliest work on software design, and is well-established and rarely questioned. However, empirical studies have shown that real-world (Java) programs are riddled with circular dependencies between artefacts on different levels of abstraction and aggregation. It has been suggested that additional heuristics could be used to distinguish between bad and harmless cycles, for instances by relating them to the hierarchical structure of the packages within a program, or to violations of additional design principles. In this study, we try to explore this question further by analysing the relationship between different kinds of circular dependencies between Java classes, and their change frequency. We find that (1) the presence of cycles can have a significant impact on the change proneness of the classes near these cycles and (2) neither subtype knowledge nor the location of the cycle within the package containment tree are suitable criteria to distinguish between critical and harmless cycles.

[1]  Standard Glossary of Software Engineering Terminology , 1990 .

[2]  Jens Dietrich,et al.  Broken promises: An empirical study into evolution problems in Java programs caused by library upgrades , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[3]  Jens Dietrich,et al.  Barriers to Modularity - An Empirical Study to Assess the Potential for Modularisation of Java Programs , 2010, QoSA.

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

[5]  Stephen R. Marsland,et al.  On the Shape of Circular Dependencies in Java Programs , 2014, 2014 23rd Australian Software Engineering Conference.

[6]  David Lorge Parnas,et al.  Review of David L. Parnas' "Designing Software for Ease of Extension and Contraction" , 2004 .

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

[8]  Foutse Khomh,et al.  Analyzing the Impact of Antipatterns on Change-Proneness Using Fine-Grained Source Code Changes , 2012, 2012 19th Working Conference on Reverse Engineering.

[9]  Ewan D. Tempero,et al.  Multiple dispatch in practice , 2008, OOPSLA.

[10]  N. Nagappan,et al.  Use of relative code churn measures to predict system defect density , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[11]  Stanley Wasserman,et al.  Social Network Analysis: Methods and Applications , 1994, Structural analysis in the social sciences.

[12]  Miryung Kim,et al.  A field study of refactoring challenges and benefits , 2012, SIGSOFT FSE.

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

[14]  Robert E. Tarjan,et al.  Depth-First Search and Linear Graph Algorithms , 1972, SIAM J. Comput..

[15]  Foutse Khomh,et al.  An exploratory study of the impact of antipatterns on class change- and fault-proneness , 2011, Empirical Software Engineering.

[16]  Daniela Cruzes,et al.  A study of cyclic dependencies on defect profile of software components , 2013, J. Syst. Softw..

[17]  Khaled El Emam,et al.  The Confounding Effect of Class Size on the Validity of Object-Oriented Metrics , 2001, IEEE Trans. Software Eng..

[18]  James Noble,et al.  Scale-free geometry in OO programs , 2005, CACM.

[19]  Arthur J. Riel,et al.  Object-Oriented Design Heuristics , 1996 .

[20]  Jens Dietrich,et al.  On the Existence of High-Impact Refactoring Opportunities in Programs , 2012, ACSC.

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

[22]  Francesca Arcelli Fontana,et al.  Investigating the Impact of Code Smells on System's Quality: An Empirical Study on Systems of Different Application Domains , 2013, 2013 IEEE International Conference on Software Maintenance.

[23]  Daniela Cruzes,et al.  Are all code smells harmful? A study of God Classes and Brain Classes in the evolution of three open source systems , 2010, 2010 IEEE International Conference on Software Maintenance.

[24]  Mark Harman,et al.  Identifying 'Linchpin Vertices' That Cause Large Dependence Clusters , 2009, 2009 Ninth IEEE International Working Conference on Source Code Analysis and Manipulation.

[25]  Steve Counsell,et al.  Power law distributions in class relationships , 2003, Proceedings Third IEEE International Workshop on Source Code Analysis and Manipulation.

[26]  Alessandro Orso Integration Testing of Object-Oriented Software , 1998 .

[27]  David Chen,et al.  Design Principles and Patterns for Decisional Interoperability , 2005 .

[28]  Derek de Solla Price,et al.  A general theory of bibliometric and other cumulative advantage processes , 1976, J. Am. Soc. Inf. Sci..

[29]  Shari Lawrence Pfleeger,et al.  Software Metrics : A Rigorous and Practical Approach , 1998 .

[30]  Nachiappan Nagappan,et al.  Predicting defects using network analysis on dependency graphs , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

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

[32]  Ewan D. Tempero,et al.  An empirical study of cycles among classes in Java , 2007, Empirical Software Engineering.

[33]  Katsuro Inoue,et al.  An Exploration of Power-Law in Use-Relation of Java Software Systems , 2008 .

[34]  Jing Li,et al.  The Qualitas Corpus: A Curated Collection of Java Code for Empirical Studies , 2010, 2010 Asia Pacific Software Engineering Conference.

[35]  Stéphane Ducasse,et al.  Efficient Retrieval and Ranking of Undesired Package Cycles in Large Software Systems , 2012, J. Object Technol..

[36]  Robert C. Martin,et al.  Acyclic visitor , 1997 .

[37]  Andreas Zeller,et al.  The impact of tangled code changes , 2013, 2013 10th Working Conference on Mining Software Repositories (MSR).

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

[39]  Yann-Gaël Guéhéneuc,et al.  Impact of the visitor pattern on program comprehension and maintenance , 2009, 2009 3rd International Symposium on Empirical Software Engineering and Measurement.

[40]  Mark Harman,et al.  Locating dependence clusters and dependence pollution , 2005, 21st IEEE International Conference on Software Maintenance (ICSM'05).

[41]  Ian H. Witten,et al.  Can We Avoid High Coupling? , 2011, ECOOP.

[42]  Simon M. Kaplan,et al.  Scale-Free Nature of Java Software Package, Class and Method Collaboration Graphs , 2006 .

[43]  Dirk Riehle,et al.  Pattern Languages of Program Design 3 , 1997 .