Hermawan, Thariq Agfi (2026) Refaktorisasi Arsitektur MVC Ke Clean Architecture Menggunakan Large Language Model. Other thesis, Institut Teknologi Sepuluh Nopember.
|
Text
5025211215-Undergraduate_Thesis.pdf - Accepted Version Restricted to Repository staff only Download (13MB) | Request a copy |
Abstract
Penelitian ini memanfaatkan kemampuan Large Language Model (LLM) untuk membantu melakukan arc hitecture refactoring secara otomatis dengan menghasilkan komponen Clean Architecture dari kode sumber yang menerapkan arsitektur Model–View–Controller (MVC). Studi ini terdiri atas preprocessing kode sumber, klasifikasi komponen arsitektur menggunakan model LLM berjenis pre-trained, serta eksplorasi berbagai teknik prompt seperti zero-shot, few-shot, dan chain-of-thought (CoT). Selain itu, penelitian ini juga menerapkan beberapa varian prompting, antara lain layer structure dan component structure, untuk menghasilkan struktur komponen target yang sesuai dengan Clean Architecture. Penelitian ini membandingkan performa dua kategori LLM, yaitu model general purpose dan model yang dikhususkan untuk coding tasks, dalam melakukan pemetaan komponen arsitektur. Evaluasi dilakukan dengan membandingkan struktur komponen yang dihasilkan oleh LLM terhadap ground truth menggunakan metrik precision, recall, F1-score, dan CodeBLEU. Hasil penelitian menunjukkan bahwa teknik prompting berbasis struktur, khususnya few-shot component structure, secara konsisten menghasilkan performa terbaik pada evaluasi struktur proyek maupun evaluasi kode. Model Qwen/Qwen3-Coder yang dikombinasikan dengan few-shot component structure memperoleh hasil tertinggi dengan nilai precision struktur proyek sebesar 0,9325 dan nilai CodeBLEU sebesar 0,5227. Analisis lebih lanjut pada level cluster controller menunjukkan bahwa layer Infrastructure menghasilkan skor evaluasi yang tertinggi dengan nilai CodeBLEU sebesar 0,9269 pada cluster Class Controller menggunakan zero-shot component structure.
===================================================================================================================================
This study addresses the challenges of manual architecture refactoring, which typically requires significant time, effort, cost, and deep expertise in software architecture. To overcome these limitations, this research leverages the capabilities of Large Language Models (LLMs) to support automated architecture refactoring by generating Clean Architecture components from MVC architecture in Attendance Management System source code. The study consists of source code preprocessing, architectural component classification using pre-trained LLMs, and the exploration of various prompting techniques, including zero-shot, few-shot, and chain-of-thought (CoT). In addition, several prompting variants, namely layer structure and component structure, are applied to generate target component structures aligned with Clean Architecture. The performance of two categories of LLMs, general purpose models and models specialized for coding tasks is compared in performing architectural component mapping. The evaluation is conducted by comparing the component structures generated by the LLMs against the ground truth using precision, recall, F1-score, and CodeBLEU metrics. The results demonstrate that the few-shot component structure prompting technique achieves the best performance in both project structure evaluation and code-level evaluation. The Qwen/Qwen3-Coder model combined with few-shot component structure attains the highest results, achieving a project structure recall of 0,9235 and a CodeBLEU score of 0,4856. Furthermore, the CodeBLEU score shows an improvement of approximately 4% compared to the other prompting techniques, namely zero-shot component structure and cot component structure, which achieve CodeBLEU scores of 0,428.
| Item Type: | Thesis (Other) |
|---|---|
| Uncontrolled Keywords: | Architecture Refactoring, Code Generation, Large Language Model, Prompt Technique |
| Subjects: | Q Science > QA Mathematics > QA336 Artificial Intelligence Q Science > QA Mathematics > QA76.754 Software architecture. Computer software Q Science > QA Mathematics > QA76.758 Software engineering |
| Divisions: | Faculty of Intelligent Electrical and Informatics Technology (ELECTICS) > Informatics Engineering > 55201-(S1) Undergraduate Thesis |
| Depositing User: | Thariq Agfi Hermawan |
| Date Deposited: | 29 Jan 2026 08:07 |
| Last Modified: | 29 Jan 2026 08:07 |
| URI: | http://repository.its.ac.id/id/eprint/131154 |
Actions (login required)
![]() |
View Item |
