Abstract
Software refactoring helps improve the quality of the software and increases the execution speed. However, in large and complex systems, it is difficult for software developers to identify the exact code segments that need to be refactored. Many researchers predicted the refactoring model based on source code metrics. The metric value assumption and the tool used to extract metrics values differ from company to company. Our objective is to develop an automated refactoring model based on the code directly. The predictive power of refactoring model depends on the input features computed from the code description. In this work, we have implemented three different word embeddings intending to extract numeric vectors for the refactoring prediction model. Additionally, we have employed three data sampling techniques to solve the data imbalance issue and improve the effectiveness of the proposed model. Furthermore, we have instigated thirteen machine learning classifiers to access the predictive capability of word embedding techniques. Moreover, the Friedman test has been conducted to find the best technique based on rank of all the techniques. The experimental result on four data sets shows that our proposed model with TF-IDF word embedding and BLSMOTE data sampling, RF ensemble learner, improves its predictive capability.
GIET University.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
References
Aniche, M., Maziero, E., Durelli, R., Durelli, V.: The effectiveness of supervised machine learning algorithms in predicting software refactoring. IEEE Trans. Softw. Eng. 48(4), 1432–1450 (2020)
Sagar, P.S., AlOmar, E.A., Mkaouer, M.W., Ouni, A., Newman, C.D.: Comparing commit messages and source code metrics for the prediction refactoring activities. Algorithms 14(10), 289 (2021)
Ni, A., et al.: Soar: a synthesis approach for data science api refactoring. In: 2021 IEEE/ACM 43rd International Conference on Software Engineering (ICSE), pp. 112–124. IEEE (2021)
Bompotas, A., et al.: Implementation and repeatability aspects combined with refactoring for a reviews manager system. In: WEBIST, pp. 607–615 (2021)
Fowler, M.: Refactoring: Improving the Design of Existing Code, 2nd edn. Addison-Wesley Professional, Boston (2018)
Alenezi, M., Akour, M., Al Qasem, O.: Harnessing deep learning algorithms to predict software refactoring. Telkomnika 18(6), 2977–2982 (2020)
Patnaik, A., Panigrahi, R., Padhy, N.: Prediction of accuracy on open source java projects using class level refactoring. In: 2020 International Conference on Computer Science, Engineering and Applications (ICCSEA), pp. 1–6. IEEE (2020)
Kumar, L., Satapathy, S.M., Murthy,L.B.: Method level refactoring prediction on five open source java projects using machine learning techniques. In: Proceedings of the 12th Innovations on Software Engineering Conference (Formerly Known as India Software Engineering Conference), pp. 1–10 (2019)
Jureczko, M., Spinellis, D.: Using object-oriented design metrics to predict software defects. Models and Methods of System Dependability. Oficyna Wydawnicza Politechniki Wrocławskiej, pp. 69–81 (2010)
Kumar, L., Sripada, S.K., Sureka, A., Rath, S.K.: Effective fault prediction model developed using least square support vector machine (lSSVM). J. Syst. Softw. 137, 686–712 (2018)
Kocaguneli, E., Tosun, A., Bener, A.B., Turhan, B., Caglayan, B.: Prest: an intelligent software metrics extraction, analysis and defect prediction tool. In: SEKE, pp. 637–642 (2009)
Spirin, E., Bogomolov, E., Kovalenko, V., Bryksin, T.: Psiminer: a tool for mining rich abstract syntax trees from code. In: 2021 IEEE/ACM 18th International Conference on Mining Software Repositories (MSR), pp. 13–17. IEEE (2021)
Kumar, L., Kumar, M., Murthy, L.B., Misra, S., Kocher, V., Padmanabhuni, S.: An empirical study on application of word embedding techniques for kumar2021empiricalprediction of software defect severity level. In: 2021 16th Conference on Computer Science and Intelligence Systems (FedCSIS), pp. 477–484. IEEE (2021)
Kádár, I., Hegedus, P., Ferenc, R., Gyimóthy, T.: A code refactoring dataset and its assessment regarding software maintainability. In: 2016 IEEE 23rd International Conference on Software Analysis, Evolution, and Reengineering (SANER), vol. 1, pp. 599–603. IEEE (2016)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Panigrahi, R., Kuanar, S.K., Kumar, L. (2023). Automatic Identification of Class Level Refactoring Using Abstract Syntax Tree and Embedding Technique. In: Tanveer, M., Agarwal, S., Ozawa, S., Ekbal, A., Jatowt, A. (eds) Neural Information Processing. ICONIP 2022. Lecture Notes in Computer Science, vol 13625. Springer, Cham. https://doi.org/10.1007/978-3-031-30111-7_17
Download citation
DOI: https://doi.org/10.1007/978-3-031-30111-7_17
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-30110-0
Online ISBN: 978-3-031-30111-7
eBook Packages: Computer ScienceComputer Science (R0)