Empirical analysis of the relationship between CC and SLOC in a large corpus of Java methods and C functions. Issue 7 (9th December 2015)
- Record Type:
- Journal Article
- Title:
- Empirical analysis of the relationship between CC and SLOC in a large corpus of Java methods and C functions. Issue 7 (9th December 2015)
- Main Title:
- Empirical analysis of the relationship between CC and SLOC in a large corpus of Java methods and C functions
- Authors:
- Landman, Davy
Serebrenik, Alexander
Bouwers, Eric
Vinju, Jurgen J. - Other Names:
- Moonen Leon guestEditor.
Pollock Lori guestEditor. - Abstract:
- 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. Abstract : We analyzed the relationship between cyclomatic complexity (CC) and lines of code (SLOC) for two large corpora of Java and C software. Contradicting earlier claims from literature, we observed that the linear correlation between CC and SLOC is not strong enough to conclude that CC is redundant to SLOC. This is caused byAbstract: 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. Abstract : We analyzed the relationship between cyclomatic complexity (CC) and lines of code (SLOC) for two large corpora of Java and C software. Contradicting earlier claims from literature, we observed that the linear correlation between CC and SLOC is not strong enough to conclude that CC is redundant to SLOC. This is caused by increasingly high variance and concurs with the widely accepted practice of measuring of CC next to SLOC. … (more)
- Is Part Of:
- Journal of software. Volume 28:Issue 7(2016)
- Journal:
- Journal of software
- Issue:
- Volume 28:Issue 7(2016)
- Issue Display:
- Volume 28, Issue 7 (2016)
- Year:
- 2016
- Volume:
- 28
- Issue:
- 7
- Issue Sort Value:
- 2016-0028-0007-0000
- Page Start:
- 589
- Page End:
- 618
- Publication Date:
- 2015-12-09
- Subjects:
- McCabe cyclomatic complexity -- empirical validation -- software maintenance -- metrics
Software engineering -- Periodicals
Computer software -- Development -- Periodicals
Software maintenance -- Periodicals
005.1 - Journal URLs:
- http://onlinelibrary.wiley.com/journal/10.1002/(ISSN)2047-7481 ↗
http://onlinelibrary.wiley.com/ ↗ - DOI:
- 10.1002/smr.1760 ↗
- Languages:
- English
- ISSNs:
- 2047-7473
- Deposit Type:
- Legaldeposit
- View Content:
- Available online (eLD content is only available in our Reading Rooms) ↗
- Physical Locations:
- British Library DSC - BLDSS-3PM
British Library HMNTS - ELD Digital store - Ingest File:
- 4569.xml