Problems of Program Code Refactoring with the Use of Artificial Intelligence

Authors

DOI:

https://doi.org/10.15802/stp2025/325888

Keywords:

program code quality, program code, refactoring, large language model, artificial intelligence, software engineering

Abstract

Purpose. The modern technological landscape is characterized by the rapid development of software focused on various subject areas and platforms. This leads to the continuous creation of new software products consisting of a huge number of lines of code. The process of developing high-quality software is a multi-stage process that involves a number of factors that affect the final result. The key aspects include the competence of developers, the effectiveness of project management, the availability of necessary resources, and the ability to adapt to changing requirements. Each platform has its own specific features that must be taken into account during development, which further complicates the process of creating universal and effective software solutions. Our research aims to conduct a comprehensive analysis of the potential and promising areas of application of large language models in the context of program code refactoring. The work is aimed at developing and improving methods that will help to increase the efficiency of the refactoring process using these models. Methodology. To solve the above problems, it is proposed to implement a set of methods that can be used both separately and in synergy to optimize the final result. These methods, carefully developed in the context of modern software engineering paradigms, are aimed at increasing the efficiency of the refactoring process while ensuring that the software functionality is preserved. Their implementation involves a systematic approach to analyzing and modifying the code base, taking into account both technical aspects and the potential impact on the overall system architecture. Findings. A comprehensive analysis of existing language models has been conducted and methods for improving the efficiency of large language models in the context of code refactoring have been developed. The key factors that influence the success of the proposed methods, including the amount of training data and the limitations of the model context, are identified. Originality. An approach to improving the efficiency of large language models in code refactoring that takes into account the specifics of different projects and development stages is developed. Innovative methods for retraining language models and optimizing the use of context are proposed, which expand the capabilities of automated refactoring. Practical value. The results of the study allow to improve the efficiency of code refactoring using large language models.

References

Ivanov, O. P., Shynkarenko, V. I., Skalozub, V. V., & Kosolapov, A. A. (2023). Determining the Authorship of a Ukrainian-Language Literary Text by Means of Artificial Intelligence from Ultra-Short Excerpts. Science and Transport Progress, 2(102), 45-53. DOI: https://doi.org/10.15802/stp2023/288289 (in Ukrainian)

Code Health - How easy is your code to maintain and evolve? Codescene Retrieved from https://codescene.io/docs/guides/technical/code-health.html (in English)

Critical Problems in Software Development Projects and How to Address Them. appit. Retrieved from https://appitventures.com/blog/8-issues-in-software-development-and-how-to-tackle-them (in English)

F1 Score in Machine Learning. ENCORD. Retrieved from https://encord.com/blog/f1-score-in-machine-learning/ (in English)

Fu Q., Cho M., Merth T., Mehta S., Rastegari M., Najibi M. (2024)LazyLLM: Dynamic Token Pruning for Efficient Long Context LLM Inference. arXiv:2407.14057, 1-12. (in English)

Ramesh, R., M, A. T. R., Reddy, H. V., & N, S. V. (2024, August). Fine-Tuning Large Language Models for Task Specific Data. In 2024 2nd International Conference on Networking, Embedded and Wireless Systems (ICNEWS) (pp. 1-6). Bangalore, India. DOI: https://doi.org/10.1109/icnews60873.2024.10730913 (in English)

Refactoring-vs-Refuctoring-Advancing-the-state-of-AI-automated-code-improvements. Codescene. Retrieved from https://codescene.com/hubfs/whitepapers/Refactoring-vs-Refuctoring-Advancing-the-state-of-AI-automated-code-improvements.pdf (in English)

Zhang, Y., Li, Y., Meredith, G., Zheng, K., & Li, X. (2025). Move method refactoring recommendation based on deep learning and LLM-generated information. Information Sciences, 697, 121753. DOI: https://doi.org/10.1016/j.ins.2024.121753 (in English)

Published

2025-03-11

How to Cite

Syrota, O. A., & Horiachkin, V. M. (2025). Problems of Program Code Refactoring with the Use of Artificial Intelligence. Science and Transport Progress, (1(109), 77–84. https://doi.org/10.15802/stp2025/325888

Issue

Section

INFORMATION AND COMMUNICATION TECHNOLOGIES AND MATHEMATICAL MODELING