arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.19254cs.SE
收藏

设计异味与角色定型之间关系的实证研究

Empirical Investigation of the Relationship Between Design Smells and Role Stereotypes

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

AI总结:

本文通过统计分析和无监督学习方法,基于30个GitHub仓库的11,350个类,实证揭示了设计异味与角色定型之间的关联,发现桌面应用比移动应用更易出现设计异味,且服务提供者和信息持有者角色定型尤为突出,为软件团队预防和纠正设计异味提供了指导。

摘要:

在软件开发过程中,不良的设计和实现选择会对软件可维护性产生不利影响。设计异味(Design smells)作为设计不良片段的反复出现模式,标志着这些问题。角色定型(Role-stereotypes)表示类在系统设计中所承担的一般职责。尽管角色定型与设计异味的概念不同,但两者都对软件系统的设计和维护有重要贡献。理解这些方面之间的关系对于提高软件可维护性、代码质量、高效代码审查、引导式重构以及角色特定指标的设计至关重要。本文采用探索性方法,结合统计分析和无监督学习方法,以理解设计异味如何与桌面和移动应用程序中的角色定型相关联。通过分析来自30个GitHub仓库的11,350个类,我们识别出若干种经常在某些角色定型中共同出现的设计异味。具体而言,在我们研究的六(6)种角色定型中,有三(3)种更容易出现设计异味。我们还考察了设计异味在两个生态系统中的差异,这种差异由其底层架构的显著不同所驱动。研究结果表明,设计异味在桌面应用程序中比在移动应用程序中更为普遍,尤其是在服务提供者(Service Provider)和信息持有者(Information Holder)角色定型中。此外,无监督学习方法显示,某些角色定型对或角色定型组容易出现相似类型的设计异味。我们认为这些关系与角色定型之间的特征属性和协作属性相关。本研究的见解为软件团队实施设计异味预防和纠正机制提供了有价值的指导,确保在设计和维护阶段保持概念完整性。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑