Automated detection of class diagram smells using self-supervised learning

Amal Alazba, Hamoud Aljamaan, Mohammad Alshayeb*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

1 Scopus citations

Abstract

Design smells are symptoms of poorly designed solutions that may result in several maintenance issues. While various approaches, including traditional machine learning methods, have been proposed and shown to be effective in detecting design smells, they require extensive manually labeled data, which is expensive and challenging to scale. To leverage the vast amount of data that is now accessible, unsupervised semantic feature learning, or learning without requiring manual annotation labor, is essential. The goal of this paper is to propose a design smell detection method that is based on self-supervised learning. We propose Model Representation with Transformers (MoRT) to learn the UML class diagram features by training Transformers to recognize masked keywords. We empirically show how effective the defined proxy task is at learning semantic and structural properties. We thoroughly assess MoRT using four model smells: the Blob, Functional Decomposition, Spaghetti Code, and Swiss Army Knife. Furthermore, we compare our findings with supervised learning and feature-based methods. Finally, we ran a cross-project experiment to assess the generalizability of our approach. Results show that MoRT is highly effective in detecting design smells.

Original languageEnglish
Article number29
JournalAutomated Software Engineering
Volume31
Issue number1
DOIs
StatePublished - May 2024

Bibliographical note

Publisher Copyright:
© The Author(s), under exclusive licence to Springer Science+Business Media, LLC, part of Springer Nature 2024.

Keywords

  • Bad smell detection
  • Deep learning
  • Self-supervised learning
  • UML class diagram

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'Automated detection of class diagram smells using self-supervised learning'. Together they form a unique fingerprint.

Cite this