An Empirical Study of Untangling Patterns of Two-Class Dependency Cycles

06/18/2023
by   Qiong Feng, et al.
0

Dependency cycles pose a significant challenge to software quality and maintainability. However, there is limited understanding of how practitioners resolve dependency cycles in real-world scenarios. This paper presents an empirical study investigating the recurring patterns employed by software developers to resolve dependency cycles between two classes in practice. We analyzed the data from 18 open-source projects across different domains and manually inspected hundreds of cycle untangling cases. Our findings reveal that developers tend to employ five recurring patterns to address dependency cycles. The chosen patterns are not only determined by dependency relations between cyclic classes, but also highly related to their design context, i.e., how cyclic classes depend on or are depended by their neighbor classes. Through this empirical study, we also discovered three common mistakes developers usually made during cycles' handling. These recurring patterns and common mistakes observed in dependency cycles' practice can serve as a taxonomy to improve developers' awareness and also be used as learning materials for students in software engineering and inexperienced developers. Our results also suggest that, in addition to considering the internal structure of dependency cycles, automatic tools need to consider the design context of cycles to provide better support for refactoring dependency cycles.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/28/2020

An Empirical Study of Bots in Software Development – Characteristics and Challenges from a Practitioner's Perspective

Software engineering bots - automated tools that handle tedious tasks - ...
research
05/18/2023

Patterns in Docker Compose Multi-Container Orchestration

Software design patterns present general code solutions to common softwa...
research
04/08/2021

Do Communities in Developer Interaction Networks align with Subsystem Developer Teams? An Empirical Study of Open Source Systems

Studies over the past decade demonstrated that developers contributing t...
research
11/13/2021

Refactoring for Reuse: An Empirical Study

Refactoring is the de-facto practice to optimize software health. While ...
research
10/23/2021

How Do I Refactor This? An Empirical Study on Refactoring Trends and Topics in Stack Overflow

An essential part of software maintenance and evolution, refactoring is ...
research
07/09/2021

An Empirical Study of Data Constraint Implementations in Java

Software systems are designed according to guidelines and constraints de...
research
06/15/2022

Automating Dependency Updates in Practice: An Exploratory Study on GitHub Dependabot

Dependency management bots automatically open pull requests to update so...

Please sign up or login with your details

Forgot password? Click here to reset