TY - GEN
T1 - How to Refactor this Code? An Exploratory Study on Developer-ChatGPT Refactoring Conversations
AU - Alomar, Eman Abdullah
AU - Venkatakrishnan, Anushkrishna
AU - Mkaouer, Mohamed Wiem
AU - Newman, Christian D.
AU - Ouni, Ali
N1 - Publisher Copyright:
© 2024 ACM.
PY - 2024
Y1 - 2024
N2 - 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.
AB - 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.
KW - ChatGPT
KW - mining software repositories
KW - Refactoring documentation
UR - http://www.scopus.com/inward/record.url?scp=85197428680&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=85197428680&partnerID=8YFLogxK
U2 - 10.1145/3643991.3645081
DO - 10.1145/3643991.3645081
M3 - Conference contribution
AN - SCOPUS:85197428680
T3 - Proceedings - 2024 IEEE/ACM 21st International Conference on Mining Software Repositories, MSR 2024
SP - 202
EP - 206
BT - Proceedings - 2024 IEEE/ACM 21st International Conference on Mining Software Repositories, MSR 2024
T2 - 21st IEEE/ACM International Conference on Mining Software Repositories, MSR 2024
Y2 - 15 April 2024 through 16 April 2024
ER -