Please use this identifier to cite or link to this item: http://repository.iiitd.edu.in/xmlui/handle/123456789/1402
Title: AI for software development: refactoring code-bases
Authors: Vohra, Aryan
Patel, Hardik
Jalote, Pankaj (Advisor)
Keywords: ChatGPT
Refactoring
Machine Learning
Software Engineering
Data Structures
Algorithms
Security
Issue Date: 29-Nov-2023
Publisher: IIIT-Delhi
Abstract: Code refactoring, in which an existing module is modified for satisfying some property while maintaining the functionality, is often needed as software evolves. Since refactoring is tedious and error prone, it is sometimes ignored, even though reforming could improve code quality. In this paper we experimentally explore the effectiveness of using genAI, in particular ChatGPT, for refactoring of python code modules. From open source, we collected 14 python modules of 100-300 LOC. We then refactored them using ChatGPT for two different end-goals: improving performance and improving maintainability or understandability. Our findings indicate that ChatGPT is able to successfully refactor in most of the cases, and also improves the code for the stated refactoring goal. We also explored different prompt styles for improving refactoring performance, and shared our experience of the same.
URI: http://repository.iiitd.edu.in/xmlui/handle/123456789/1402
Appears in Collections:Year-2023

Files in This Item:
File Description SizeFormat 
Aryan-1 - Aryan Vohra.pdf
  Restricted Access
501.8 kBAdobe PDFView/Open Request a copy
BTP Report - Hardik Patel.pdf
  Restricted Access
501.68 kBAdobe PDFView/Open Request a copy


Items in DSpace are protected by copyright, with all rights reserved, unless otherwise indicated.