Generating Software Architectural Model from Source Code Using Module Clustering
Künye
ARASTEH, Bahman, Seyed Salar SEFATI, Hüseyin KUSETOĞULLARI & Farzad KIANI. "Generating Software Architectural Model from Source Code Using Module Clustering". Symmetry, 17.9 (2025): 1-24.Özet
Software maintenance is one of the most expensive phases in software development,
especially when complex source code is the only available artifact. Clustering software
modules and generating a structured architectural model can significantly reduce the
effort and cost of maintenance. This study aims to achieve high-quality modularization
by maximizing intra-cluster cohesion, minimizing inter-cluster coupling, and optimizing
overall modular quality. Since finding optimal clustering is an NP-complete problem, many
existing methods suffer from poor modular structures, instability, and inconsistent results.
To overcome these limitations, this paper proposes a module clustering method using a
discrete bedbug optimizer. In software architecture, symmetry refers to the balanced and
structured arrangement of modules. In the proposed method, module clustering aims
to identify and group related modules based on structural and behavioral similarities,
reflecting symmetrical properties in the source code. Conversely, asymmetries, such as
modules with irregular dependencies, can indicate architectural flaws. The method was
evaluated on ten widely used real-world software datasets. The experimental results show
that the proposed algorithm consistently delivers superior modularization quality, with
an average score of 2.806 and a well-balanced trade-off between cohesion and coupling.
Overall, this research presents an effective solution for software module clustering and
provides better architecture recovery and more maintainable systems.



















