Problems of Program Code Refactoring with the Use of Artificial Intelligence
DOI:
https://doi.org/10.15802/stp2025/325888Keywords:
program code quality, program code, refactoring, large language model, artificial intelligence, software engineeringAbstract
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)
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2025 Science and Transport Progress

This work is licensed under a Creative Commons Attribution 4.0 International License.
Copyright and Licensing
This journal provides open access to all of its content.
As such, copyright for articles published in this journal is retained by the authors, under the terms of the Creative Commons Attribution 4.0 International License (CC BY 4.0). The CC BY license permits commercial and non-commercial reuse. Such access is associated with increased readership and increased citation of an author's work. For more information on this approach, see the Public Knowledge Project, the Directory of Open Access Journals, or the Budapest Open Access Initiative.
The CC BY 4.0 license allows users to copy, distribute and adapt the work in any way, provided that they properly point to the author. Therefore, the editorial board of the journal does not prevent from placing published materials in third-party repositories. In order to protect manuscripts from misappropriation by unscrupulous authors, reference should be made to the original version of the work.