Improving Code Smell Detection by Reducing Dimensionality Using Ensemble Feature Selection and Machine Learning
摘要
Code smells negatively impact software maintenance and several mitigation tools and/ or techniques have been devised in the past. However, their interpretation is subjective and threshold-dependent. To overcome this limitation several supervised machine learning classifiers have been suggested in the past. However, their performance is highly dependent on the quality of the available dataset. An imbalanced dataset highly degrades a classifier's performance. Moreover, the size of the dataset (in terms of used training and testing features) directly affects the performance and time parameters of the classifier. A reduced dimensionality generally improves the performance and training/ testing time of the classifier. Therefore, this paper aims to propose a new ensemble feature selection technique that helps significantly reduce the dataset’s dimensionality (used features for training and testing purposes). Moreover, the performance of the proposed approach is experimentally evaluated by considering six classifiers for identifying six code smells from the dataset. The suitability of different classifiers in detecting considered code smells is evaluated in two cases, namely by considering all features at once and by considering selected features suggested by the proposed approach. Based on the experimentation, we conclude that the proposed approach is capable of improving and achieving sufficiently high accuracy (> 95%).