The results strongly support the construct validity of 24 code quality metrics and reveal Coupling and Inheritance are revealed as multidimensional constructs, since they require measuring two different concepts, revealed as sub-categories in the analysis.
Abstract
Background: Code quality metrics are intended to measure latent properties of software source code. Although numerous code metrics have been proposed and used, their construct validity is rarely evaluated. Thus, the extent to which code metrics actually measure what they claim to measure is often unclear. Aim: Drawing from modern measurement theory, we investigate the construct validity of common class-level, object-oriented code quality metrics by identifying their factor structure using Exploratory Factor Analysis (EFA). The metrics were extracted from the Apache Maven project by three software tools: Designite, JHawk, and Understand. The factor structure was later verified using Confirmatory Factor Analysis (CFA) on 22 randomly selected open source projects meeting a predetermined eligibility criteria. Results: 24 code quality metrics that correspond to six constructs: Cohesion, In-Coupling, Out-Coupling, Size, Sub-Inheritance (related to subclasses), and Sup-Inheritance (related to superclasses) were revealed in the underlying factor structure. Ten metrics did not correspond to any known dimension of software quality and were removed in the EFA. Ten additional metrics exhibited low loadings in the CFA, suggesting their removal from the final measurement model. Size, Cohesion, Inheritance, and Coupling were the constructs retained, with subcategories identified for Inheritance and Coupling. Conclusions: Our results strongly support the construct validity of 24 code quality metrics. Coupling and Inheritance are revealed as multidimensional constructs, since they require measuring two different concepts, revealed as sub-categories in our analysis, and Complexity may be better explored in a multilevel model. Overall, our study demonstrates the value of applying modern measurement theory and latent variable modeling in validating software code quality metrics.
Existing code analysis systems address individual aspects of software quality (complexity, duplication, style) but do not combine multi-level analysis, metric aggregation, and learning-based inference within a single formal framework, nor do they close the loop between refactoring outcomes and assessment. This paper pr...
Ihor Prokofiev, Oleg Savenko· Automation, Control, and Inf...· 0 citations
Maintaining code quality remains a significant challenge in both educational and professional software development. This paper presents the development and evaluation of static code analysis tools aimed at identifying structural issues, such as complexity, cohesion, and maintainability in C# projects. The analyzers wer...
Peter Csaszar, Máté Cserép· Proceedings of the 13th Inte...· 0 citations
Software metrics play a central role in assessing and managing the quality of software systems providing quantitative insights into attributes such as complexity, reliability, rigidity, modifiability and maintainability. Among these, maintainability is particularly critical, as it directly influences the ease of system...
Remi M. Yusuf, M. S. Mashuk, Julian M. Bass· Communications of the IIMA· 0 citations
A large-scale empirical study of 265,363 Python notebooks submitted to Kaggle competitions found that competition expertise correlates with better performance, fewer ML-specific violations, and slightly more Python errors and refactoring violations.
Marius Mignard, Steven Costiou, Anne Etien· 0 citations
This study compares the structural quality of code produced by three widely adopted vibe coding tools --- Lovable, v0, and Replit --- starting from a single generation prompt and suggests that choosing between vibe coding tools involves structural trade-offs that go beyond perceived productivity.
The study demonstrates that metric-based detection can effectively identify maintainability problems in PHP applications and provides a foundation for future PHP-specific threshold development.
Naveed Toofani, Bayu Priyambadha, A. Arwan· Journal of Information Techn...· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.