ROSE: Transformer-Based Refactoring Recommendation for Architectural Smells

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Nursapa, Samal, Samuilova, Anastassiya, Bucaioni, Alessio, Nguyen, Phuong T.
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866918098227953664
author Nursapa, Samal
Samuilova, Anastassiya
Bucaioni, Alessio
Nguyen, Phuong T.
author_facet Nursapa, Samal
Samuilova, Anastassiya
Bucaioni, Alessio
Nguyen, Phuong T.
contents Architectural smells such as God Class, Cyclic Dependency, and Hub-like Dependency degrade software quality and maintainability. Existing tools detect such smells but rarely suggest how to fix them. This paper explores the use of pre-trained transformer models--CodeBERT and CodeT5--for recommending suitable refactorings based on detected smells. We frame the task as a three-class classification problem and fine-tune both models on over 2 million refactoring instances mined from 11,149 open-source Java projects. CodeT5 achieves 96.9% accuracy and 95.2% F1, outperforming CodeBERT and traditional baselines. Our results show that transformer-based models can effectively bridge the gap between smell detection and actionable repair, laying the foundation for future refactoring recommendation systems. We release all code, models, and data under an open license to support reproducibility and further research.
format Preprint
id arxiv_https___arxiv_org_abs_2507_12561
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle ROSE: Transformer-Based Refactoring Recommendation for Architectural Smells
Nursapa, Samal
Samuilova, Anastassiya
Bucaioni, Alessio
Nguyen, Phuong T.
Software Engineering
Architectural smells such as God Class, Cyclic Dependency, and Hub-like Dependency degrade software quality and maintainability. Existing tools detect such smells but rarely suggest how to fix them. This paper explores the use of pre-trained transformer models--CodeBERT and CodeT5--for recommending suitable refactorings based on detected smells. We frame the task as a three-class classification problem and fine-tune both models on over 2 million refactoring instances mined from 11,149 open-source Java projects. CodeT5 achieves 96.9% accuracy and 95.2% F1, outperforming CodeBERT and traditional baselines. Our results show that transformer-based models can effectively bridge the gap between smell detection and actionable repair, laying the foundation for future refactoring recommendation systems. We release all code, models, and data under an open license to support reproducibility and further research.
title ROSE: Transformer-Based Refactoring Recommendation for Architectural Smells
topic Software Engineering
url https://arxiv.org/abs/2507.12561