Table of Contents
Fetching ...

Analyzing Variations in Dependency Distributions Due to Code Smell Interactions

Zushuai Zhang, Elliott Wen, Ewan Tempero

TL;DR

This study investigates whether interactions between code smells affect the distribution of static dependencies in software systems. Using 116 open-source Java projects and a CodeQL-based pipeline with metric-based smell detection, it applies Mann-Whitney U tests and Cliff’s Delta to show that smell interactions generally increase total dependencies (found in $28$ of $36$ contrasts) and exhibit consistent directional changes for data access and FM call dependencies across different class contexts. The authors propose a multi-dimensional typology (depType: FM call vs data access; role: provider vs consumer; strength: strong vs weak) to predict dependency changes and guide refactoring, along with interaction-guided strategies for detecting additional smells and prioritizing refactoring efforts. These findings offer practical guidance for improving modularity and smell management by focusing on interacting smells, and they lay groundwork for enhanced smell detection and targeted refactoring in real-world Java projects. The work also discusses threats to validity and outlines future directions to broaden smells, contexts, and maintainability metrics.

Abstract

Dependencies between modules can trigger ripple effects when changes are made, making maintenance complex and costly, so minimizing these dependencies is crucial. Consequently, understanding what drives dependencies is important. One potential factor is code smells, which are symptoms in code that indicate design issues and reduce code quality. When multiple code smells interact through static dependencies, their combined impact on quality can be even more severe. While individual code smells have been widely studied, the influence of their interactions remains underexplored. In this study, we aim to investigate whether and how the distribution of static dependencies changes in the presence of code smell interactions. We conducted a dependency analysis on 116 open-source Java systems to quantify these interactions by comparing cases where code smell interactions exist and where they do not. Our results suggest that overall, code smell interactions are linked to a significant increase in total dependencies in 28 out of 36 cases, and that all code smells are associated with a consistent change direction (increase or decrease) in certain dependency types when interacting with other code smells. Consequently, this information can be used to support more accurate code smell detection and prioritization, as well as to develop more effective refactoring strategies.

Analyzing Variations in Dependency Distributions Due to Code Smell Interactions

TL;DR

This study investigates whether interactions between code smells affect the distribution of static dependencies in software systems. Using 116 open-source Java projects and a CodeQL-based pipeline with metric-based smell detection, it applies Mann-Whitney U tests and Cliff’s Delta to show that smell interactions generally increase total dependencies (found in of contrasts) and exhibit consistent directional changes for data access and FM call dependencies across different class contexts. The authors propose a multi-dimensional typology (depType: FM call vs data access; role: provider vs consumer; strength: strong vs weak) to predict dependency changes and guide refactoring, along with interaction-guided strategies for detecting additional smells and prioritizing refactoring efforts. These findings offer practical guidance for improving modularity and smell management by focusing on interacting smells, and they lay groundwork for enhanced smell detection and targeted refactoring in real-world Java projects. The work also discusses threats to validity and outlines future directions to broaden smells, contexts, and maintainability metrics.

Abstract

Dependencies between modules can trigger ripple effects when changes are made, making maintenance complex and costly, so minimizing these dependencies is crucial. Consequently, understanding what drives dependencies is important. One potential factor is code smells, which are symptoms in code that indicate design issues and reduce code quality. When multiple code smells interact through static dependencies, their combined impact on quality can be even more severe. While individual code smells have been widely studied, the influence of their interactions remains underexplored. In this study, we aim to investigate whether and how the distribution of static dependencies changes in the presence of code smell interactions. We conducted a dependency analysis on 116 open-source Java systems to quantify these interactions by comparing cases where code smell interactions exist and where they do not. Our results suggest that overall, code smell interactions are linked to a significant increase in total dependencies in 28 out of 36 cases, and that all code smells are associated with a consistent change direction (increase or decrease) in certain dependency types when interacting with other code smells. Consequently, this information can be used to support more accurate code smell detection and prioritization, as well as to develop more effective refactoring strategies.

Paper Structure

This paper contains 25 sections, 1 equation, 9 figures, 5 tables.

Figures (9)

  • Figure 1: Interaction Example
  • Figure 2: Data Collection Overview
  • Figure 3: Cliff’s Delta Heatmap (bold = significant Mann-Whitney U test)
  • Figure 4: Cliff's delta: CS1$\rightarrow$CS2 vs. nonCS1$\rightarrow$CS2 (data access dependency)
  • Figure 5: Cliff's delta: CS1$\leftarrow$CS2 vs. nonCS1$\leftarrow$CS2 (data access dependency)
  • ...and 4 more figures