Search engine for discovering works of Art, research articles, and books related to Art and Culture
ShareThis
Javascript must be enabled to continue!

Python code smells detection using conventional machine learning models

View through CrossRef
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.
Title: Python code smells detection using conventional machine learning models
Description:
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.

Related Results

Software Metric Based Impact Analysis of Code Smells ‐ A Large Scale Empirical Study
Software Metric Based Impact Analysis of Code Smells ‐ A Large Scale Empirical Study
ABSTRACTContextCode smells are indicators of poor design and implementation choices that negatively affect software quality and maintainability. Moreover, it is difficult and time‐...
Exploring Test Smells Across Programming Languages: A Systematic Mapping Study
Exploring Test Smells Across Programming Languages: A Systematic Mapping Study
Tests are essential for ensuring code quality in software development. However, poor implementation practices can compromise the maintainability and evolution of test code, leading...
Dynamic stacking ensemble for cross-language code smell detection
Dynamic stacking ensemble for cross-language code smell detection
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 model...
Test smells 20 years later: detectability, validity, and reliability
Test smells 20 years later: detectability, validity, and reliability
AbstractTest smells aim to capture design issues in test code that reduces its maintainability. These have been extensively studied and generally found quite prevalent in both huma...
Selection of Injectable Drug Product Composition using Machine Learning Models (Preprint)
Selection of Injectable Drug Product Composition using Machine Learning Models (Preprint)
BACKGROUND As of July 2020, a Web of Science search of “machine learning (ML)” nested within the search of “pharmacokinetics or pharmacodynamics” yielded over 100...
Discovering code smells in Javascript software using clustering techniques
Discovering code smells in Javascript software using clustering techniques
A presença de code smells em projetos de software têm consequências negativas no que diz respeito a coesão e manutenibilidade do código. Assim sendo, a análise de técnicas usadas p...
Explaining the Imperfect: How do LLMs Respond to Smelly Code?
Explaining the Imperfect: How do LLMs Respond to Smelly Code?
Code smells are indicators of suboptimal design or implementation that contribute to technical debt, impairing software comprehensibility and maintainability. While Large Language ...
An empirical study into the effects of transpilation on quantum circuit smells
An empirical study into the effects of transpilation on quantum circuit smells
AbstractQuantum computing is a promising field that can solve complex problems beyond traditional computers’ capabilities. Developing high-quality quantum software applications, ca...

Back to Top