Software refactoring prediction evaluation method based on deep learning models

Aiming at the lack of research on the performance of deep learning models in predicting software refactoring in the current field, a deep learning-based software refactoring prediction evaluation method was proposed to assess the refactoring predictive performance of these models. Firstly, refactori...

Full description

Saved in:
Bibliographic Details
Main Authors: Yichi ZHANG, Yang ZHANG, Yanlei LI, Kun ZHENG, Wei LIU
Format: Article
Language:zho
Published: Hebei University of Science and Technology 2024-12-01
Series:Journal of Hebei University of Science and Technology
Subjects:
Online Access:https://xuebao.hebust.edu.cn/hbkjdx/article/pdf/b202406008?st=article_issue
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1841559969758969856
author Yichi ZHANG
Yang ZHANG
Yanlei LI
Kun ZHENG
Wei LIU
author_facet Yichi ZHANG
Yang ZHANG
Yanlei LI
Kun ZHENG
Wei LIU
author_sort Yichi ZHANG
collection DOAJ
description Aiming at the lack of research on the performance of deep learning models in predicting software refactoring in the current field, a deep learning-based software refactoring prediction evaluation method was proposed to assess the refactoring predictive performance of these models. Firstly, refactoring and non-refactoring labeled instances were collected from 303 Java projects using static analysis tools, and seven datasets comprising source code metrics were constructed for seven refactoring operations: extracting class, extracting subclass, extracting super class, extracting interface, moving class, renaming class, and moving and renaming class. Secondly, convolutional neural network (CNN), long short-term memory (LSTM) network, gated recurrent unit (GRU) model, multilayer perceptron(MLP), and autoencoder(AE) were trained and tested on the datasets. Finally, each model was evaluated based on accuracy, precision, recall, and F1-measure.The results show that the average accuracy, precision, recall, and F1-measure of the five deep learning models for predicting refactoring are all above 93%, with the highest accuracy in predicting the extract subclass refactoring, and the CNN model has a higher average accuracy compared to other models. The CNN model is efficient for software refactoring prediction evaluation, which provides reference for future utilization of deep learning models in assisting with completing refactoring recommendation tasks.
format Article
id doaj-art-29c0dad192e3459b8b982008d1f299a4
institution Kabale University
issn 1008-1542
language zho
publishDate 2024-12-01
publisher Hebei University of Science and Technology
record_format Article
series Journal of Hebei University of Science and Technology
spelling doaj-art-29c0dad192e3459b8b982008d1f299a42025-01-05T06:35:22ZzhoHebei University of Science and TechnologyJournal of Hebei University of Science and Technology1008-15422024-12-0145663664210.7535/hbkd.2024yx06008b202406008Software refactoring prediction evaluation method based on deep learning modelsYichi ZHANG0Yang ZHANG1Yanlei LI2Kun ZHENG3Wei LIU4School of Information Science and Engineering, Hebei University of Science and Technology, Shijiazhuang, Hebei 050018, ChinaSchool of Information Science and Engineering, Hebei University of Science and Technology, Shijiazhuang, Hebei 050018, ChinaSchool of Information Science and Engineering, Hebei University of Science and Technology, Shijiazhuang, Hebei 050018, ChinaSchool of Information Science and Engineering, Hebei University of Science and Technology, Shijiazhuang, Hebei 050018, ChinaSchool of Information Science and Engineering, Hebei University of Science and Technology, Shijiazhuang, Hebei 050018, ChinaAiming at the lack of research on the performance of deep learning models in predicting software refactoring in the current field, a deep learning-based software refactoring prediction evaluation method was proposed to assess the refactoring predictive performance of these models. Firstly, refactoring and non-refactoring labeled instances were collected from 303 Java projects using static analysis tools, and seven datasets comprising source code metrics were constructed for seven refactoring operations: extracting class, extracting subclass, extracting super class, extracting interface, moving class, renaming class, and moving and renaming class. Secondly, convolutional neural network (CNN), long short-term memory (LSTM) network, gated recurrent unit (GRU) model, multilayer perceptron(MLP), and autoencoder(AE) were trained and tested on the datasets. Finally, each model was evaluated based on accuracy, precision, recall, and F1-measure.The results show that the average accuracy, precision, recall, and F1-measure of the five deep learning models for predicting refactoring are all above 93%, with the highest accuracy in predicting the extract subclass refactoring, and the CNN model has a higher average accuracy compared to other models. The CNN model is efficient for software refactoring prediction evaluation, which provides reference for future utilization of deep learning models in assisting with completing refactoring recommendation tasks.https://xuebao.hebust.edu.cn/hbkjdx/article/pdf/b202406008?st=article_issuesoftware engineering; deep learning; software refactoring; refactoring prediction; source code metrics
spellingShingle Yichi ZHANG
Yang ZHANG
Yanlei LI
Kun ZHENG
Wei LIU
Software refactoring prediction evaluation method based on deep learning models
Journal of Hebei University of Science and Technology
software engineering; deep learning; software refactoring; refactoring prediction; source code metrics
title Software refactoring prediction evaluation method based on deep learning models
title_full Software refactoring prediction evaluation method based on deep learning models
title_fullStr Software refactoring prediction evaluation method based on deep learning models
title_full_unstemmed Software refactoring prediction evaluation method based on deep learning models
title_short Software refactoring prediction evaluation method based on deep learning models
title_sort software refactoring prediction evaluation method based on deep learning models
topic software engineering; deep learning; software refactoring; refactoring prediction; source code metrics
url https://xuebao.hebust.edu.cn/hbkjdx/article/pdf/b202406008?st=article_issue
work_keys_str_mv AT yichizhang softwarerefactoringpredictionevaluationmethodbasedondeeplearningmodels
AT yangzhang softwarerefactoringpredictionevaluationmethodbasedondeeplearningmodels
AT yanleili softwarerefactoringpredictionevaluationmethodbasedondeeplearningmodels
AT kunzheng softwarerefactoringpredictionevaluationmethodbasedondeeplearningmodels
AT weiliu softwarerefactoringpredictionevaluationmethodbasedondeeplearningmodels