Predictors of Software Metric Correlation: A Non-parametric Analysis
A number of authors hypothesize and experimentally confirm that Cyclomatic Complexity (CC) has a very strong correlation with Lines of Code (LOC), justifying the use of LOC in place of CC. Others report on a moderate correlation and advocate for the use of both metrics. These studies have, for the m...
Saved in:
| Published in | IEEE International Conference on Software Quality, Reliability and Security (Online) pp. 524 - 533 |
|---|---|
| Main Authors | , |
| Format | Conference Proceeding |
| Language | English |
| Published |
IEEE
01.12.2021
|
| Subjects | |
| Online Access | Get full text |
| ISSN | 2693-9177 |
| DOI | 10.1109/QRS54544.2021.00063 |
Cover
| Abstract | A number of authors hypothesize and experimentally confirm that Cyclomatic Complexity (CC) has a very strong correlation with Lines of Code (LOC), justifying the use of LOC in place of CC. Others report on a moderate correlation and advocate for the use of both metrics. These studies have, for the most part, studied production code, and we suspect different results may be observed for test code. With 40 different, large open-source subjects and five subjects from industry partners, we collected metric values for LOC, CC and Halstead Effort (HE) and measured their correlation. In test code, contrary to production code, there exist a very weak (or almost no) correlation between (a) LOC and CC, and weak (nearly moderate) correlation for (b) HE and CC, and (c) LOC and HE. We therefore argue and propose that the level of correlation depends on at least three factors namely: the kind of code (i.e., production code vs test code), the kind of software (open-source vs industry) and the kind of metric (LOC, CC, HE). Given the weak monotonicity between CC, LOC and HE we observe, we aspire to challenge the viewpoint that CC and Halstead metrics are redundant with LOC, as some studies suggest, at least on test code. We therefore advocate for using CC over LOC (or both, or cyclomatic density) when studying test code, as CC is perceived to better reflect cognitive complexity, numerical complexity, interdependency and code refactoring that cannot be accounted for simply by LOC. |
|---|---|
| AbstractList | A number of authors hypothesize and experimentally confirm that Cyclomatic Complexity (CC) has a very strong correlation with Lines of Code (LOC), justifying the use of LOC in place of CC. Others report on a moderate correlation and advocate for the use of both metrics. These studies have, for the most part, studied production code, and we suspect different results may be observed for test code. With 40 different, large open-source subjects and five subjects from industry partners, we collected metric values for LOC, CC and Halstead Effort (HE) and measured their correlation. In test code, contrary to production code, there exist a very weak (or almost no) correlation between (a) LOC and CC, and weak (nearly moderate) correlation for (b) HE and CC, and (c) LOC and HE. We therefore argue and propose that the level of correlation depends on at least three factors namely: the kind of code (i.e., production code vs test code), the kind of software (open-source vs industry) and the kind of metric (LOC, CC, HE). Given the weak monotonicity between CC, LOC and HE we observe, we aspire to challenge the viewpoint that CC and Halstead metrics are redundant with LOC, as some studies suggest, at least on test code. We therefore advocate for using CC over LOC (or both, or cyclomatic density) when studying test code, as CC is perceived to better reflect cognitive complexity, numerical complexity, interdependency and code refactoring that cannot be accounted for simply by LOC. |
| Author | Labiche, Yvan Afriyie, Daniel |
| Author_xml | – sequence: 1 givenname: Daniel surname: Afriyie fullname: Afriyie, Daniel email: danielafriyie@cmail.carleton.ca organization: Carleton University – sequence: 2 givenname: Yvan surname: Labiche fullname: Labiche, Yvan email: yvanlabiche@cunet.carleton.ca organization: Carleton University |
| BookMark | eNotjF1LwzAYRqMoOGd_wW76B1rfN5-Nd6U6Febn9HqkTQKRrhlpQfbvLcyrw8N5ONfkYoiDI2SFUCKCvv343AouOC8pUCwBQLIzkmlVoZSzqJDpc7KgUrNCo1JXJBvHn_nGKHBAXJD79-Rs6KaYxjz6fBv99GuSy1_clEKXNzEl15spxOEur_PXOBQHk8z-ZOvB9McxjDfk0pt-dNk_l-R7_fDVPBWbt8fnpt4UgQKbCicraxWAR3SSCiFoy0BUvOOaU8B5gLXeM8ORWkpVq5RufYsSbKtEJ9iSrE7d4JzbHVLYm3TcaUW5UhX7A9nnTNA |
| CODEN | IEEPAD |
| ContentType | Conference Proceeding |
| DBID | 6IE 6IL CBEJK RIE RIL |
| DOI | 10.1109/QRS54544.2021.00063 |
| DatabaseName | IEEE Electronic Library (IEL) Conference Proceedings IEEE Xplore POP ALL IEEE Xplore All Conference Proceedings IEEE Electronic Library (IEL) IEEE Proceedings Order Plans (POP All) 1998-Present |
| DatabaseTitleList | |
| Database_xml | – sequence: 1 dbid: RIE name: IEEE Electronic Library (IEL) url: https://proxy.k.utb.cz/login?url=https://ieeexplore.ieee.org/ sourceTypes: Publisher |
| DeliveryMethod | fulltext_linktorsrc |
| EISBN | 9781665458139 1665458135 |
| EISSN | 2693-9177 |
| EndPage | 533 |
| ExternalDocumentID | 9724778 |
| Genre | orig-research |
| GrantInformation_xml | – fundername: Natural Sciences and Engineering Research Council of Canada funderid: 10.13039/501100000038 |
| GroupedDBID | 6IE 6IF 6IL 6IN AAWTH ABLEC ADZIZ ALMA_UNASSIGNED_HOLDINGS BEFXN BFFAM BGNUA BKEBE BPEOZ CBEJK CHZPO IEGSK OCL RIE RIL |
| ID | FETCH-LOGICAL-i203t-e68dd700f11e625552b30584c494201b300ddff3a412d227b779bfb160db75c53 |
| IEDL.DBID | RIE |
| IngestDate | Wed Aug 27 02:32:55 EDT 2025 |
| IsPeerReviewed | false |
| IsScholarly | false |
| Language | English |
| LinkModel | DirectLink |
| MergedId | FETCHMERGED-LOGICAL-i203t-e68dd700f11e625552b30584c494201b300ddff3a412d227b779bfb160db75c53 |
| PageCount | 10 |
| ParticipantIDs | ieee_primary_9724778 |
| PublicationCentury | 2000 |
| PublicationDate | 2021-Dec. |
| PublicationDateYYYYMMDD | 2021-12-01 |
| PublicationDate_xml | – month: 12 year: 2021 text: 2021-Dec. |
| PublicationDecade | 2020 |
| PublicationTitle | IEEE International Conference on Software Quality, Reliability and Security (Online) |
| PublicationTitleAbbrev | QRS |
| PublicationYear | 2021 |
| Publisher | IEEE |
| Publisher_xml | – name: IEEE |
| SSID | ssj0003204011 |
| Score | 1.7808715 |
| Snippet | A number of authors hypothesize and experimentally confirm that Cyclomatic Complexity (CC) has a very strong correlation with Lines of Code (LOC), justifying... |
| SourceID | ieee |
| SourceType | Publisher |
| StartPage | 524 |
| SubjectTerms | Code Complexity Codes Correlation Cyclomatic Complexity Industries Lines of Code Measurement Production Production Code Software metrics Software quality Spearman Correlation Test Code |
| Title | Predictors of Software Metric Correlation: A Non-parametric Analysis |
| URI | https://ieeexplore.ieee.org/document/9724778 |
| hasFullText | 1 |
| inHoldings | 1 |
| isFullTextHit | |
| isPrint | |
| link | http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwjV1NS8MwGA7bTp5UNvGbHDzaLknzVW8yHUPYmM7BbiOfIGIro0Pw15u020Tx4K1pD0maj-fNm_d9HgCuLNeGIs-SyH2VUI7iPkjCwVU5oVRkfJMxUXg84aM5fViwRQtc73JhnHN18JlL42N9l29Ls46usn4uCBVCtkFbSN7kau38KRkJ0xHjDbEQRnn_8WkWzAMaHScEpzUY_5BQqRFkuA_G27qbwJHXdF3p1Hz-omX8b-MOQO87Vw9Odyh0CFqu6IK76SpewEQlHVh6OAt77YdaOTiO-lkGDqIkRxMEdwNv4aQskkgB_tZ83fKU9MB8eP88GCUbvYTkhaCsShyX1gqEPMYuHGsYIzqsZkkNzWnA-VBA1nqfKYqJJURoIXLtNebIasEMy45ApygLdwwgV54wlUmHhQ4mlsqNzqXOieLIBRvSnIBu_APL94YSY7np_Onfr8_AXhyDJgrkHHSq1dpdBCyv9GU9iF_diZ1c |
| linkProvider | IEEE |
| linkToHtml | http://utb.summon.serialssolutions.com/2.0.0/link/0/eLvHCXMwjV27TsMwFLVKGWAC1CLeeGAkqe3YccyGClWBpiq0ldgqvyIhRIKqVEh8PXbSFoEY2OJksB0_zvX1vecAcGFipSnKWOC5rwIaI78PEndwlZZL6RnfEp8onA7j_pTeP7PnBrhc58JYa6vgMxv6x-ou3xR64V1lHcEJ5TzZAJuMUsrqbK21RyUibkJivKQWwkh0Hp_GzkCg3nVCcFjB8Q8RlQpDejsgXdVeh468hotShfrzFzHjf5u3C9rf2XpwtMahPdCweQvcjOb-CsZr6cAig2O3237IuYWpV9DSsOtFOeowuCt4DYdFHngS8Lf664qppA2mvdtJtx8sFROCF4KiMrBxYgxHKMPYuoMNY0S59ZxQTQV1SO8KyJgsiyTFxBDCFedCZQrHyCjONIv2QTMvcnsAYCwzwmSUWMyVM7Kk0EokShAZI-usSH0IWv4PzN5rUozZsvNHf78-B1v9STqYDe6GD8dg249HHRNyAprlfGFPHbKX6qwa0C9OUKCp |
| openUrl | ctx_ver=Z39.88-2004&ctx_enc=info%3Aofi%2Fenc%3AUTF-8&rfr_id=info%3Asid%2Fsummon.serialssolutions.com&rft_val_fmt=info%3Aofi%2Ffmt%3Akev%3Amtx%3Abook&rft.genre=proceeding&rft.title=IEEE+International+Conference+on+Software+Quality%2C+Reliability+and+Security+%28Online%29&rft.atitle=Predictors+of+Software+Metric+Correlation%3A+A+Non-parametric+Analysis&rft.au=Afriyie%2C+Daniel&rft.au=Labiche%2C+Yvan&rft.date=2021-12-01&rft.pub=IEEE&rft.eissn=2693-9177&rft.spage=524&rft.epage=533&rft_id=info:doi/10.1109%2FQRS54544.2021.00063&rft.externalDocID=9724778 |