Architectural design documentation in large-scale software such as Moodle is often inconsistent with its actual implementation, triggering technical debt. Consequently, automated extraction efforts frequently fail due to visual pollution resulting in "Spaghetti Diagrams". To address this specific issue, this study aims to resolve the visual pollution problem through a Static Code Analysis (SCA) approach based on the Abstract Syntax Tree (AST). This approach automatically reconstructs class diagrams across 220 Moodle source code files within the Assign, Course, and User modules. The evaluation is measured based on the quantity of successfully extracted architectural elements (classes, attributes, methods, relations) and the readability of the visual design. Extraction results indicate that the algorithm successfully processed all code without execution errors, with the Course Module recording the highest complexity level. The implementation of filtering and blacklisting mechanisms to discard utility classes and ignore local-level dependency relations proved crucial and effective in eliminating architectural noise. In conclusion, the reconstructed UML class diagram visualization is proven to be representative and accurate, serving as an actual architectural blueprint to facilitate continuous system maintenance.
Copyrights © 2026