Skip to main content
Log in

Automated detection of class diagram smells using self-supervised learning

  • Published:
Automated Software Engineering Aims and scope Submit manuscript

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.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

Notes

  1. https://github.com/amalazba/Automated-Detection-of-Class-Diagram-Smells-Using-Self-Supervised-Learning

  2. http://www.models-db.com/

  3. https://models-lab.github.io/blog/2021/modelset/

  4. https://www.ptidej.net/tools/designsmells/materials/Occurrences/080920%20-%20BDTEX%20-%20QSIC09%20Paper/plfng_view

  5. https://www.ptidej.net/tools/designsmells/materials/Occurrences/100720%20-%20DETEX%20-%20TSE10%20Article/plfng_view

References

Download references

Acknowledgements

The authors acknowledge the support of King Fahd University of Petroleum and Minerals in the development of this work.

Author information

Authors and Affiliations

Authors

Contributions

AA wrote the main manuscript text. HA and MA edited and reviewed the manuscript.

Corresponding author

Correspondence to Mohammad Alshayeb.

Ethics declarations

Conflict of interest

The authors declare no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Alazba, A., Aljamaan, H. & Alshayeb, M. Automated detection of class diagram smells using self-supervised learning. Autom Softw Eng 31, 29 (2024). https://doi.org/10.1007/s10515-024-00429-w

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10515-024-00429-w

Keywords

Navigation