Code smell detection by exploiting parameter tuning techniques for sustainable software evolution
摘要
Sustainable software development involves effective techniques to preserve code quality as systems grow in complexity. Current techniques may have trouble with unbalanced data or be unreliable in detecting smells. However, to the best of our knowledge about the literature towards the field, experimental evaluation is carried out in the direction that the impact of parameter tuning on machine learning models is not significant. To address these challenges, we empirically experimented all possible combinations of 22 feature selection techniques, 14 imbalance handling methods, for AdaBoost classifier, applying 5 parameter tuning techniques and evaluating models with 7 performance metrics on 3 types of code smells (God Class, Feature Envy, Long Method) by considering standard code smell datasets. 4620 models were generated and evaluated to determine which combinations had the best performance in detecting each of the aforementioned code smells. In particular, 909 models exceeded 57.88% accuracy for Feature Envy, 533 models surpassed 80.84% for God Class, and 1,001 models outperformed 76.40% for Long Method. By optimizing AdaBoost for varied feature selection, imbalance handling and parameter tuning scenarios, we provide a replicable framework for improving code quality assessment and supporting sustainable software development practices.