AN ADAPTIVE MODEL FOR SOFTWARE CODE QUALITY ASSESSMENT IN REFACTORING TASKS BASED ON FUZZY LOGIC
Main Article Content
Abstract
The article's objective is to develop a hybrid adaptive model for assessing software code quality based on code smell characteristics by combining fuzzy logic and machine learning methods to enhance the objectivity and efficiency of refactoring. The methodology underlying this research is aimed at developing a hybrid adaptive model for software code quality assessment. It combines fuzzy logic and artificial intelligence methods, specifically an adaptive neuro-fuzzy inference system (ANFIS). The multi-layered ANFIS implements the Takagi-Sugeno fuzzy inference with the ability to learn using gradient methods. The methodology is based on a hybrid approach that integrates expert knowledge with the automated training of the model on real data. Results. The research resulted in the development of a hybrid adaptive model for software code quality assessment based on fuzzy logic and the ANFIS. This model allows for automated, objective, and flexible code quality assessment in refactoring tasks. The model uses eight key code smell metrics: WMC, DIT, RFC, LCOM, NOA, NOC, CBO, and FANOUT. Their normalization and processing are performed using fuzzy logic based on the Takagi-Sugeno algorithm. This ensures that the uncertainty and subjectivity of expert evaluations are taken into account. The ANFIS architecture allows the model to learn from real data, with subsequent automated adjustment of the membership function parameters and rule weights. This enables the model to adapt to various technology stacks and projects. The use of trapezoidal membership functions increases the accuracy of modeling critical code smell zones, while the hybrid learning algorithm based on gradient descent ensures high precision in determining code quality, ultimately contributing to improved software efficiency, maintainability, scalability, and security. The scientific novelty of the research lies in the development of a hybrid adaptive model for software code quality assessment. Unlike existing models, this one is based on fuzzy logic and an ANFIS, which combines expert knowledge with automated training on real data to enhance the objectivity and efficiency of the refactoring process. The proposed ANFIS architecture with trapezoidal membership functions is used to process eight key code smell metrics (WMC, DIT, RFC, LCOM, NOA, NOC, CBO, FANOUT) within the context of Takagi-Sugeno fuzzy inference. This provides a flexible, interpretable, and adaptive assessment of code quality with the ability to automatically tune model parameters based on gradient learning, which significantly increases the accuracy of code quality determination and the model's suitability for various technology stacks and projects. The practical significance of the research lies in the direct implementability and integration of the developed hybrid adaptive model for software code quality assessment into existing static analysis tools and DevOps processes, specifically as plugins for Continuous Integration/Continuous Delivery (CI/CD) systems. This will enable automated, objective, and adaptive monitoring of code quality in real time. In addition, the model has significant potential for extension to various programming languages and technology stacks by analyzing large datasets from open-source repositories, which will enhance its universality and accuracy. A promising direction for future work is to improve the ANFIS architecture by incorporating deep learning methods, which would allow for the automatic detection of new code smells and their interdependencies. The development of interpretable mechanisms to explain the model's decisions will increase developer trust in the system and promote its widespread adoption in both industrial software development and educational processes in software engineering and cybersecurity.
Article Details
References
Laktionov, A. (2021), “Improving the methods for determining the index of quality of subsystem element interaction”, Eastern-European Journal of Enterprise Technologies, vol. 6, no. 3 (114), pp. 72–82, doi: https://doi.org/10.15587/1729-4061.2021.244929
Buriak, A., and Maslii, O. (2025), “Minimization of digital risks and threats to the economic security of the state through the use of generative artificial intelligence”, Eastern-European Journal of Enterprise Technologies, vol. 4, no. 13 (136), pp. 17–25, doi: https://doi.org/10.15587/1729-4061.2025.336640
Ponochovniy, Y., Bulba, E., Yanko, A. and Hozbenko, E. (2018), “Influence of diagnostics errors on safety: Indicators and requirements”, 2018 IEEE 9th International Conference on Dependable Systems, Services and Technologies (DESSERT), 24-27 May 2018, Kyiv, Ukraine, pp. 53–57, doi: https://doi.org/10.1109/DESSERT.2018.8409098
Onyshchenko, S., Zhyvylo, Ye., Hlushko, A., and Bilko, S. (2024), “Cyber risk management technology to strengthen the information security of the national economy”, Naukovyi Visnyk Natsionalnoho Hirnychoho Universytetu, vol. 5, pp. 136–142, doi: https://doi.org/10.33271/nvngu/2024-5/136 7
Krasnobayev, V., Yanko, A., Hlushko, A., Kruk, O., Gakh, V., Onyshchenko, S., Maslii, O., Kivshyk, O., Potapova, K., Nalyvaichuk, M., Meliukh, V., Gurynenko, S., Ostapenko, T., and Hrashchenko I. (2023), Economic And Cyber Security, Monographs, PC TECHNOLOGY CENTER, doi: https://doi.org/10.15587/978-617-7319-98-5
Kudinova, A., Maslii, O., Smokvina, V., and Tsyhanenko, K. (2025), “The impact of digitalization on the financial institutions' economic security in the face of growing cyber threats”, Financial and Credit Activity Problems of Theory and Practice, vol. 4(63), pp. 466–483, doi: https://doi.org/10.55643/fcaptp.4.63.2025.4790
Maslii, O., Buriak, A., Chaikina, A., and Cherviak, A. (2025), “Improving conceptual approaches to ensuring state economic security under conditions of digitalization”, Eastern-European Journal of Enterprise Technologies, vol. 1, no. 13 (133), pp. 35–45, doi: https://doi.org/10.15587/1729-4061.2025.319256
Tsantalis, N., Angelopoulos, T., Herraiz, I., Mazinanian D. and Dig D. (2018), “Accurate and efficient refactoring detection in version histories”, Proceedings of the 40th International Conference on Software Engineering (ICSE), pp. 939–950, doi: https://doi.org/10.1145/3180155.3180206
Amandeep, K., Sushma, J., Shivani, G., and Gaurav, D. (2021), “A Review on Machine-learning Based Code Smell Detection Techniques in Object-oriented Software System(s)”, Recent Advances in Electrical & Electronic Engineering, vol. 14, is. 3, pp. 290–303, doi: https://doi.org/10.2174/2352096513999200922125839
Manju, B.P.K. (2022), “A Survey of Static and Dynamic Metrics Tools for Object Oriented Environment”, Lecture Notes in Electrical Engineering, vol. 790 LNEE, pp. 521–530, doi: https://doi.org/10.1007/978-981-16-1342-5_40
Samokhvalov, Y., Bovda, E., and Liubarskyi, S. (2024), “Structuring management tasks in the telecommunication network management system”, 11th International Scientific Conference "Information Technology and Implementation" (IT&I-2024), 20–21 November 2024, Kyiv, Ukraine, CEUR 3909, pp. 375–386, available at: https://ceur-ws.org/Vol-3909/Paper_30.pdf
Rudenko, O., Yanko, A., Haitan, O., Zdorenko, Y., and Rudenko, Z. (2025), “Secondary Software Faults Detection Models”, Lecture Notes in Networks and Systems, vol. 1391 LNNS, pp. 212–221, doi: https://doi.org/10.1007/978-3-031-90735-7_17
Romanenkov, Y., Danova, M., Kashcheyeva, V., Bugaienko, O., Volk, M., Karminska-Bielobrova, M., and Lobach, O. (2018), “Complexification Methods of Interval Forecast Estimates in the Problems on Short-Term Prediction”, Eastern-European Journal of Enterprise Technologies, vol. 3, no. 3 (93), pp. 50–58, doi: https://doi.org/10.15587/1729-4061.2018.131939
Yanko, A., Krasnobayev, V., Hlushko, A., and Goncharenko, S. (2025), “Neurocomputer operating in the residue class system”, Advanced Information Systems, vol. 9, no. 2, pp. 84–92, doi: https://doi.org/10.20998/2522-9052.2025.2.11
Nanadani, H., Saad, M., and Sharma, T. (2023), “Calibrating Deep Learning-Based Code Smell Detection Using Human Feedback”, 2023 IEEE 23rd International Working Conference on Source Code Analysis and Manipulation (SCAM), 2–3 October 2023, Bogotá, Colombia, pp. 37–48, doi: https://doi.org/10.1109/SCAM59687.2023.00015
Ayadi, M., Rhazali, Y., and Lahmer, M. (2022), “A Proposed Methodology to Automate the software manufacturing through Artificial Intelligence (AI)”, Procedia Computer Science, vol. 201, pp. 627–631, doi: https://doi.org/10.1016/j.procs.2022.03.082
Krasnobayev, V., Kuznetsov, A., Yanko, A., and Kuznetsova, T. (2020), “The data errors control in the modular number system based on the nullification procedure”, 3rd Int. Workshop on Computer Modeling and Intelligent Systems (CMIS-2020), 27 April – 1 May 2020, Zaporizhzhia, Ukraine, CEUR 2608, pp. 580–593, doi: https://doi.org/10.32782/cmis/2608-45
Yu, Y., Lu, Y., Liang, S., Zhang, X., Zhang, L., Bai, Y., and Zhang, Y. (2025), “Predicting a Program’s Execution Time After Move Method Refactoring Based on Deep Learning and Feature Interaction”, Applied Sciences, vol. 15(8), art. no. 4270, doi: https://doi.org/10.3390/app15084270
Zdorenko, Y., Yanko, A., Myziura, M., and Fesokha, N. (2025), “Development of a fuzzy risk assessment model for information security management”, Techn. Audit and Production Reserves, vol. 4(84), doi: https://doi.org/10.15587/2706-5448.2025.334954
Levashenko, V., Liashenko, O., and Kuchuk, H. (2020), “Building Decision Support Systems based on Fuzzy Data”, Advanced Information Systems, vol. 4, no. 4, pp. 48–56, doi: https://doi.org/10.20998/2522-9052.2020.4.07
Sehgal, R., Mehrotra, D., and Bala, M. (2018), “Prioritizing the refactoring need for critical component using combined approach”, Decision Science Letters, vol. 7, pp. 257–272, available at:
https://pdfs.semanticscholar.org/17c5/3ab8eba7114de5ce9ba595c26590f4b99835.pdf
Kara, M., Lamouchi, O., and Ramdane-Cherif, A. (2016), “Ontology Software Quality Model for Fuzzy Logic Evaluation Approach”, Procedia Computer Science, vol. 83, pp. 637–641, doi: https://doi.org/10.1016/j.procs.2016.04.143
Ritu and Sangwan O.P. (2021), “Software Quality Prediction Method Using Fuzzy Logic”, Turkish Journal of Computer and Mathematics Education (TURCOMAT), vol. 12(11), pp. 807–817, doi: https://doi.org/10.17762/turcomat.v12i11.5966
Chuan Y.R., Huang, T., Towey, D. and Zhou, L. (2025), “A Median-Based Fuzzy Approach to Software Quality Evaluation”, Tsinghua science and technology, vol. 30, no. 5, pp. 2146−2168, doi: https://doi.org/10.26599/TST.2024.9010103
Qi, R., Tao, G. and Jiang, B. (2019), Fuzzy system identification and adaptive control (1st ed.), Springer Cham, doi: https://doi.org/10.1007/978-3-030-19882-4
Maddeh, M., Al-Otaibi, S., Alyahya, S., Hajjej, F. and Ayouni, S. (2023), “A Comprehensive MCDM-Based Approach for Object-Oriented Metrics Selection Problems”, Applied Sciences, vol. 13(6), pp. 3411, doi: https://doi.org/10.3390/app13063411
Golosovskiy, M.S., Bogomolov, A.V., and Evtushenko, E.V. (2021), “An Algorithm for Setting Sugeno-Type Fuzzy Inference Systems”, Automatic Documentation and Mathematical Linguistics, vol. 55, pp. 79–88, doi: https://doi.org/10.3103/S000510552103002X
(2024), Fuzzy Logic Toolbox. Design and simulate fuzzy logic systems, available at: https://www.mathworks.com/help/fuzzy/index.html
Onyshchenko, S., Haitan, O., Yanko, A., Zdorenko, Y., and Rudenko, O. (2024), “Method for detection of the modified DDoS cyber attacks on a web resource of an Information and Telecommunication Network based on the use of intelligent systems”, 6th International Workshop on Modern Data Science Technologies Workshop (MoDaST 2024), Lviv, Ukraine, 31 May – 1 June 2024, CEUR 3723, pp. 219–235, available at: https://ceur-ws.org/Vol-3723/paper12.pdf
Puja, R. S., Fatema, T., Akhter, N. and Khatun, A. (2023), “Prediction of Code Smell from Source Code: A Hybrid Approach”, 2023 Int. Conf. on Information and Communication Technology for Sustainable Development (ICICT4SD), 21-23 September 2023, Dhaka, Bangladesh, pp. 315–319, doi: https://doi.org/10.1109/ICICT4SD59951.2023.10303449
Lima, J. F., Patiño-León, A., Orellana, M., and Zambrano-Martinez, J. L. (2025), “Evaluating the Impact of Membership Functions and Defuzzification Methods in a Fuzzy System: Case of Air Quality Levels”, Applied Sciences, vol. 15(4), 1934, doi: https://doi.org/10.3390/app15041934
Coradini, M. F., Felão, L. H. V., Lyra, S. d. S., Teixeira, M. C. M., and Kitano, C. (2025), “Takagi–Sugeno Fuzzy Nonlinear Control System for Optical Interferometry”, Sensors, vol. 25(6), art. no. 1853, doi: https://doi.org/10.3390/s25061853
Pecorelli, F., Lujan, S., Lenarduzzi, V., Palomba, F. and de Lucia, A. (2022), “On the adequacy of static analysis warnings with respect to code smell prediction”, Empirical Software Eng., vol. 27, art. no. 64, doi: https://doi.org/10.1007/s10664-022-10126-5
Dogo, E. M., Afolabi, O. J., Nwulu, N. I., Twala, B., and Aigbavboa, C. O. (2018), “A Comparative Analysis of Gradient Descent-Based Optimization Algorithms on Convolutional Neural Networks”, 2018 International Conference on Computational Techniques, Electronics and Mechanical Systems (CTEMS), 21-22 December 2018, Belgaum, India, pp. 92–99, doi: https://doi.org/10.1109/CTEMS.2018.8769211