返回
Python code smells detection using conventional machine learning models
Python代码使用传统机器学习模型进行气味检测
DOI:10.7717/peerj-cs.1370.png)
摘要
En 中文
Code smells are poor code design or implementation that affect the code maintenance process and reduce the software quality. Therefore, code smell detection is important in software building. Recent studies utilized machine learning algorithms for code smell detection. However, most of these studies focused on code smell detection using Java programming language code smell datasets. This article proposes a Python code smell dataset for Large Class and Long Method code smells. The built dataset contains 1,000 samples for each code smell, with 18 features extracted from the source code. Furthermore, we investigated the detection performance of six machine learning models as baselines in Python code smells detection. The baselines were evaluated based on Accuracy and Matthews correlation coefficient (MCC) measures. Results indicate the superiority of Random Forest ensemble in Python Large Class code smell detection by achieving the highest detection performance of 0.77 MCC rate, while decision tree was the best performing model in Python Long Method code smell detection by achieving the highest MCC Rate of 0.89.
Keyword:
Python
Code smell
Detection
Machine learning
Large class
Long method
AI总结
对已上传原文的论文进行重点信息的提取,主要内容包括:简要概述、研究摘要、背景介绍、关键亮点、图文解析、展望与总结。
期刊
IF:
2.5
论文数:
3.4K
被引数:
9.4K
机构
暂无机构信息
引用论文
Comparing and experimenting machine learning techniques for code smell detection比较和实验用于代码气味检测的机器学习技术
Code smells and refactoring: A tertiary systematic review of challenges and observations代码气味和重构: 挑战和观察的三级系统回顾
On the diffuseness and the impact on maintainability of code smells: a large scale empirical investigation关于代码气味的扩散性及其对可维护性的影响: 大规模的实证研究

