Revisiting Code Smell Severity Prioritization using learning to rank techniques

被引:3
|
作者
Liu, Lei [1 ]
Lin, Guancheng [2 ]
Zhu, Lin [3 ]
Yang, Zhen [4 ]
Song, Peilin [1 ]
Wang, Xin [5 ]
Hu, Wenhua [6 ]
机构
[1] Xi An Jiao Tong Univ, Fac Elect & Informat Engn, Minist Educ, Key Lab Phys Elect & Devices, Xian 710049, Shaanxi, Peoples R China
[2] Wuhan Univ, Sch Cyber Sci & Engn, Wuhan 430072, Hubei, Peoples R China
[3] Wuhan Qingchuan Univ, Sch Comp, Wuhan 430204, Hubei, Peoples R China
[4] Shandong Univ, Sch Comp Sci & Technol, Qingdao 266237, Shandong, Peoples R China
[5] Wuhan Univ, Sch Comp Sci, Wuhan 430072, Hubei, Peoples R China
[6] Wuhan Univ Technol, Sch Comp Sci & Artificial Intelligence, Wuhan 430070, Hubei, Peoples R China
基金
中国博士后科学基金; 中国国家自然科学基金;
关键词
Code smell; Severity prioritization; Learning to rank; Empirical study; COMPANY DEFECT PREDICTION;
D O I
10.1016/j.eswa.2024.123483
中图分类号
TP18 [人工智能理论];
学科分类号
081104 ; 0812 ; 0835 ; 1405 ;
摘要
Code Smell Severity Prioritization (CSSP) is crucial in helping software developers minimize software maintenance costs and enhance software quality, particularly when faced with limited refactoring resources. Traditional code smell prioritization methods rely heavily on manual and semi -automatic approaches based on developer experience, often demanding considerable time and effort from experienced experts. Leveraging automated machine learning techniques can effectively overcome these limitations. However, most existing machine learning -based CSSP works have only considered limited pointwise Learning To Rank (LTR) algorithms and have used inappropriate metrics (e.g., Accuracy, Spearman, and MAE) to assess the performance of models. To address these limitations, we make a comprehensive comparison of 41 pointwise, 4 pairwise, and 4 listwise LTR algorithms for CSSP on four code smell severity datasets. Furthermore, we propose the adoption of Severity@20% and Cumulative Lift Chart (CLC) as the primary evaluation metrics to assess CSSP models more effectively. The results show that: (1) The ordinal Bagging (O -Bagging) algorithm demonstrates the highest performance for CSSP, achieving superior results in Severity@20% and CLC. (2) The ordinal classification method can help the top -performing base classification algorithms Bagging and XGBoost achieve better performance for CSSP tasks. (3) A higher (lower) Accuracy, higher (lower) Spearman, and lower (higher) MAE do not reliably indicate better (worse) performance for CSSP. This further underscores that Accuracy, Spearman, and MAE are unsuitable metrics for evaluating CSSP models' effectiveness. To summarize, our study suggest that developers employ the O -Bagging algorithm for CSSP, with Severity@20% and CLC serving as the primary evaluation metrics.
引用
收藏
页数:19
相关论文
共 50 条
  • [21] Deep Learning Based Code Smell Detection
    Liu, Hui
    Jin, Jiahao
    Xu, Zhifeng
    Zou, Yanzhen
    Bu, Yifan
    Zhang, Lu
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2021, 47 (09) : 1811 - 1837
  • [22] An Improvement to Test Case Prioritization Techniques Using Machine Learning
    Khan, Sara
    Pal, Saurabh
    PROCEEDINGS OF THIRD DOCTORAL SYMPOSIUM ON COMPUTATIONAL INTELLIGENCE, DOSCI 2022, 2023, 479 : 403 - 417
  • [23] A Semisupervised Learning Approach for Code Smell Detection
    Ishita Kheria
    Dhruv Gada
    Ruhina Karani
    SN Computer Science, 6 (2)
  • [24] 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
  • [25] Machine learning techniques for code smell detection: A systematic literature review and meta-analysis
    Azeem, Muhammad Ilyas
    Palomba, Fabio
    Shi, Lin
    Wang, Qing
    INFORMATION AND SOFTWARE TECHNOLOGY, 2019, 108 : 115 - 138
  • [26] Revisiting Warfarin Dosing Using Machine Learning Techniques
    Sharabiani, Ashkan
    Bress, Adam
    Douzali, Elnaz
    Darabi, Houshang
    COMPUTATIONAL AND MATHEMATICAL METHODS IN MEDICINE, 2015, 2015
  • [27] Comparison of Machine Learning Methods for Code Smell Detection Using Reduced Features
    Karaduzovic-Hadziabdic, Kanita
    Spahic, Rialda
    2018 3RD INTERNATIONAL CONFERENCE ON COMPUTER SCIENCE AND ENGINEERING (UBMK), 2018, : 670 - 672
  • [28] Assessment of Code Smell for Predicting Class Change Proneness Using Machine Learning
    Pritam, Nakul
    Khari, Manju
    Le Hoang Son
    Kumar, Raghvendra
    Jha, Sudan
    Priyadarshini, Ishaani
    Abdel-Basset, Mohamed
    Hoang Viet Long
    IEEE ACCESS, 2019, 7 : 37414 - 37425
  • [29] Code Smell Analyzer: A Tool To Teaching Support Of Refactoring Techniques Source Code
    Sirqueira, T. F. M.
    Brandl, A. H. M.
    Pedro, E. J. P.
    Silva, R. S.
    Araujo, M. A. P.
    IEEE LATIN AMERICA TRANSACTIONS, 2016, 14 (02) : 877 - 884
  • [30] Aligning XAI explanations with software developers' expectations: A case study with code smell prioritization
    Huang, Zijie
    Yu, Huiqun
    Fan, Guisheng
    Shao, Zhiqing
    Li, Mingchen
    Liang, Yuguo
    EXPERT SYSTEMS WITH APPLICATIONS, 2024, 238