CoChat

Assessing the Construct Validity of Object-Oriented, Class-Level Code Quality Metrics

Open access
Paul Ralph, Nauman bin Ali, Sebastian Baltes, Domenico Bianculli, Jessica Díaz, Yvonne Dittrich, Neil Ernst, Michael Felderer, ROBERT H. FELDT, Antonio Filieri, Breno Bernard Nicolau de França, Carlo A. Furia, Greg Gay, Nicolas Gold, Daniel Graziotin, Pinjia He, Rashina Hoda, Natália Juristo, Barbara Ann Kitchenham, Valentina Lenarduzzi, Jorge Martínez, Jorge Melegati, Daniel Méndez, Tim Menzies, Jefferson Seide Molléri, Dietmar Pfahl, Romain Robbes, Daniel Russo, Nyyti Saarimäki, Federica Sarro, Davide Taibi, Janet Siegmund, Diomidis D. Spinellis, Miroslaw Staron, Klaas-Jan Stol, Margaret‐Anne Storey, Davide Taibi, Damian A. Tamburri, Marco Torchiano, Christoph Treude, Burak Turhan, Xiaofeng Wang, Sira Vegas · 2020 · arXiv (Cornell University)
PreprintCited by 97

The DOI matches its OpenAlex record.

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. Method. As code quality metrics are intended to reflect latent attributes, such as cohesion and coupling, we identified the factor structure of code quality metrics 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 exploratory analysis. Ten additional metrics exhibited low loadings in the confirmatory analysis, 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. Our results also corroborate the relationship between Cohesion, Size, and Out-Coupling which can be further explored in a structural model. Some metrics from the Chidamber & Kemerer metrics suite are found to perhaps be measuring different constructs than intended. Our results reveal the need for creating or integrating metrics that reflect existing constructs but measure fundamentally different properties to improve the content validity of the measurement model. Additionally, we provide useful recommendations for researchers, developers, and tool providers which stem from theoretical and empirical justification. Overall, our study demonstrates the value of applying modern measurement theory and latent variable modeling in validating software code quality metrics.

Overview

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

OpenAlex · 10.4230/lipics.esem.2026.10

Cites

Statistics

Verification

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.

A few free checks a day · papers already verified open instantly · results are public

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Citations

Cited by

See all 97

Metadata

Authors
Ralph, P., bin Ali, N., Baltes, S., Bianculli, D., Díaz, J., Dittrich, Y., Ernst, N., Felderer, M., FELDT, R. H., Filieri, A., de França, B. B. N., Furia, C. A., Gay, G., Gold, N., Graziotin, D., He, P., Hoda, R., Juristo, N., Kitchenham, B. A., Lenarduzzi, V., Martínez, J., Melegati, J., Méndez, D., Menzies, T., Molléri, J. S., Pfahl, D., Robbes, R., Russo, D., Saarimäki, N., Sarro, F., Taibi, D., Siegmund, J., Spinellis, D. D., Staron, M., Stol, K.-J., Storey, M., Taibi, D., Tamburri, D. A., Torchiano, M., Treude, C., Turhan, B., Wang, X., & Vegas, S.
Venue
arXiv (Cornell University)
Publisher
Cornell University
Published
2020-10-07
ISSN
2331-8422 (ISSN-L)
OpenAlex
W3134402730
Cited by
97
References
0
Type
posted content
Language
en
Open access
green

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review

How to cite

Cite CoChat for the checks on this page, and the paper for its own findings.

This page
CoChat. (2026). Citation check: Assessing the Construct Validity of Object-Oriented, Class-Level Code Quality Metrics. https://app.cochat.ai/papers/10.4230/lipics.esem.2026.10
The paper
Ralph, P., bin Ali, N., Baltes, S., Bianculli, D., Díaz, J., Dittrich, Y., Ernst, N., Felderer, M., FELDT, R. H., Filieri, A., de França, B. B. N., Furia, C. A., Gay, G., Gold, N., Graziotin, D., He, P., Hoda, R., Juristo, N., Kitchenham, B. A., . . . Vegas, S. (2020). Assessing the Construct Validity of Object-Oriented, Class-Level Code Quality Metrics. arXiv (Cornell University). https://doi.org/10.4230/lipics.esem.2026.10

Data sources

Bibliographic data: Semantic Scholar, OpenAlex, Crossref.

Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).

Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.