Table of Contents
Fetching ...

Empirical Investigation of the Relationship Between Design Smells and Role Stereotypes

Daniel Ogenrwot, Joyce Nakatumba-Nabende, John Businge, Michel R. V. Chaudron

TL;DR

This study empirically links design smells with class role-stereotypes in desktop and mobile Java applications using a dataset of 11,350 classes from 30 OSS projects. It combines Ptidej-based smell detection, 23 role-stereotype features, and unsupervised learning (clustering and association rules) to reveal co-occurrence patterns and cross-ecosystem differences. Key findings show higher smell prevalence in Service Provider, Interfacer, and Information Holder roles, with desktop apps generally more affected; certain role pairs share similar smell profiles, and strong associations exist between specific smells and stereotypes. The results offer actionable guidance for role-aware smell prevention, targeted refactoring, and the development of tailored quality metrics to improve maintainability and code review efficiency in software teams.

Abstract

During software development, poor design and implementation choices can detrimentally impact software maintainability. Design smells, recurring patterns of poorly designed fragments, signify these issues. Role-stereotypes denote the generic responsibilities that classes assume in system design. Although the concepts of role-stereotypes and design smells differ, both significantly contribute to the design and maintenance of software systems. Understanding the relationship between these aspects is crucial for enhancing software maintainability, code quality, efficient code review, guided refactoring, and the design of role-specific metrics. This paper employs an exploratory approach, combining statistical analysis and unsupervised learning methods, to understand how design smells relate to role-stereotypes across desktop and mobile applications. Analyzing 11,350 classes from 30 GitHub repositories, we identified several design smells that frequently co-occur within certain role-stereotypes. Specifically, three (3) out of six (6) role-stereotypes we studied are more prone to design smells. We also examined the variation of design smells across the two ecosystems, driven by notable differences in their underlying architecture. Findings revealed that design smells are more prevalent in desktop than in mobile applications, especially within the Service Provider and Information Holder role-stereotypes. Additionally, the unsupervised learning method showed that certain pairs or groups of role-stereotypes are prone to similar types of design smells. We believe these relationships are associated with the characteristic and collaborative properties between role-stereotypes. The insights from this research provide valuable guidance for software teams on implementing design smell prevention and correction mechanisms, ensuring conceptual integrity during design and maintenance phases.

Empirical Investigation of the Relationship Between Design Smells and Role Stereotypes

TL;DR

This study empirically links design smells with class role-stereotypes in desktop and mobile Java applications using a dataset of 11,350 classes from 30 OSS projects. It combines Ptidej-based smell detection, 23 role-stereotype features, and unsupervised learning (clustering and association rules) to reveal co-occurrence patterns and cross-ecosystem differences. Key findings show higher smell prevalence in Service Provider, Interfacer, and Information Holder roles, with desktop apps generally more affected; certain role pairs share similar smell profiles, and strong associations exist between specific smells and stereotypes. The results offer actionable guidance for role-aware smell prevention, targeted refactoring, and the development of tailored quality metrics to improve maintainability and code review efficiency in software teams.

Abstract

During software development, poor design and implementation choices can detrimentally impact software maintainability. Design smells, recurring patterns of poorly designed fragments, signify these issues. Role-stereotypes denote the generic responsibilities that classes assume in system design. Although the concepts of role-stereotypes and design smells differ, both significantly contribute to the design and maintenance of software systems. Understanding the relationship between these aspects is crucial for enhancing software maintainability, code quality, efficient code review, guided refactoring, and the design of role-specific metrics. This paper employs an exploratory approach, combining statistical analysis and unsupervised learning methods, to understand how design smells relate to role-stereotypes across desktop and mobile applications. Analyzing 11,350 classes from 30 GitHub repositories, we identified several design smells that frequently co-occur within certain role-stereotypes. Specifically, three (3) out of six (6) role-stereotypes we studied are more prone to design smells. We also examined the variation of design smells across the two ecosystems, driven by notable differences in their underlying architecture. Findings revealed that design smells are more prevalent in desktop than in mobile applications, especially within the Service Provider and Information Holder role-stereotypes. Additionally, the unsupervised learning method showed that certain pairs or groups of role-stereotypes are prone to similar types of design smells. We believe these relationships are associated with the characteristic and collaborative properties between role-stereotypes. The insights from this research provide valuable guidance for software teams on implementing design smell prevention and correction mechanisms, ensuring conceptual integrity during design and maintenance phases.
Paper Structure (17 sections, 3 equations, 8 figures, 13 tables, 2 algorithms)

This paper contains 17 sections, 3 equations, 8 figures, 13 tables, 2 algorithms.

Figures (8)

  • Figure 1: The research methodology pipeline. Step 1: data collection; Step 2: design smell detection; Step 3: role-stereotype classification; Step 4: integrate design smell and role-stereotype data to form a fine-grained dataset; Step 5 & Step 6: data analysis and clustering.
  • Figure 2: Correlation analysis illustrating the co-occurrence patterns of design smells.
  • Figure 3: Hierarchical cluster visualization of design Smells that frequently co-occur in desktop (top plot) and mobile (bottom plot) applications.
  • Figure 4: Distribution of design smells in each role-stereotype.
  • Figure 5: Bubble chart showing the distribution of design smells in each category role-stereotype. The bubble size corresponds to the frequency of occurrence of a specific design smell.
  • ...and 3 more figures