'Can You Refactor This for Me?': Investigating How Students Use ChatGPT in Code Refactoring Exercises

Publication date

2025-06-27

Authors

Carneiro Oliveira, EduardoORCID 0009-0004-5795-5219ISNI 0000000518010087
Keuning, HiekeISNI 000000049290580X
Jeuring, J.T.ISNI 0000000110063265

Editors

Advisors

Supervisors

Document Type

Part of book
Open Access logo

License

taverne

Abstract

LLMs are increasingly used in programming education. However, little research has explored their use in teaching and learning code refactoring. In this study, we use a grounded-theory approach to examine student-LLM conversations during code refactoring exercises. Our preliminary results show that students use LLM in various modes, such as requesting a refactoring for the entire program at once or discussing refactoring possibilities in long conversations.

Keywords

code refactoring, generative ai, llms, programming education, Taverne, Management of Technology and Innovation, Education

Citation

Carneiro Oliveira, E, Keuning, H & Jeuring, J 2025, 'Can You Refactor This for Me?': Investigating How Students Use ChatGPT in Code Refactoring Exercises. in ITiCSE 2025 - Proceedings of the 30th ACM Conference on Innovation and Technology in Computer Science Education. Annual Conference on Innovation and Technology in Computer Science Education, ITiCSE, vol. 2, Association for Computing Machinery, pp. 788-788, 30th Annual Conference on Innovation and Technology in Computer Science Education, ITiCSE 2025, Nijmegen, Netherlands, 27/06/25. https://doi.org/10.1145/3724389.3730789, conference