Skip to main content Skip to navigation

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

Project Overview

The document examines the integration of generative AI, particularly Large Language Models (LLMs) like ChatGPT, in the field of education, highlighting their applications and outcomes. It focuses on how these AI tools assist educators and students by enhancing learning experiences and improving educational practices. Key applications include personalized tutoring, automated grading, and content generation, which cater to diverse learning needs and streamline administrative tasks. The findings reveal that generative AI can significantly enhance engagement and comprehension among learners while also providing educators with valuable insights into student performance and areas for improvement. However, challenges such as ensuring the accuracy of AI-generated content and addressing ethical concerns related to data privacy and bias are also discussed. Overall, the document illustrates that while generative AI holds great potential in transforming educational environments, careful consideration of its implementation and ongoing refinement is necessary to maximize its benefits and mitigate risks.

Key Applications

ChatGPT for code refactoring conversations

Context: Software development, targeting developers seeking to improve code quality.

Implementation: Text mining conversations from a dataset of developer-ChatGPT interactions, focusing on refactoring requests.

Outcomes: Increased understanding of how developers communicate refactoring needs; insights into the effectiveness of ChatGPT in suggesting refactoring improvements.

Challenges: Limited understanding of the broader context of the codebase can lead to incorrect suggestions; variability in prompt quality affects response accuracy.

Implementation Barriers

Understanding and Quality Barrier

ChatGPT has a limited understanding of the broader context of the codebase, which may lead to incomplete or incorrect refactoring suggestions. Additionally, the quality of ChatGPT's responses is highly dependent on the quality of the prompts provided by developers.

Proposed Solutions: Improving prompt engineering practices, educating developers on effective prompt crafting, and encouraging them to provide more context in their requests to enhance the relevance and accuracy of ChatGPT's responses.

Project Team

Eman Abdullah AlOmar

Researcher

Anushkrishna Venkatakrishnan

Researcher

Mohamed Wiem Mkaouer

Researcher

Christian D. Newman

Researcher

Ali Ouni

Researcher

Contact Information

For information about the paper, please contact the authors.

Authors: Eman Abdullah AlOmar, Anushkrishna Venkatakrishnan, Mohamed Wiem Mkaouer, Christian D. Newman, Ali Ouni

Source Publication: View Original PaperLink opens in a new window

Project Contact: Dr. Jianhua Yang

LLM Model Version: gpt-4o-mini-2024-07-18

Analysis Provider: Openai

Let us know you agree to cookies