|
Publication
|
Research Title |
Python Code Smell Detection Using Machine Learning |
Date of Distribution |
22 December 2022 |
Conference |
Title of the Conference |
THE 26th INTERNATIONAL COMPUTER SCIENCE AND ENGINEERING CONFERENCE 2022 |
Organiser |
Faculty of Science and Engineering Kasetsart University, Chalermphrakiat Sakon Nakhon Province Campus |
Conference Place |
Kasetsart University, Chalermphrakiat Sakon Nakhon Province Campus |
Province/State |
Sakon Nakhon Province |
Conference Date |
21 December 2022 |
To |
23 December 2022 |
Proceeding Paper |
Volume |
2022 |
Issue |
1 |
Page |
128-133 |
Editors/edition/publisher |
IEEE Xplore |
Abstract |
Python is an increasingly popular programming language used in various software projects and domains. Code smells in Python significantly influences the maintainability, understandability, testability issues. This paper proposes a machine learning-based code smell detection for Python programs. We trained eight machine learning models with a dataset based on 115 open-source Python projects, 39 class-level software metrics, and 22 function-level software metrics. We intended to identify five code smell types in both class and function levels, i.e., long method, long parameter list, large class long scope chaining, and long based class list. Correlation-based feature selection (CFS) and logistic regression-forward stepwise (conditional) selection were employed to improve the performance of the model. This research concluded with an empirical evaluation of the performance of the machine learning approaches against the tuning machine method. The results show that the machine learning method achieved 99.72% accuracy when identifying long method and long base class list. The machine learning-based code smell detection also outperformed the tuning machine method. Moreover, we also found a set of high-impact features that contributed most when identifying each type of code smell. |
Author |
|
Peer Review Status |
มีผู้ประเมินอิสระ |
Level of Conference |
นานาชาติ |
Type of Proceeding |
Full paper |
Type of Presentation |
Oral |
Part of thesis |
true |
Presentation awarding |
false |
Attach file |
|
Citation |
0
|
|
|
|
|
|
|