Fine‐grained Analysis of Dependency Cycles among Classes

Qiong Feng,Ran Mo
DOI: https://doi.org/10.1002/smr.2496
2022-01-01
Journal of Software
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.
What problem does this paper attempt to address?