Predicting Software Reliability Through Machine Learning Analysis of Code Smells
摘要
In today's technologically advanced world, numerous software applications are developed each month, requiring extensive lines of code and collaboration among software developers. The developed software might have repeated lines of code for function calls, imprecise variable types, lack of use of built-in functions like list comprehension, and the presence of lengthy methods. Over time, these issues will hinder processing speed, increase the risk of failure, and make the software more susceptible to bugs and errors (Kaur and Singh in Int J Appl Eng Res 13:10, 2018, [18]). This is known as Code Smell. It contributes to poor code quality and hence increases the technical debt. These are maintainability-related issues in the codes that need to be rectified. The present study analyzes the code smells detected using SonarQube which is a static method tool used to detect such errors or smells before the testing phase on the software built on Python (Caram in Int J Softw Eng Knowl Eng 29:285–316, 2019, [20]). The paper shows a study using Machine Learning approach on the SonarQube generated dataset of Code Smells. The aim is to experiment with various classification models on the code smell reliability factors and test if a generalized rule can be captured by the Machine Leaning Classification models. The experiment achieved an accuracy of 92% in classifying the reliability factors for the models of K Neighbors Classifier and Random Forest Classifier.