Contribution Of Structural And Semantic Features To Cohesion In Software Module Clustering Using K-Means
Sandi Tendean, Stefanie Quinevera
Universitas Widya Dharma Pontianak
Key points
From the paper's conclusion- These findings indicate that no single feature type is universally best; feature selection must consider project characteristics and the intended goal
Abstract
Understanding the modular structure of source code is a major challenge in software maintenance. Clustering classes into modules can assist reverse engineering, but its effectiveness depends on feature selection. This study compares the contribution of structural and semantic features to the cohesion of clustering results. Five projects developed using an object-oriented approach of varying sizes are used as test cases. K-means is run 50 times for each scenario, with the number of clusters fixed to the number of original packages. Structural features produce clusters with the highest internal cohesion across all projects, but their alignment with original packages is low. In contrast, semantic features yield very low internal cohesion; however, on three projects they are statistically more aligned with original packages compared to structural features. Feature combination does not provide meaningful improvement; semantic features tend to reduce cohesion without increasing package alignment. These findings indicate that no single feature type is universally best; feature selection must consider project characteristics and the intended goal
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Beyond Predictive Performance: SHAP-Based Explanations and Alignment with Literature-Based Indicators in Code Smell DetectionInformation · 2026
- Empirical study on the correlation among architectural smellsInformation and Software Technology · 2026
- Code Cloning and Procedural Abstraction in Scratch: A Large-Scale Study of Co-Existing Reuse PracticesarXiv · 2026
- Similarity-Weighted Leiden-CPM Clustering of a 7.4-Million-Node Biomedical Citation Graph: Weight Alignment, Scale, and SparsityarXiv · 2026
- ASNER: Software Architecture Recovery with Adaptive Semantic Neighborhoods and Evidence-Grounded RefinementarXiv · 2026
- ProgSCA: Software Composition Analysis via Program-Level ModelingProceedings of the ACM on Software Engineering · 2026