Society, systems and related businesses are increasingly dependent on software applications, which are integrated and interoperate with other systems. This dependency has implications for the dependability of both the systems and the businesses. There have been reported cases over the years of both systems and business failures due to software defects. However, the work and effort needed to correct defects is not trivial. This involves changing existing applications, which may be overly complex in their structure. Software undergoes constant evolution due to changes in the business environment such as introduction of new technology or new requirements. It is therefore not surprising that the cost of software maintenance is normally estimated to be the highest in the overall software budget. As the software evolves, so does its size and complexity.One aspect of software complexity is dependency cycles that are formed among software classes and packages. Many design guidelines advocate to avoid dependency cycles and argue that they inhibit software quality. Despite this conventional wisdom, empirical evidence shows that modern software indeed is riddled with this anti-pattern. The question remains that if cyclic property is known to be complex and is pervasive in software applications, how does it relate to defects and change in general, and what can be done to improve efforts to mitigate it?This thesis investigates dependency cycles among software components; an aspect of software structural complexity, to find how such properties correlate with defect measures and change rates, and how this knowledge can motivate to refactor and improve these possible defects hotspots in affected systems. The two main research questions to achieve these objectives are stated as follows:
RQ1.What is the effect of dependency cycles on external quality measures of software systems?RQ2. How to refactor dependency cycle to impact the structural quality and reduce refactoring efforts?This work contributes mainly to improvement in software quality (maintainability and indirectly, reliability) and software metrics. The following are the three major contributions of this thesis:C1. Better understanding of how to utilize different defect metrics to improve software quality C2. Identification of the impact of dependency cycles on software quality C2-1: Identification of dependency cycles and neighbourhood as defect hotspots in software systems C2-2: Better understanding of the change impact of dependency cycles C3. Tool and metrics to refactor defect-and change-prone hotspots in dependency cycles C3-1: Added metrics to understand the complexity of components and improve the refactoring of cyclically dependent components C3-2: A cycle breaking decision support system to refactor cyclically connected components ii iii Preface