ChatGPT for Code Refactoring: Analyzing Topics, Interaction, and Effective Prompts

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: AlOmar, Eman Abdullah, Xu, Luo, Martinez, Sofia, Peruma, Anthony, Mkaouer, Mohamed Wiem, Newman, Christian D., Ouni, Ali
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866908528537501696
author AlOmar, Eman Abdullah
Xu, Luo
Martinez, Sofia
Peruma, Anthony
Mkaouer, Mohamed Wiem
Newman, Christian D.
Ouni, Ali
author_facet AlOmar, Eman Abdullah
Xu, Luo
Martinez, Sofia
Peruma, Anthony
Mkaouer, Mohamed Wiem
Newman, Christian D.
Ouni, Ali
contents Large Language Models (LLMs), such as ChatGPT, have become widely popular and widely used in various software engineering tasks such as refactoring, testing, code review, and program comprehension. Although recent studies have examined the effectiveness of LLMs in recommending and suggesting refactoring, there is a limited understanding of how developers express their refactoring needs when interacting with ChatGPT. In this paper, our goal is to explore interactions related to refactoring between developers and ChatGPT to better understand how developers identify areas for improvement in code, and how ChatGPT addresses developers' needs. Our approach involves text mining 715 refactoring-related interactions from 29,778 ChatGPT prompts and responses, as well as the analysis of developers' explicit refactoring intentions.
format Preprint
id arxiv_https___arxiv_org_abs_2509_08090
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ChatGPT for Code Refactoring: Analyzing Topics, Interaction, and Effective Prompts
AlOmar, Eman Abdullah
Xu, Luo
Martinez, Sofia
Peruma, Anthony
Mkaouer, Mohamed Wiem
Newman, Christian D.
Ouni, Ali
Software Engineering
Large Language Models (LLMs), such as ChatGPT, have become widely popular and widely used in various software engineering tasks such as refactoring, testing, code review, and program comprehension. Although recent studies have examined the effectiveness of LLMs in recommending and suggesting refactoring, there is a limited understanding of how developers express their refactoring needs when interacting with ChatGPT. In this paper, our goal is to explore interactions related to refactoring between developers and ChatGPT to better understand how developers identify areas for improvement in code, and how ChatGPT addresses developers' needs. Our approach involves text mining 715 refactoring-related interactions from 29,778 ChatGPT prompts and responses, as well as the analysis of developers' explicit refactoring intentions.
title ChatGPT for Code Refactoring: Analyzing Topics, Interaction, and Effective Prompts
topic Software Engineering
url https://arxiv.org/abs/2509.08090