How to Refactor this Code? An Exploratory Study on Developer-ChatGPT Refactoring Conversations

Large Language Models (LLMs), like ChatGPT, have gained widespread popularity and usage in various software engineering tasks, including refactoring, testing, code review, and program comprehension. Despite recent studies delving into refactoring documentation in commit messages, issues, and code re...

Full description

Saved in:
Bibliographic Details
Published in:Proceedings (IEEE/ACM International Conference on Mining Software Repositories. Online) pp. 202 - 206
Main Authors: AlOmar, Eman Abdullah, Venkatakrishnan, Anushkrishna, Mkaouer, Mohamed Wiem, Newman, Christian D., Ouni, Ali
Format: Conference Proceeding
Language:English
Published: ACM 15.04.2024
Subjects:
ISSN:2574-3864
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Abstract Large Language Models (LLMs), like ChatGPT, have gained widespread popularity and usage in various software engineering tasks, including refactoring, testing, code review, and program comprehension. Despite recent studies delving into refactoring documentation in commit messages, issues, and code review, little is known about how developers articulate their refactoring needs when interacting with ChatGPT. In this paper, our goal is to explore conversations between developers and ChatGPT related to refactoring to better understand how developers identify areas for improvement in code and how ChatGPT addresses developers' needs. Our approach relies on text mining refactoring-related conversations from 17,913 ChatGPT prompts and responses, and investigating developers' explicit refactoring intention. Our results reveal that (1) developer-ChatGPT conversations commonly involve generic and specific terms/phrases; (2) developers often make generic refactoring requests, while ChatGPT typically includes the refactoring intention; and (3) various learning settings when prompting ChatGPT in the context of refactoring. We envision that our findings contribute to a broader understanding of the collaboration between developers and AI models.CCS CONCEPTS* Software Engineering → Software Quality; Refactoring.
AbstractList Large Language Models (LLMs), like ChatGPT, have gained widespread popularity and usage in various software engineering tasks, including refactoring, testing, code review, and program comprehension. Despite recent studies delving into refactoring documentation in commit messages, issues, and code review, little is known about how developers articulate their refactoring needs when interacting with ChatGPT. In this paper, our goal is to explore conversations between developers and ChatGPT related to refactoring to better understand how developers identify areas for improvement in code and how ChatGPT addresses developers' needs. Our approach relies on text mining refactoring-related conversations from 17,913 ChatGPT prompts and responses, and investigating developers' explicit refactoring intention. Our results reveal that (1) developer-ChatGPT conversations commonly involve generic and specific terms/phrases; (2) developers often make generic refactoring requests, while ChatGPT typically includes the refactoring intention; and (3) various learning settings when prompting ChatGPT in the context of refactoring. We envision that our findings contribute to a broader understanding of the collaboration between developers and AI models.CCS CONCEPTS* Software Engineering → Software Quality; Refactoring.
Author AlOmar, Eman Abdullah
Newman, Christian D.
Ouni, Ali
Venkatakrishnan, Anushkrishna
Mkaouer, Mohamed Wiem
Author_xml – sequence: 1
  givenname: Eman Abdullah
  surname: AlOmar
  fullname: AlOmar, Eman Abdullah
  email: ealomar@stevens.edu
  organization: Stevens Institute of Technology,Hoboken,New Jersey,USA
– sequence: 2
  givenname: Anushkrishna
  surname: Venkatakrishnan
  fullname: Venkatakrishnan, Anushkrishna
  email: av3278@rit.edu
  organization: Rochester Institute of Technology,Rochester,New York,USA
– sequence: 3
  givenname: Mohamed Wiem
  surname: Mkaouer
  fullname: Mkaouer, Mohamed Wiem
  email: mmkaouer@umich.edu
  organization: University of Michigan-Flint,Flint,Michigan,USA
– sequence: 4
  givenname: Christian D.
  surname: Newman
  fullname: Newman, Christian D.
  email: cnewman@se.rit.edu
  organization: Rochester Institute of Technology,Rochester,New York,USA
– sequence: 5
  givenname: Ali
  surname: Ouni
  fullname: Ouni, Ali
  email: ali.ouni@etsmtl.ca
  organization: University of Quebec,ETS Montreal,Montreal,Quebec,Canada
BookMark eNo9jV1LwzAYhaMoOOeuvfEif6DzzVebXMmocxMGis5bR5q-cYWZjDZO---tKF49Bw7POefkJMSAhFwymDIm1bXIpTCGTQcq0OyITExhtAQoQOlCH5MRV4XMhM7lGZl0XVOByjk3SpoReV3GT5oifUJvXYotTdumo2Ws8YbOAp1_7XextUPR0-f0Ufc0BnqLB9zFPbZZubVp8bj-t5vwNrjhgG1nUxNDd0FOvd11OPnjmLzczdflMls9LO7L2SqzXOqU1cKCRgDmKs557bUROZPeMcd_MndMM29AgrG5rn3lazscIhaVQqeVE2Ny9bvbIOJm3zbvtu03DJRSGnLxDegkVyA
CODEN IEEPAD
ContentType Conference Proceeding
DBID 6IE
6IL
CBEJK
RIE
RIL
DOI 10.1145/3643991.3645081
DatabaseName IEEE Electronic Library (IEL) Conference Proceedings
IEEE Xplore POP ALL
IEEE Xplore All Conference Proceedings
IEEE/IET Electronic Library
IEEE Proceedings Order Plans (POP All) 1998-Present
DatabaseTitleList
Database_xml – sequence: 1
  dbid: RIE
  name: IEEE/IET Electronic Library
  url: https://ieeexplore.ieee.org/
  sourceTypes: Publisher
DeliveryMethod fulltext_linktorsrc
EISBN 9798400705878
EISSN 2574-3864
EndPage 206
ExternalDocumentID 10555806
Genre orig-research
GroupedDBID 6IE
6IL
6IN
AAWTH
ABLEC
ADZIZ
ALMA_UNASSIGNED_HOLDINGS
BEFXN
BFFAM
BGNUA
BKEBE
BPEOZ
CBEJK
CHZPO
IEGSK
OCL
RIE
RIL
ID FETCH-LOGICAL-a248t-d3a08e001cb222df893614fc1c2f8932c181f90409a68dfbfdafacee7b5ec85c3
IEDL.DBID RIE
ISICitedReferencesCount 9
ISICitedReferencesURI http://www.webofscience.com/api/gateway?GWVersion=2&SrcApp=Summon&SrcAuth=ProQuest&DestLinkType=CitingArticles&DestApp=WOS_CPL&KeyUT=001267321100032&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D
IngestDate Thu May 08 06:04:09 EDT 2025
IsPeerReviewed false
IsScholarly false
Language English
LinkModel DirectLink
MergedId FETCHMERGED-LOGICAL-a248t-d3a08e001cb222df893614fc1c2f8932c181f90409a68dfbfdafacee7b5ec85c3
PageCount 5
ParticipantIDs ieee_primary_10555806
PublicationCentury 2000
PublicationDate 2024-April-15
PublicationDateYYYYMMDD 2024-04-15
PublicationDate_xml – month: 04
  year: 2024
  text: 2024-April-15
  day: 15
PublicationDecade 2020
PublicationTitle Proceedings (IEEE/ACM International Conference on Mining Software Repositories. Online)
PublicationTitleAbbrev MSR
PublicationYear 2024
Publisher ACM
Publisher_xml – name: ACM
SSID ssib056229549
ssj0003211714
Score 2.0054228
Snippet Large Language Models (LLMs), like ChatGPT, have gained widespread popularity and usage in various software engineering tasks, including refactoring, testing,...
SourceID ieee
SourceType Publisher
StartPage 202
SubjectTerms Chatbots
ChatGPT
Codes
Documentation
mining software repositories
Oral communication
Refactoring documentation
Reviews
Software quality
Text mining
Title How to Refactor this Code? An Exploratory Study on Developer-ChatGPT Refactoring Conversations
URI https://ieeexplore.ieee.org/document/10555806
WOSCitedRecordID wos001267321100032&url=https%3A%2F%2Fcvtisr.summon.serialssolutions.com%2F%23%21%2Fsearch%3Fho%3Df%26include.ft.matches%3Dt%26l%3Dnull%26q%3D
hasFullText 1
inHoldings 1
isFullTextHit
isPrint
link http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV09T8MwELWgYmACRBHf8sDqtk7sOJ4QqiidqgoVqROVY58FS4JKWsS_5-ykLQsDmxXJSXT5eGe_d-8IuYNBIYwxHJcliWEiFRnTnkvmMTmQXiJEKBObTajJJJ_P9bQtVo-1MAAQxWfQC8PI5bvKrsJWWZ9Hd6pgsL2vVNYUa21eHsTxHWUVfsMpLm0UF62dDxeynwb01bwXmLdBMLL-1U8lwsno6J83cky6u8I8Ot1CzgnZg_KUvI6rL1pX9Bma5jk09Bimw8rBPX0oaaOyi2Q6DarBb1qVtNUKwZIN30z9NJ1tZ-N5cW4Z1BrNZl6XvIweZ8Mxa9smMJOIvGYuNYMcEH5sgeDvPGYkiMHecpuEcWIR1L3Gj1ebLHe-8M7gBQBUIcHm0qZnpFNWJZwTmqWFSp0FnhSZ0MFqTgtQGD_hIReQX5BuCM7io3HGWGzicvnH8StymGBSENgYLq9Jp16u4IYc2HX9_rm8jc_zBw4woEA
linkProvider IEEE
linkToHtml http://cvtisr.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwlV1NS8NAEF2kCnpSseK3e_Catptsks1JpFgr1lKkQk-WzWYWvSQSU8V_78wmbb148LYENgmTjze7b-Y9xq6gl0qttcBlia89GcjIS6wIPYvJQWhDhIhYO7OJeDxWs1kyaZrVXS8MALjiM-jQ0HH5WWEWtFXWFU6digS2N8k6q2nXWr4-iORr0op-xAEubmIhG0EfIcNuQPibiA5xbz2Ssv7lqOIAZbD7z1vZY-11ax6frEBnn21AfsBehsUXrwr-BLV9DieXYd4vMrjmNzmv6-wcnc6pbvCbFzlvqoWg9PqvurqbTFez8bw4N6d6jXo7r82eB7fT_tBrjBM87UtVeVmgewoQgEyK8J9ZzEkQha0RxqexbxDWbYKfb6IjldnUZhovABCnIRgVmuCQtfIihyPGoyCNg8yA8NNIJiQ2l0iIMX7SgpKgjlmbgjN_r7Ux5su4nPxx_JJtD6ePo_nofvxwynZ8TBGImxHhGWtV5QLO2Zb5rN4-ygv3bH8Al4ujiQ
openUrl ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=proceeding&rft.title=Proceedings+%28IEEE%2FACM+International+Conference+on+Mining+Software+Repositories.+Online%29&rft.atitle=How+to+Refactor+this+Code%3F+An+Exploratory+Study+on+Developer-ChatGPT+Refactoring+Conversations&rft.au=AlOmar%2C+Eman+Abdullah&rft.au=Venkatakrishnan%2C+Anushkrishna&rft.au=Mkaouer%2C+Mohamed+Wiem&rft.au=Newman%2C+Christian+D.&rft.date=2024-04-15&rft.pub=ACM&rft.eissn=2574-3864&rft.spage=202&rft.epage=206&rft_id=info:doi/10.1145%2F3643991.3645081&rft.externalDocID=10555806