Fine‐grained analysis of dependency cycles among classes. Issue 1 (1st August 2022) - Feng, Qiong; Mo, Ran
Abstract: Dependency cycles have been claimed to incur negative impacts on software quality and make a system difficult to test, maintain, and reuse. Previous studies have investigated dependency cycles' evolution and proposed various methods to detect and break dependency cycles. While these studies provide valuable inputs for understanding dependency cycles, we do not know how developers address dependency cycles in their daily activities and whether dependency cycles' resolution follows certain patterns. Therefore, in this paper, using the data from 18 open‐source projects, we extracted dependency cycles along with their changes from each commit and studied how dependency cycles evolved in a fine‐grained level. Our results demonstrate that, 28.4% of dependency cycles have been continuously changing through different status: aggregating, breaking, newly‐forming, and disappearing. Furthermore, we found that dependency cycles in different shapes present their specific evolution characteristics, for example, star and circle dependency cycles tend to preserve their original shape during aggregation or breaking. In addition, we discovered several recurring patterns that developers applied in fully breaking star and circle dependency cycles. We believe the recurring patterns we summarized have the potential to be automated in breaking dependency cycles in practice. Abstract : This paper conducts an empirical study of dependency cycles' evolution at the commit level and shows that 28.4% of dependency cycles have been aggregating, breaking, newly‐forming, and disappearing. This paper reveals that dependency cycles' aggregation and breaking are highly related to cycles' topological structure. While star‐shaped and circle‐shaped dependency cycles tend to preserve the original shape during evolution, more than 76% of circle‐shaped and star‐shaped dependency cycles' breaking without deleting existing files followed several recurring patterns shown in the figure.