EUVIMEDEUVIMED entdecken
Open Access · CC BY 4.0

Refactoring Object‐Oriented Software With ChatGPT: An Empirical Study

Hanady M. Abdulsalam, Ranya Alawadhi, Bader A. Ali, Aisha A. Alkandari, Jehad Al Dallal

IET Software · 2026-01 · 2026 (1)

DOI: 10.1049/sfw2/3348017 ↗

Kurz gefasst

Fachartikel in der Zeitschrift IET Software, online erschienen am 02.04.2026. Verfasst von Hanady M. Abdulsalam und 4 weiteren Autor:innen. Die Arbeit nennt 54 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

Generative AI (GenAI) is currently being utilized in many tasks to improve their quality. Because GenAI tools are highly qualified in text‐based applications, they have the potential to automate tasks across the software engineering lifecycle. In this study, we empirically investigate ChatGPT’s ability to perform code refactoring tasks. Considering five widely employed refactoring scenarios, we propose testing scenarios upon which we derive 200 test cases for five Java open‐source applications. These test cases are applied using ChatGPT and NetBeans, and the results are compared and evaluated. To enable ChatGPT to perform refactoring, we follow prompt engineering approaches to design effective prompts. The results show that ChatGPT has generated refactored pieces of code, which have been successfully compiled for 88% of the test cases. However, it has correctly performed the intended refactoring for only 29% of the cases, compared to NetBeans, which has achieved a 67% correctness rate. These findings indicate that although ChatGPT has some potential to contribute to code refactoring tasks, it is not yet ready to be used as a fully automated refactoring tool for large‐scale real‐world applications. Its outputs still require human oversight to improve the refactored code’s correctness.

Zitieren

APA

Abdulsalam, H. M., Alawadhi, R., Ali, B. A., Alkandari, A. A., & Dallal, J. A. (2026). Refactoring Object‐Oriented Software With ChatGPT: An Empirical Study. IET Software, 2026(1). https://doi.org/10.1049/sfw2/3348017

Vancouver

Abdulsalam HM, Alawadhi R, Ali BA, Alkandari AA, Dallal JA. Refactoring Object‐Oriented Software With ChatGPT: An Empirical Study. IET Software. 2026;2026(1). doi:10.1049/sfw2/3348017

BibTeX
@article{Abdulsalam2026,
  author = {Abdulsalam, Hanady M. and Alawadhi, Ranya and Ali, Bader A. and Alkandari, Aisha A. and Dallal, Jehad Al},
  title = {Refactoring Object‐Oriented Software With ChatGPT: An Empirical Study},
  journal = {IET Software},
  year = {2026},
  volume = {2026},
  number = {1},
  doi = {10.1049/sfw2/3348017}
}
Kostenlos starten →