Determining the capabilities of generative artificial intelligence tools to increase the efficiency of refactoring process

Authors

DOI:

https://doi.org/10.15587/2706-5448.2025.326899

Keywords:

AI-driven refactoring, code quality improvement, automated code smell detection, generative AI tools, software optimization

Abstract

The object of research is a source code refactoring facilitated and proctored by generative artificial intelligence tools. The paper is aimed at assessing their impact on refactoring quality while determining their practical applicability for improving software maintainability and efficiency.

The problem addressed in this research is the limitations of traditional rule-based refactoring tools, which require predefined rules and are often language-specific. Generative AI, with its advanced pattern recognition and adaptive learning capabilities, offers an alternative approach. However, its effectiveness in handling various refactoring tasks and its reliability remain undisclosed.

The research involved multiple experiments, where four AI tools – ChatGPT, Copilot, Gemini, and Claude – were tested on various refactoring tasks, including code smell detection, efficiency improvements, decoupling, and large-scale refactoring.

The results showed that Claude achieved the highest success rate (78.8%), followed by ChatGPT (76.6%), Copilot (72.8%), and Gemini (61.8%). While all tools demonstrated at least a basic understanding of refactoring principles, their effectiveness varied significantly depending on the complexity of the task. These results can be attributed to differences in model training, specialization, and underlying architectures. Models optimized for programming tasks performed better in structured code analysis, whereas more general-purpose models lacked depth in specific programming-related tasks.

The practical implications of this research highlight that while Generative AI tools can significantly aid in refactoring, human oversight remains essential. AI-assisted refactoring can enhance developer productivity, streamline software maintenance, and reduce technical debt, making it a valuable addition to modern software development workflows.

Author Biography

Andrii Tkachuk, National Technical University of Ukraine “Igor Sikorsky Kyiv Polytechnic Institute”

PhD, Assistant

Department of System Design

References

  1. Fowler, M. (2019). Refactoring: Improving the Design of Existing Code. Addison-Wesley Professional.
  2. Mens, T., Tourwé, T., Demeyer, S. (2019). Software Evolution. Springer.
  3. Tkachuk, A., Bulakh, B. (2023). Describing the Knowledge About the Source Code Using an Ontology. Infocommunication and computer systems, 1 (5), 123–133. https://doi.org/10.36994/2788-5518-2023-01-05-14
  4. Tkachuk, A. V. (2024). Automated code refactoring using a knowledge base and logical rules. Scientific Bulletin of UNFU, 34 (2), 87–93. https://doi.org/10.36930/40340211
  5. Põld, J., Robal, T., Kalja, A. (2013). On Proving the Concept of an Ontology Aided Software Refactoring Tool. Frontiers in Artificial Intelligence and Applications, 249, 84–94. https://doi.org/10.3233/978-1-61499-161-8-84
  6. Bommasani, R., Hudson, D., Adeli, E., Altman, R., Arora, S., Arx, S. et al. (2021). On the opportunities and risks of foundation models. arXiv. https://doi.org/10.48550/arXiv.2108.07258
  7. Russell, S., Norvig, P. (2020). Artificial Intelligence: A Modern Approach. Pearson.
  8. Poldrack, R., Lu, T., Begus, G. (2023). AI-assisted coding: Experiments with GPT-4. arXiv. https://doi.org/10.48550/arXiv.2304.13187
  9. Dhruv, A., Dubey, A. (2024). Leveraging Large Language Models for Code Translation and Software Development in Scientific Computing. https://doi.org/10.48550/arXiv.2410.24119
  10. Sajja, A., Thakur, D., Mehra, A. (2024). Integrating Generative AI into the Software Development Lifecycle: Impacts on Code Quality and Maintenance. International Journal of Science and Research Archive, 13 (1), 1952–1960. https://doi.org/10.30574/ijsra.2024.13.1.1837
Determining the capabilities of generative artificial intelligence tools to increase the efficiency of refactoring process

Downloads

Published

2025-04-17

How to Cite

Tkachuk, A. (2025). Determining the capabilities of generative artificial intelligence tools to increase the efficiency of refactoring process. Technology Audit and Production Reserves, 3(2(83), 6–11. https://doi.org/10.15587/2706-5448.2025.326899

Issue

Section

Information Technologies