Teaching Code Refactoring Using LLMs

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Khairnar, Anshul, Rajoju, Aarya, Gehringer, Edward F.
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866915443530268672
author Khairnar, Anshul
Rajoju, Aarya
Gehringer, Edward F.
author_facet Khairnar, Anshul
Rajoju, Aarya
Gehringer, Edward F.
contents This Innovative Practice full paper explores how Large Language Models (LLMs) can enhance the teaching of code refactoring in software engineering courses through real-time, context-aware feedback. Refactoring improves code quality but is difficult to teach, especially with complex, real-world codebases. Traditional methods like code reviews and static analysis tools offer limited, inconsistent feedback. Our approach integrates LLM-assisted refactoring into a course project using structured prompts to help students identify and address code smells such as long methods and low cohesion. Implemented in Spring 2025 in a long-lived OSS project, the intervention is evaluated through student feedback and planned analysis of code quality improvements. Findings suggest that LLMs can bridge theoretical and practical learning, supporting a deeper understanding of maintainability and refactoring principles.
format Preprint
id arxiv_https___arxiv_org_abs_2508_09332
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Teaching Code Refactoring Using LLMs
Khairnar, Anshul
Rajoju, Aarya
Gehringer, Edward F.
Software Engineering
Machine Learning
This Innovative Practice full paper explores how Large Language Models (LLMs) can enhance the teaching of code refactoring in software engineering courses through real-time, context-aware feedback. Refactoring improves code quality but is difficult to teach, especially with complex, real-world codebases. Traditional methods like code reviews and static analysis tools offer limited, inconsistent feedback. Our approach integrates LLM-assisted refactoring into a course project using structured prompts to help students identify and address code smells such as long methods and low cohesion. Implemented in Spring 2025 in a long-lived OSS project, the intervention is evaluated through student feedback and planned analysis of code quality improvements. Findings suggest that LLMs can bridge theoretical and practical learning, supporting a deeper understanding of maintainability and refactoring principles.
title Teaching Code Refactoring Using LLMs
topic Software Engineering
Machine Learning
url https://arxiv.org/abs/2508.09332