Cited by 29Software Engineering ResearchSoftware Engineering Techniques and PracticesSoftware Reliability and Analysis Research

Empirical analysis of the relationship between CC and SLOC in a large corpus of Java methods and C functions

Open access
Landman, Davy, Serebrenik, Alexander, Bouwers, Eric, Vinju, Jurgen J.·2016·Journal of Software: Evolution and Process

Abstract

Measuring the internal quality of source code is one of the traditional goals of making software development into an engineering discipline. Cyclomatic complexity (CC) is an often used source code quality metric, next to source lines of code (SLOC). However, the use of the CC metric is challenged by the repeated claim that CC is redundant with respect to SLOC because of strong linear correlation. We conducted an extensive literature study of the CC/SLOC correlation results. Next, we tested correlation on large Java (17.6 M methods) and C (6.3 M functions) corpora. Our results show that linear correlation between SLOC and CC is only moderate as a result of increasingly high variance. We further observe that aggregating CC and SLOC as well as performing a power transform improves the correlation. Our conclusion is that the observed linear correlation between CC and SLOC of Java methods or C functions is not strong enough to conclude that CC is redundant with SLOC. This conclusion contradicts earlier claims from literature but concurs with the widely accepted practice of measuring of CC next to SLOC. Copyright © 2015 John Wiley & Sons, Ltd.

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

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

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

Integrity signals

Registry

Crossref · 10.1002/smr.1760

Cites

90 of 90 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

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

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

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

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • The two measures (SLOC and CC) tend to be correlated, but not strongly enough to conclude that CC is redundant with SLOC.

    “The two measures tend to be correlated, but not strongly enough to conclude that CC is redundant with SLOC [61].”

Self-check

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

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

Cites

Flagged first, then by citations

Research works printed but not linked: 5

  1. [25]25. Malhotra R, Singh Y. On the applicability of machine learning techniques for object oriented software fault prediction. Software Engineering: An International Journal 2011; 1:24-37.
  2. [28]28. Vasilescu B, Serebrenik A, van den Brand MGJ. By no means: a study on aggregating software metrics. 2nd Inter- national Workshop on Emerging Trends in Software Metrics, WETSoM, ACM, 2011; 23-26.
  3. [36]36. DAVY LANDMAN ET AL. Copyright © 2015 John Wiley & Sons, Ltd. J. Softw. Evol. and Proc. 2016; 28:589-618 DOI: 10.1002/smr · DOI
  4. [63]63. Paige M. A metric for software test planning. Conference Proceedings of COMPSAC 1980; 80:499-504.
  5. [66]66. EMPIRICAL ANALYSIS OF THE RELATIONSHIP BETWEEN CC AND SLOC 617 Copyright © 2015 John Wiley & Sons, Ltd. J. Softw. Evol. and Proc. 2016; 28:589-618 DOI: 10.1002/smr · DOI

Cited by

Sorted by citations

Authors
Landman, D., Serebrenik, A., Bouwers, E., & Vinju, J. J.
Affiliations
  • Centrum Wiskunde & Informatica (NL)
  • Eindhoven University of Technology (NL)
  • Software Improvement Group Amsterdam The Netherlands
  • Institut national de recherche en sciences et technologies du numérique (FR)
Corresponding author
Landman, Davy
Venue
Journal of Software: Evolution and Process
Publisher
Wiley
Published
2015-12-09
Volume
28
Issue
7
Pages
589-618
ISSN
  • 2047-7473 (ISSN-L)
  • 2047-7481
OpenAlex
W2296620627
Cited by
29
References
90
Citations by year
2025: 1 · 2024: 2 · 2023: 5 · 2022: 2 · 2021: 2 · 2020: 3 · 2019: 4 · 2018: 4 · 2017: 5 · 2016: 1
FWCI
8.96
Type
journal article
Language
en
Open access
Locations
  • Journal of Software Evolution and Process (publishedVersion)
  • Centrum Wiskunde & Informatica (CWI), the national research institute for mathematics and computer science in the Netherlands (submittedVersion)
  • TU/e Research Portal (submittedVersion)
  • Data Archiving and Networked Services (DANS) (submittedVersion, other-oa)
  • TU/e Research Portal (submittedVersion, other-oa)
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Techniques and Practices
  • Physical Sciences › Computer Science › Software › Software Reliability and Analysis Research
Keywords
cyclomatic complexity, source lines of code, Java methods, c-function, power transformation, metric aggregation, software metrics

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