EUVIMEDEUVIMED entdecken
Crossref

AI-Driven Refactoring: Semantic Reconstruction of Domain Models Using LLM Reasoning

Mohamed El BOUKHARI, Nassim KHARMOUM, Soumia ZITI

International Journal of Advanced Computer Science and Applications · 2026 · 17 (2)

DOI: 10.14569/ijacsa.2026.0170283 ↗

Kurz gefasst

Fachartikel in der Zeitschrift International Journal of Advanced Computer Science and Applications, 2026. Verfasst von Mohamed El BOUKHARI und 2 weiteren Autor:innen.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

This study examines the application of large language models (LLMs) for automating domain layer reconstruction in legacy systems, with a specific focus on a case study involving water consumption management. The process begins with a deliberately disordered JSON representation that conflates domain, application, and infrastructure issues. An LLM, specifically GPT-5.2, was employed to identify misplaced methods, inconsistent naming, DTO misuse, incoherent aggregates, and unrelated modules, and subsequently reorganize the model into a structure aligned with Domain-Driven Design (DDD). The structure includes entities, value objects, aggregates, domain services, domain events, and repositories. The methodology involves encoding the legacy model as JSON, applying an LLM-based diagnosis and reconstruction pipeline, and producing both a refined domain model and a categorized catalogue of corrections. A comparative analysis of candidate LLMs, informed by recent code-centric benchmarks, such as SWE-bench and LiveCodeBench, supports the selection of GPT-5.2 as the primary model for this study. The findings indicate that the LLM can swiftly recover key domain concepts and achieve semantically consistent refactoring, a task that typically requires extensive manual effort. This suggests that LLM-assisted domain reconstruction is a promising adjunct to traditional refactoring practices and can facilitate continuous architectural improvements in organizations.

Zitieren

APA

BOUKHARI, M. E., KHARMOUM, N., & ZITI, S. (2026). AI-Driven Refactoring: Semantic Reconstruction of Domain Models Using LLM Reasoning. International Journal of Advanced Computer Science and Applications, 17(2). https://doi.org/10.14569/ijacsa.2026.0170283

Vancouver

BOUKHARI ME, KHARMOUM N, ZITI S. AI-Driven Refactoring: Semantic Reconstruction of Domain Models Using LLM Reasoning. International Journal of Advanced Computer Science and Applications. 2026;17(2). doi:10.14569/ijacsa.2026.0170283

BibTeX
@article{BOUKHARI2026,
  author = {BOUKHARI, Mohamed El and KHARMOUM, Nassim and ZITI, Soumia},
  title = {AI-Driven Refactoring: Semantic Reconstruction of Domain Models Using LLM Reasoning},
  journal = {International Journal of Advanced Computer Science and Applications},
  year = {2026},
  volume = {17},
  number = {2},
  doi = {10.14569/ijacsa.2026.0170283}
}
Kostenlos starten →