Impact of Co-Occurrences of Code Smells and Design Patterns on Internal Code Quality Attributes

IF 1.4 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING
IET Software Pub Date : 2025-12-01 DOI:10.1049/sfw2/5579438
Sania Imran, Irum Inayat, Maya Daneva
{"title":"Impact of Co-Occurrences of Code Smells and Design Patterns on Internal Code Quality Attributes","authors":"Sania Imran,&nbsp;Irum Inayat,&nbsp;Maya Daneva","doi":"10.1049/sfw2/5579438","DOIUrl":null,"url":null,"abstract":"<p>The structural features of a code section that may indicate a more serious issue with the design of a system or code are known as code smells. Design patterns, on the other hand, are meant to describe the best reusable solution for creating object-oriented software systems. Even though design patterns and code smells are very different, they may co-occur. In fact, there may be a significant connection among the two, which requires further research. This study aims to (i) identify design patterns and code smells in web gaming code, (ii) investigate the co-occurrence of the two, and (iii) analyze the effects of these co-occurrences on internal quality aspects of code. An experiment is carried out on JavaScript (JS) web games utilizing machine learning classifiers to investigate the influence of co-occurrence on potential code smells and design patterns to evaluate games from a quality perspective. Moreover, statistical testing is performed to identify the impact of co-occurrences of code smells and design patterns on internal quality attributes. After examining the data, we determined that random forest is the most effective classifier, achieving an accuracy of 99.126% and 98.99% for both experimental situations, respectively. Moreover, on applying the Wilcoxon signed rank test, we found that co-occurrence has no impact on the coupling and complexity of web games codes, whereas there is a significant impact of co-occurrence on cohesion, size, and inheritance. Our results may guide developers in writing efficient games code to add to this swiftly growing market.</p>","PeriodicalId":50378,"journal":{"name":"IET Software","volume":"2025 1","pages":""},"PeriodicalIF":1.4000,"publicationDate":"2025-12-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://ietresearch.onlinelibrary.wiley.com/doi/epdf/10.1049/sfw2/5579438","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IET Software","FirstCategoryId":"94","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1049/sfw2/5579438","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0

Abstract

The structural features of a code section that may indicate a more serious issue with the design of a system or code are known as code smells. Design patterns, on the other hand, are meant to describe the best reusable solution for creating object-oriented software systems. Even though design patterns and code smells are very different, they may co-occur. In fact, there may be a significant connection among the two, which requires further research. This study aims to (i) identify design patterns and code smells in web gaming code, (ii) investigate the co-occurrence of the two, and (iii) analyze the effects of these co-occurrences on internal quality aspects of code. An experiment is carried out on JavaScript (JS) web games utilizing machine learning classifiers to investigate the influence of co-occurrence on potential code smells and design patterns to evaluate games from a quality perspective. Moreover, statistical testing is performed to identify the impact of co-occurrences of code smells and design patterns on internal quality attributes. After examining the data, we determined that random forest is the most effective classifier, achieving an accuracy of 99.126% and 98.99% for both experimental situations, respectively. Moreover, on applying the Wilcoxon signed rank test, we found that co-occurrence has no impact on the coupling and complexity of web games codes, whereas there is a significant impact of co-occurrence on cohesion, size, and inheritance. Our results may guide developers in writing efficient games code to add to this swiftly growing market.

Abstract Image

Abstract Image

Abstract Image

Abstract Image

代码气味和设计模式共同出现对内部代码质量属性的影响
代码段的结构特征可能表明系统或代码设计中存在更严重的问题,这些特征被称为代码气味。另一方面,设计模式旨在描述创建面向对象软件系统的最佳可重用解决方案。尽管设计模式和代码气味非常不同,但它们可能同时出现。事实上,这两者之间可能存在着重要的联系,这需要进一步的研究。本研究旨在(i)识别网页游戏代码中的设计模式和代码气味,(ii)调查两者的共生关系,(iii)分析这些共生关系对代码内部质量方面的影响。我们利用机器学习分类器在JavaScript网页游戏上进行了一项实验,以调查共现对潜在代码气味和设计模式的影响,从而从质量角度评估游戏。此外,执行统计测试以确定代码气味和设计模式共同出现对内部质量属性的影响。在检查数据后,我们确定随机森林是最有效的分类器,在两种实验情况下分别达到99.126%和98.99%的准确率。此外,应用Wilcoxon符号秩检验,我们发现共现对网页游戏代码的耦合性和复杂性没有影响,而共现对网页游戏代码的内聚性、大小和继承性有显著影响。我们的研究结果可能会指导开发者编写有效的游戏代码,以加入这个快速增长的市场。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
IET Software
IET Software 工程技术-计算机:软件工程
CiteScore
4.20
自引率
0.00%
发文量
27
审稿时长
9 months
期刊介绍: IET Software publishes papers on all aspects of the software lifecycle, including design, development, implementation and maintenance. The focus of the journal is on the methods used to develop and maintain software, and their practical application. Authors are especially encouraged to submit papers on the following topics, although papers on all aspects of software engineering are welcome: Software and systems requirements engineering Formal methods, design methods, practice and experience Software architecture, aspect and object orientation, reuse and re-engineering Testing, verification and validation techniques Software dependability and measurement Human systems engineering and human-computer interaction Knowledge engineering; expert and knowledge-based systems, intelligent agents Information systems engineering Application of software engineering in industry and commerce Software engineering technology transfer Management of software development Theoretical aspects of software development Machine learning Big data and big code Cloud computing Current Special Issue. Call for papers: Knowledge Discovery for Software Development - https://digital-library.theiet.org/files/IET_SEN_CFP_KDSD.pdf Big Data Analytics for Sustainable Software Development - https://digital-library.theiet.org/files/IET_SEN_CFP_BDASSD.pdf
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书