An Empirical Study on Feature Extraction Using Ensemble Deep Learning for Code Smell Detection
摘要
Code smell detection involves identifying poorly designed and implemented code segments, which has become a focal point of research. Recently, Deep Learning (DL) methodologies have been employed in this domain due to the intricate features produced by the neural network computations, coupled with DL’s ability to automatically learn hierarchical representations from data, making it particularly suitable for complex tasks such as code smell detection. Convolutional Neural Networks (CNN), for instance, excel at local features, while recurrent networks (RNN) like LSTM and GRU capture long-term dependencies. Ensemble techniques combine these strengths, mitigating individual weaknesses. This study compares the effectiveness of ensemble models for code smell detection. It creates stacking ensembles(a mixture of homogeneous and heterogeneous) with baseline DL models with soft voting. The ensemble is more accurate than individual models for the following code smells: Large Class, Refused Bequest, Complex Class, Lazy Class, and Spaghetti Code. The Statistical analysis assures the superior performance of the stacked ensemble, highlighting that base models showed different behaviors for every smell.