Skip to main content
QUICK REVIEW

[Paper Review] Towards Anticipation of Architectural Smells using Link Prediction Techniques

J. Andrés Díaz‐Pace, Antonela Tommasel|arXiv (Cornell University)|Aug 20, 2018
Software Engineering ResearchComputer Science20 references11 citations
TL;DR

This paper proposes a proactive approach to anticipate architectural smells—specifically cyclic and hub-like dependencies—by applying link prediction techniques to package dependency graphs derived from software system versions. Using machine learning with topological and content-based features, the method predicts likely future dependencies and identifies smell instances with high recall, enabling early detection before code changes are implemented.

ABSTRACT

Software systems naturally evolve, and this evolution often brings design problems that cause system degradation. Architectural smells are typical symptoms of such problems, and several of these smells are related to undesired dependencies among modules. The early detection of these smells is important for developers, because they can plan ahead for maintenance or refactoring efforts, thus preventing system degradation. Existing tools for identifying architectural smells can detect the smells once they exist in the source code. This means that their undesired dependencies are already created. In this work, we explore a forward-looking approach that is able to infer groups of likely module dependencies that can anticipate architectural smells in a future system version. Our approach considers the current module structure as a network, along with information from previous versions, and applies link prediction techniques (from the field of social network analysis). In particular, we focus on dependency-related smells, such as Cyclic Dependency and Hublike Dependency, which fit well with the link prediction model. An initial evaluation with two open-source projects shows that, under certain considerations, the predictions of our approach are satisfactory. Furthermore, the approach can be extended to other types of dependency-based smells or metrics.

Motivation & Objective

  • To address the limitation of existing tools that detect architectural smells only after they appear in code.
  • To proactively predict the emergence of dependency-based architectural smells before they are implemented.
  • To improve early detection by leveraging historical system versions and machine learning on dependency graphs.
  • To evaluate the feasibility and performance of link prediction for anticipating architectural smells in real-world systems.

Proposed method

  • Model the current and past system versions as package dependency graphs, treating dependencies as links in a network.
  • Apply link prediction techniques from social network analysis to infer likely future module dependencies.
  • Train a machine learning classifier using topological features (e.g., common neighbors, Jaccard index) and content-based features (e.g., code similarity, package names) to predict new dependencies.
  • Use a filtering strategy based on known smell patterns (e.g., cycles, hubs) to transform predicted dependencies into detected architectural smells.
  • Evaluate predictions on two open-source Java systems using versioned dependency graphs and ground-truth smell instances from future versions.
  • Integrate topological and content-based features to improve prediction accuracy and recall for smell detection.

Experimental results

Research questions

  • RQ1Can link prediction techniques effectively anticipate architectural smells in future software versions?
  • RQ2How does incorporating content-based features improve the detection of dependency-based architectural smells?
  • RQ3To what extent do topological features of package dependency graphs support accurate prediction of cyclic and hub-like dependencies?
  • RQ4How do different filtering strategies affect the precision and recall of predicted architectural smells?
  • RQ5How sensitive is the prediction performance to system structure and version history?

Key findings

  • The approach achieved high recall in detecting actual architectural smells in future system versions, indicating strong potential for early warning.
  • The inclusion of content-based features significantly improved the performance of the machine learning classifier in predicting likely dependencies.
  • The prediction of individual dependencies was effective, with the classifier correctly identifying many of the dependencies that later formed architectural smells.
  • Filtering strategies based on known smell patterns (e.g., cycles, hubs) successfully transformed predicted dependencies into detectable smell instances.
  • The method’s performance was sensitive to the system’s overall structure and version history, suggesting context-dependent behavior.
  • Despite some false positives, the approach demonstrated feasibility and scalability for proactive architectural smell detection in real-world systems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.