ChatGPT for Code Refactoring: Analyzing Topics, Interaction, and Effective Prompts
By: Eman Abdullah AlOmar , Luo Xu , Sofia Martinez and more
Potential Business Impact:
Helps coders tell computers how to fix code.
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.
Similar Papers
Unveiling the Role of ChatGPT in Software Development: Insights from Developer-ChatGPT Interactions on GitHub
Software Engineering
Helps coders build programs faster with AI.
What Developers Ask to ChatGPT in GitHub Pull Requests? an Exploratory Study
Software Engineering
Helps coders use AI to fix and write programs.
Exploring Teachers' Perceptions of ChatGPT Through Prompt Engineering
Physics Education
Teaches teachers to use AI better for lessons.