Passer à la navigation principale Passer à la recherche Passer au contenu principal

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

  • Eman Abdullah Alomar
  • , Anushkrishna Venkatakrishnan
  • , Mohamed Wiem Mkaouer
  • , Christian D. Newman
  • , Ali Ouni
  • Stevens Institute of Technology
  • Rochester Institute of Technology
  • University of Michigan, Flint
  • Université du Québec à Montréal

Résultats de recherche: Chapitre dans un livre, rapport, actes de conférenceParticipation à un ouvrage collectif lié à un colloque ou une conférenceRevue par des pairs

31 Citations (Scopus)

Résumé

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.

langue originaleAnglais
titreProceedings - 2024 IEEE/ACM 21st International Conference on Mining Software Repositories, MSR 2024
EditeurInstitute of Electrical and Electronics Engineers Inc.
Pages202-206
Nombre de pages5
ISBN (Electronique)9798400705878
Les DOIs
étatPublié - 2 juil. 2024
Modification externeOui
Evénement21st IEEE/ACM International Conference on Mining Software Repositories, MSR 2024 - Lisbon, Portugal
Durée: 15 avr. 202416 avr. 2024

Série de publications

NomProceedings - 2024 IEEE/ACM 21st International Conference on Mining Software Repositories, MSR 2024

Conférence

Conférence21st IEEE/ACM International Conference on Mining Software Repositories, MSR 2024
Pays/TerritoirePortugal
La villeLisbon
période15/04/2416/04/24

Empreinte digitale

Voici les principaux termes ou expressions associés à « How to Refactor this Code? An Exploratory Study on Developer-ChatGPT Refactoring Conversations ». Ces libellés thématiques sont générés à partir du titre et du résumé de la publication. Ensemble, ils forment une empreinte digitale unique.

Citer cette ressorce