How to Refactor this Code? An Exploratory Study on Developer-ChatGPT Refactoring Conversations
Not on the map. Why?
Abstract (arXiv)
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, in the context of code refactoring, with implications for model improvement, tool development, and best practices in software engineering.
Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). First posted on arXiv 8 Feb 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2024: 3; 2025: 7; 2026: 1.
11 papers.
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvementcited by 57
- 2024SOEN-101: Code Generation by Emulating Software Process Models Using Large Language Model Agentscited by 34
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Codingcited by 21
- 2025Agentic Refactoring: An Empirical Study of AI Coding Agentscited by 17
- 2025MANTRA: Enhancing Automated Method-Level Refactoring with Contextual RAG and Multi-Agent LLM Collaborationcited by 10
- 2025LLMs' Reshaping of People, Processes, Products, and Society in Software Development: A Comprehensive Exploration with Early Adopterscited by 8
- 2025Towards Practical Defect-Focused Automated Code Reviewcited by 3
- 2024Identifying Performance-Sensitive Configurations in Software Systems through Code Analysis with LLM Agentscited by 2
- 2025Leveraging LLMs, IDEs, and Semantic Embeddings for Automated Move Method Refactoringcited by 1
- 2025A Blueprint for AI-Driven Software Quality: Integrating LLMs with Established Standardscited by 1
- 2026Multi-Agent Coordinated Rename Refactoringcited by 0
- 2026Multi-Agent Coordinated Rename Refactoring1 Jan 2026
- 2025Agent READMEs: An Empirical Study of Context Files for Agentic Coding17 Nov 2025
- 2025Agentic Refactoring: An Empirical Study of AI Coding Agents6 Nov 2025
- 2025Towards Practical Defect-Focused Automated Code Review23 May 2025
- 2025A Blueprint for AI-Driven Software Quality: Integrating LLMs with Established Standards19 May 2025
- 2025Leveraging LLMs, IDEs, and Semantic Embeddings for Automated Move Method Refactoring26 Mar 2025
- 2025MANTRA: Enhancing Automated Method-Level Refactoring with Contextual RAG and Multi-Agent LLM Collaboration18 Mar 2025
- 2025LLMs' Reshaping of People, Processes, Products, and Society in Software Development: A Comprehensive Exploration with Early Adopters6 Mar 2025
- 2024Lingma SWE-GPT: An Open Development-Process-Centric Language Model for Automated Software Improvement1 Nov 2024
- 2024Identifying Performance-Sensitive Configurations in Software Systems through Code Analysis with LLM Agents18 Jun 2024
- 2024SOEN-101: Code Generation by Emulating Software Process Models Using Large Language Model Agents23 Mar 2024