• 文献检索
  • 文档翻译
  • 深度研究
  • 学术资讯
  • Suppr Zotero 插件Zotero 插件
  • 邀请有礼
  • 套餐&价格
  • 历史记录
应用&插件
Suppr Zotero 插件Zotero 插件浏览器插件Mac 客户端Windows 客户端微信小程序
定价
高级版会员购买积分包购买API积分包
服务
文献检索文档翻译深度研究API 文档MCP 服务
关于我们
关于 Suppr公司介绍联系我们用户协议隐私条款
关注我们

Suppr 超能文献

核心技术专利:CN118964589B侵权必究
粤ICP备2023148730 号-1Suppr @ 2026

文献检索

告别复杂PubMed语法,用中文像聊天一样搜索,搜遍4000万医学文献。AI智能推荐,让科研检索更轻松。

立即免费搜索

文件翻译

保留排版,准确专业,支持PDF/Word/PPT等文件格式,支持 12+语言互译。

免费翻译文档

深度研究

AI帮你快速写综述,25分钟生成高质量综述,智能提取关键信息,辅助科研写作。

立即免费体验

用于跨语言代码异味检测的动态堆叠集成方法。

Dynamic stacking ensemble for cross-language code smell detection.

作者信息

Aljamaan Hamoud

机构信息

Information and Computer Science Department, King Fahd University of Petroleum and Minerals, Dhahran, Saudi Arabia.

Interdisciplinary Research Center for Finance and Digital Economy, King Fahd University of Petroleum and Minerals, Dhahran, Saudi Arabia.

出版信息

PeerJ Comput Sci. 2024 Aug 15;10:e2254. doi: 10.7717/peerj-cs.2254. eCollection 2024.

DOI:10.7717/peerj-cs.2254
PMID:39314734
原文链接:https://pmc.ncbi.nlm.nih.gov/articles/PMC11419637/
Abstract

Code smells refer to poor design and implementation choices by software engineers that might affect the overall software quality. Code smells detection using machine learning models has become a popular area to build effective models that are capable of detecting different code smells in multiple programming languages. However, the process of building of such effective models has not reached a state of stability, and most of the existing research focuses on Java code smells detection. The main objective of this article is to propose dynamic ensembles using two strategies, namely greedy search and backward elimination, which are capable of accurately detecting code smells in two programming languages (., Java and Python), and which are less complex than full stacking ensembles. The detection performance of dynamic ensembles were investigated within the context of four Java and two Python code smells. The greedy search and backward elimination strategies yielded different base models lists to build dynamic ensembles. In comparison to full stacking ensembles, dynamic ensembles yielded less complex models when they were used to detect most of the investigated Java and Python code smells, with the backward elimination strategy resulting in less complex models. Dynamic ensembles were able to perform comparably against full stacking ensembles with no significant detection loss. This article concludes that dynamic stacking ensembles were able to facilitate the effective and stable detection performance of Java and Python code smells over all base models and with less complexity than full stacking ensembles.

摘要

代码异味是指软件工程师做出的可能影响软件整体质量的糟糕设计和实现选择。使用机器学习模型进行代码异味检测已成为构建能够检测多种编程语言中不同代码异味的有效模型的热门领域。然而,构建此类有效模型的过程尚未达到稳定状态,并且现有的大多数研究都集中在Java代码异味检测上。本文的主要目标是提出使用两种策略的动态集成方法,即贪心搜索和反向消除,它们能够准确检测两种编程语言(即Java和Python)中的代码异味,并且比完全堆叠集成方法更简单。在四种Java代码异味和两种Python代码异味的背景下研究了动态集成方法的检测性能。贪心搜索和反向消除策略产生了不同的基础模型列表来构建动态集成。与完全堆叠集成相比,当使用动态集成来检测大多数研究的Java和Python代码异味时,它们产生的模型更简单,反向消除策略产生的模型更简单。动态集成能够与完全堆叠集成相媲美,且检测损失不显著。本文得出结论,动态堆叠集成能够在所有基础模型上促进对Java和Python代码异味的有效且稳定检测,并且比完全堆叠集成更简单。

https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/e9c16ce89628/peerj-cs-10-2254-g005.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/eabb9ac3792d/peerj-cs-10-2254-g001.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/1c0bbaa2662c/peerj-cs-10-2254-g002.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/d0ea776bd23c/peerj-cs-10-2254-g003.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/fe747f1cb5d2/peerj-cs-10-2254-g004.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/e9c16ce89628/peerj-cs-10-2254-g005.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/eabb9ac3792d/peerj-cs-10-2254-g001.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/1c0bbaa2662c/peerj-cs-10-2254-g002.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/d0ea776bd23c/peerj-cs-10-2254-g003.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/fe747f1cb5d2/peerj-cs-10-2254-g004.jpg
https://cdn.ncbi.nlm.nih.gov/pmc/blobs/0464/11419637/e9c16ce89628/peerj-cs-10-2254-g005.jpg

相似文献

1
Dynamic stacking ensemble for cross-language code smell detection.用于跨语言代码异味检测的动态堆叠集成方法。
PeerJ Comput Sci. 2024 Aug 15;10:e2254. doi: 10.7717/peerj-cs.2254. eCollection 2024.
2
Python code smells detection using conventional machine learning models.使用传统机器学习模型检测Python代码异味。
PeerJ Comput Sci. 2023 May 29;9:e1370. doi: 10.7717/peerj-cs.1370. eCollection 2023.
3
Empirical study of the relationship between design patterns and code smells.设计模式与代码异味关系的实证研究。
PLoS One. 2020 Apr 16;15(4):e0231731. doi: 10.1371/journal.pone.0231731. eCollection 2020.
4
On the adequacy of static analysis warnings with respect to code smell prediction.关于静态分析警告在代码异味预测方面的充分性。
Empir Softw Eng. 2022;27(3):64. doi: 10.1007/s10664-022-10126-5. Epub 2022 Mar 17.
5
A Unified Dynamic Programming Framework for the Analysis of Interacting Nucleic Acid Strands: Enhanced Models, Scalability, and Speed.用于分析相互作用核酸链的统一动态规划框架:增强模型、可扩展性和速度
ACS Synth Biol. 2020 Oct 16;9(10):2665-2678. doi: 10.1021/acssynbio.9b00523. Epub 2020 Sep 10.
6
A study of dealing class imbalance problem with machine learning methods for code smell severity detection using PCA-based feature selection technique.一项使用基于主成分分析(PCA)的特征选择技术,运用机器学习方法处理代码异味严重程度检测中的类别不平衡问题的研究。
Sci Rep. 2023 Sep 27;13(1):16245. doi: 10.1038/s41598-023-43380-8.
7
Machine learning-based test smell detection.基于机器学习的测试异味检测。
Empir Softw Eng. 2024;29(2):55. doi: 10.1007/s10664-023-10436-2. Epub 2024 Mar 5.
8
An open-source natural language processing toolkit to support software development: addressing automatic bug detection, code summarisation and code search.一个支持软件开发的开源自然语言处理工具包:解决自动错误检测、代码总结和代码搜索问题。
Open Res Eur. 2023 Oct 27;2:37. doi: 10.12688/openreseurope.14507.2. eCollection 2022.
9
Greedy and Linear Ensembles of Machine Learning Methods Outperform Single Approaches for QSPR Regression Problems.在定量构效关系回归问题中,机器学习方法的贪婪和线性集成比单一方法表现更优。
Mol Inform. 2015 Sep;34(9):634-47. doi: 10.1002/minf.201400122. Epub 2015 Mar 25.
10
A novel code representation for detecting Java code clones using high-level and abstract compiled code representations.一种使用高级和抽象的编译代码表示来检测 Java 代码克隆的新代码表示方法。
PLoS One. 2024 May 10;19(5):e0302333. doi: 10.1371/journal.pone.0302333. eCollection 2024.

本文引用的文献

1
A study of dealing class imbalance problem with machine learning methods for code smell severity detection using PCA-based feature selection technique.一项使用基于主成分分析(PCA)的特征选择技术,运用机器学习方法处理代码异味严重程度检测中的类别不平衡问题的研究。
Sci Rep. 2023 Sep 27;13(1):16245. doi: 10.1038/s41598-023-43380-8.
2
Python code smells detection using conventional machine learning models.使用传统机器学习模型检测Python代码异味。
PeerJ Comput Sci. 2023 May 29;9:e1370. doi: 10.7717/peerj-cs.1370. eCollection 2023.
3
StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics.
StackGenVis:使用性能指标对齐堆叠集成学习的数据、算法和模型。
IEEE Trans Vis Comput Graph. 2021 Feb;27(2):1547-1557. doi: 10.1109/TVCG.2020.3030352. Epub 2021 Jan 28.