
Об'єктом дослідження є рефакторинг початкового коду, полегшений та контрольований інструментами генеративного штучного інтелекту (ШІ). Робота направлена на оцінку його впливу на якість рефакторингу, а також визначення його практичної застосовності для покращення супроводжуваності та ефективності програмного забезпечення. Проблема, яка розглядається в цьому дослідженні, полягає в обмеженості традиційних інструментів рефакторингу на основі правил, які вимагають заздалегідь визначених правил і часто є специфічними для певної мови програмування. Генеративний ШІ з його вдосконаленими можливостями розпізнавання шаблонів та адаптивного навчання пропонує альтернативний підхід. Однак його ефективність у вирішенні різних завдань рефакторингу та надійність залишаються нерозкритими. Дослідження включало кілька експериментів, в яких чотири інструменти ШІ – ChatGPT, Copilot, Gemini та Claude – були протестовані на різних завданнях рефакторингу, включаючи виявлення антипатернів у коді, підвищення ефективності, видалення надмірних зв’язків та масштабний рефакторинг. Результати показали, що Claude досяг найвищого показника успішності (78,8 %), за ним йдуть ChatGPT (76,6 %), Copilot (72,8 %) і Gemini (61,8 %). Хоча всі інструменти продемонстрували принаймні базове розуміння принципів рефакторингу, їхня ефективність суттєво відрізнялася залежно від складності завдання. Ці результати можна пояснити відмінностями у підготовці моделей, спеціалізації та архітектурі, що лежить в їх основі. Моделі, оптимізовані для задач програмування, краще справлялися зі структурованим аналізом коду, тоді як більш універсальним моделям не вистачало глибини у специфічних задачах, пов'язаних з програмуванням. Практичне значення цього дослідження полягає в тому, що хоча інструменти генеративного ШІ можуть суттєво допомогти в рефакторингу, людський нагляд все ще потрібен. Рефакторинг за допомогою ШІ може підвищити продуктивність розробників, спростити обслуговування програмного забезпечення та зменшити технічний борг, що робить його цінним доповненням до сучасних робочих процесів розробки програмного забезпечення.
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.
покращення якості коду, AI-driven refactoring, generative AI tools, оптимізація програмного забезпечення, automated code smell detection, автоматичне виявлення проблем у коді, software optimization, рефакторинг на основі ШІ, інструменти генеративного ШІ, code quality improvement
покращення якості коду, AI-driven refactoring, generative AI tools, оптимізація програмного забезпечення, automated code smell detection, автоматичне виявлення проблем у коді, software optimization, рефакторинг на основі ШІ, інструменти генеративного ШІ, code quality improvement
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 0 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Average | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Average | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Average |
