Java Code Refactoring using Transformer-based Model
Year: 2026
Type: conference-paper
Abstract: Refactoring code is a process to increase its readability and understandability as maintenance process usually make the code more complex and difficult to be understand. One of the techniques in refactoring is by extracting code into different methods. The process of refactoring is usually done manually by reviewing the codes by experts. This is subjected to many issues as the refactoring is based on the experience of the experts. This work proposed automating the refactoring process by utilizing CodeT5, a unified pre-trained encoder-decoder Transformer model. The methodology involves fine-tuning the CodeT5 model using the MARV dataset, a comprehensive collection of public Java repositories curated for refactoring tasks. Results demonstrate the effectiveness of the approach, achieving a BLEU score of 55.84 and a CodeBLEU score of 60.2. These metrics indicate that CodeT5 can successfully generate syntactically valid and semantically accurate refactoring. This work contributes to the field of AI-assisted software engineering by validating that Transformer-based models can outperform current techniques
Institutions: Universiti Teknologi MARA System, Universiti Teknologi MARA
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: hybrid
OpenAlex ID: W7220726986
