Abstract

Code smells are poor design and implementation choices that hinders the overall software quality. Code smells detection using machine learning models has been an active research area to assist software engineers in identifying smelly code. In this paper, we empirically investigate the detection performance of Voting ensemble in detecting class-level and method-level code smells. We built our Voting ensemble in a heterogeneous manner using five different base models: Decision Trees, Logistic Regression, Support Vector Machines, Multi-Layer Perceptron, and Stochastic Gradient Descent models. Predictions output were aggregated using the Soft voting to form the final ensemble prediction output. Voting ensemble detection performance was evaluated against each base model and within the context of five code smells: God Class, Data Class, Long Method, Feature Envy, Long Parameter List, and Switch Statements smells. Statistical pairwise comparison results indicates the superior performance of Voting ensemble in detecting all code smells, while base models had varying detection performance across code smells.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call