Improving and comparing performance of machine learning classifiers optimized by swarm intelligent algorithms for code smell detection

被引:1
|
作者
Jain, Shivani [1 ]
Saha, Anju [1 ]
机构
[1] GGS Indraprastha Univ, USIC&T, Sect 16 C, Delhi 110078, India
关键词
Code Smell Detection; Machine Learning; Meta-heuristic Algorithms; Optimization; Support Vector Machine; PRICE;
D O I
10.1016/j.scico.2024.103140
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
In complex systems, the maintenance phase engenders the emergence of code smells due to incessant shifts in requirements and designs, stringent timelines, and the developer's relative inexperience. While not conventionally classified as errors, code smells inherently signify flawed design structures that lead to future bugs and errors. It increases the software budget and eventually makes the system hard to maintain or completely obsolete. To mitigate these challenges, practitioners must detect and refactor code smells. However, the theoretical interpretation of smell definitions and intelligent establishment of threshold values pose a significant conundrum. Supervised machine learning emerges as a potent strategy to address these problems and alleviate the dependence on expert intervention. The learning mechanism of these algorithms can be refined through data pre-processing and hyperparameter tuning. Selecting the best values for hyperparameters can be tedious and requires an expert. This study introduces an innovative paradigm that fuses twelve swarm-based, meta-heuristic algorithms with two machine learning classifiers, optimizing their hyperparameters, eliminating the need for an expert, and automating the entire code smell detection process. Through this synergistic approach, the highest post-optimization accuracy, precision, recall, F-measure, and ROC-AUC values are 99.09%, 99.20%, 99.09%, 98.06%, and 100%, respectively. The most remarkable upsurge is 35.9% in accuracy, 53.79% in precision, 35.90% in recall, 44.73% in F-measure, and 36.28% in ROC-AUC. Artificial Bee Colony, Grey Wolf, and Salp Swarm Optimizer are the top-performing swarm-intelligent algorithms. God and Data Class are the most readily detectable smells with optimized classifiers. Statistical tests underscore the profound impact of employing swarm-based algorithms to optimize machine learning classifiers, corroborated by statistical tests. This seamless integration enhances classifier performance, automates code smell detection, and offers a robust solution to a persistent software engineering challenge.
引用
收藏
页数:31
相关论文
共 50 条
  • [1] Boosting and Comparing Performance of Machine Learning Classifiers with Meta-heuristic Techniques to Detect Code Smell
    Jain, Shivani
    Saha, Anju
    E-INFORMATICA SOFTWARE ENGINEERING JOURNAL, 2024, 18 (01)
  • [2] Comparing and experimenting machine learning techniques for code smell detection
    Francesca Arcelli Fontana
    Mika V. Mäntylä
    Marco Zanoni
    Alessandro Marino
    Empirical Software Engineering, 2016, 21 : 1143 - 1191
  • [3] Comparing and experimenting machine learning techniques for code smell detection
    Fontana, Francesca Arcelli
    Mantyla, Mika V.
    Zanoni, Marco
    Marino, Alessandro
    EMPIRICAL SOFTWARE ENGINEERING, 2016, 21 (03) : 1143 - 1191
  • [4] Comparing Within- and Cross-Project Machine Learning Algorithms for Code Smell Detection
    De Stefano, Manuel
    Pecorelli, Fabiano
    Palomba, Fabio
    De Lucia, Andrea
    MALTESQUE '21: PROCEEDINGS OF THE 5TH INTERNATIONAL WORKSHOP ON MACHINE LEARNING TECHNIQUES FOR SOFTWARE QUALITY EVOLUTION, 2021, : 1 - 6
  • [5] Code Smell Detection Using Ensemble Machine Learning Algorithms
    Dewangan, Seema
    Rao, Rajwant Singh
    Mishra, Alok
    Gupta, Manjari
    APPLIED SCIENCES-BASEL, 2022, 12 (20):
  • [6] Improving performance with hybrid feature selection and ensemble machine learning techniques for code smell detection
    Jain, Shivani
    Saha, Anju
    SCIENCE OF COMPUTER PROGRAMMING, 2021, 212
  • [7] Comparing Heuristic and Machine Learning Approaches for Metric-Based Code Smell Detection
    Pecorelli, Fabiano
    Palomba, Fabio
    Di Nucci, Dario
    De Lucia, Andrea
    2019 IEEE/ACM 27TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2019), 2019, : 93 - 104
  • [8] An intelligent cyber threat detection: A swarm-optimized machine learning approach
    Qiqieh, Issa
    Alzubi, Omar
    Alzubi, Jafar
    Sreedhar, K. C.
    Al-Zoubi, Ala' M.
    ALEXANDRIA ENGINEERING JOURNAL, 2025, 115 : 553 - 563
  • [9] Improving the performance of Machine Learning Algorithms for TOR detection
    Gurunarayanan, Adityan
    Agrawal, Ankit
    Bhatia, Ashutosh
    Vishwakarma, Deepak Kumar
    35TH INTERNATIONAL CONFERENCE ON INFORMATION NETWORKING (ICOIN 2021), 2021, : 439 - 444
  • [10] Rank-based univariate feature selection methods on machine learning classifiers for code smell detection
    Shivani Jain
    Anju Saha
    Evolutionary Intelligence, 2022, 15 : 609 - 638