Predicting Code Smells and Analysis of Predictions: Using Machine Learning Techniques and Software Metrics

被引:19
|
作者
Mhawish, Mohammad Y. [1 ]
Gupta, Manjari [1 ]
机构
[1] Banaras Hindu Univ, Inst Sci, Ctr Interdisciplinary Math Sci, Comp Sci, Varanasi 221005, Uttar Pradesh, India
关键词
code smell; code smell detection; feature selection; prediction explanation; parameter optimization; IMPACT; LEVEL;
D O I
10.1007/s11390-020-0323-7
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Code smell detection is essential to improve software quality, enhancing software maintainability, and decrease the risk of faults and failures in the software system. In this paper, we proposed a code smell prediction approach based on machine learning techniques and software metrics. The local interpretable model-agnostic explanations (LIME) algorithm was further used to explain the machine learning model's predictions and interpretability. The datasets obtained from Fontana et al. were reformed and used to build binary-label and multi-label datasets. The results of 10-fold cross-validation show that the performance of tree-based algorithms (mainly Random Forest) is higher compared with kernel-based and network-based algorithms. The genetic algorithm based feature selection methods enhance the accuracy of these machine learning algorithms by selecting the most relevant features in each dataset. Moreover, the parameter optimization techniques based on the grid search algorithm significantly enhance the accuracy of all these algorithms. Finally, machine learning techniques have high potential in predicting the code smells, which contribute to detect these smells and enhance the software's quality.
引用
收藏
页码:1428 / 1445
页数:18
相关论文
共 50 条
  • [41] Metrics for Graph Partition by Using Machine Learning Techniques
    Yin, Zhuochao
    Cao, Zhenfu
    [J]. PROCEEDINGS OF 2019 IEEE 3RD INFORMATION TECHNOLOGY, NETWORKING, ELECTRONIC AND AUTOMATION CONTROL CONFERENCE (ITNEC 2019), 2019, : 1388 - 1394
  • [42] Software Modernization Using Machine Learning Techniques
    Somogyi, Norbert
    Kovesdan, Gabor
    [J]. 2021 IEEE 19TH WORLD SYMPOSIUM ON APPLIED MACHINE INTELLIGENCE AND INFORMATICS (SAMI 2021), 2021, : 361 - 365
  • [43] Root Cause Analysis of Software Bugs using Machine Learning Techniques
    Lal, Harsh
    Pahwa, Gaurav
    [J]. PROCEEDINGS OF THE 7TH INTERNATIONAL CONFERENCE ON CLOUD COMPUTING, DATA SCIENCE AND ENGINEERING (CONFLUENCE 2017), 2017, : 105 - 111
  • [44] Predicting Diabetes Using Machine Learning Techniques
    Kirgil, Elif Nur Haner
    Erkal, Begum
    Ayyildiz, Tulin Ercelebi
    [J]. 2022 INTERNATIONAL CONFERENCE ON THEORETICAL AND APPLIED COMPUTER SCIENCE AND ENGINEERING (ICTASCE), 2022, : 137 - 141
  • [45] Predicting IRI Using Machine Learning Techniques
    Ankit Sharma
    S. N. Sachdeva
    Praveen Aggarwal
    [J]. International Journal of Pavement Research and Technology, 2023, 16 : 128 - 137
  • [46] Predicting IRI Using Machine Learning Techniques
    Sharma, Ankit
    Sachdeva, S. N.
    Aggarwal, Praveen
    [J]. INTERNATIONAL JOURNAL OF PAVEMENT RESEARCH AND TECHNOLOGY, 2023, 16 (01) : 128 - 137
  • [47] Detecting Code Smells using Deep Learning
    Das, Ananta Kumar
    Yadav, Shikhar
    Dhal, Subhasish
    [J]. PROCEEDINGS OF THE 2019 IEEE REGION 10 CONFERENCE (TENCON 2019): TECHNOLOGY, KNOWLEDGE, AND SOCIETY, 2019, : 2081 - 2086
  • [48] Using software metrics for predicting vulnerable classes and methods in Java']Java projects: A machine learning approach
    Sultana, Kazi Zakia
    Anu, Vaibhav
    Chong, Tai-Yin
    [J]. JOURNAL OF SOFTWARE-EVOLUTION AND PROCESS, 2021, 33 (03)
  • [49] Evaluation of machine learning approaches for change-proneness prediction using code smells
    Kaur, Kamaldeep
    Jain, Shilpi
    [J]. Advances in Intelligent Systems and Computing, 2017, 515 : 561 - 572
  • [50] Automatic detection of Feature Envy and Data Class code smells using machine learning
    Skipina, Milica
    Slivka, Jelena
    Luburic, Nikola
    Kovacevic, Aleksandar
    [J]. EXPERT SYSTEMS WITH APPLICATIONS, 2024, 243