Journal of Software Engineering and Applications

Volume 2, Issue 3 (October 2009)

ISSN Print: 1945-3116   ISSN Online: 1945-3124

Google-based Impact Factor: 1.22  Citations  h5-index & Ranking

Cyclomatic Complexity and Lines of Code: Empirical Evidence of a Stable Linear Relationship

HTML  Download Download as PDF (Size: 160KB)  PP. 137-143  
DOI: 10.4236/jsea.2009.23020    14,241 Downloads   30,163 Views  Citations

Affiliation(s)

.

ABSTRACT

Researchers have often commented on the high correlation between McCabe’s Cyclomatic Complexity (CC) and lines of code (LOC). Many have believed this correlation high enough to justify adjusting CC by LOC or even substituting LOC for CC. However, from an empirical standpoint the relationship of CC to LOC is still an open one. We undertake the largest statistical study of this relationship to date. Employing modern regression techniques, we find the linearity of this relationship has been severely underestimated, so much so that CC can be said to have absolutely no explana-tory power of its own. This research presents evidence that LOC and CC have a stable practically perfect linear rela-tionship that holds across programmers, languages, code paradigms (procedural versus object-oriented), and software processes. Linear models are developed relating LOC and CC. These models are verified against over 1.2 million randomly selected source files from the SourceForge code repository. These files represent software projects from three target languages (C, C++, and Java) and a variety of programmer experience levels, software architectures, and de-velopment methodologies. The models developed are found to successfully predict roughly 90% of CC’s variance by LOC alone. This suggest not only that the linear relationship between LOC and CC is stable, but the aspects of code complexity that CC measures, such as the size of the test case space, grow linearly with source code size across lan-guages and programming paradigms.

Share and Cite:

G. JAY, J. HALE, R. SMITH, D. HALE, N. KRAFT and C. WARD, "Cyclomatic Complexity and Lines of Code: Empirical Evidence of a Stable Linear Relationship," Journal of Software Engineering and Applications, Vol. 2 No. 3, 2009, pp. 137-143. doi: 10.4236/jsea.2009.23020.

Cited by

[1] How Does Test-Driven Development Affect the Quality of Developed Software?
[2] SSPCATCHER: Learning to catch security patches
Empirical Software …, 2022
[3] Cognitive Complexity Reduction through Control Flow Graph Generation
2022 IEEE 7th International …, 2022
[4] SysRepoAnalysis: A tool to analyze and identify critical areas of source code repositories
Proceedings of the XXXVI …, 2022
[5] Prioritization of god class design smell: A multi-criteria based approach
Journal of King Saud …, 2022
[6] Avaliação de custo de construção de software com uso de distintos BaaS
2022
[7] Fault-Detection Tactics for Optimized Embedded Systems Efficiency
IEEE Access, 2021
[8] Predictors of Software Metric Correlation: A Non-parametric Analysis
2021 IEEE 21st International Conference …, 2021
[9] Technical decision-making in startups and its impact on growth and technical debt
2021
[10] Concurrency in Android development–Kotlin Coroutines and RxJava
2021
[11] Intelligent Agents are More Complex: Initial Empirical Findings
Artificial Intelligence Methods For …, 2021
[12] Software Complexity Reduction through the Process Automation in Software Development Life Cycle
2021 Fourth International …, 2021
[13] Clustering of programming exercises for efficient reviewing and exploration
2021
[14] BIM Visual Programming Tools Applications in Infrastructure Projects: A State-of-the-Art Review
Galant, JA Lozano-Galant… - Applied Sciences, 2021
[15] An Empirical Comparison Between Tutorials and Crowd Documentation of Application Programming Interface
Journal of Computer Science …, 2021
[16] An exploration of the test prioritization process on large software projects with no requirement specification
2020
[17] REDUCING STRUCTURAL AMBIGUITY IN NATURAL LANGUAGE SOFTWARE REQUIREMENTS SPECIFICATIONS
2020
[18] An Empirical Study Investigating the Predictors of Software Metric Correlation in Application Code and Test Code.
2020
[19] A Tool-Based Perspective on Software Code Maintainability Metrics: A Systematic Literature Review
2020
[20] Development of an Enhanced Automated Software Complexity Measurement System
2020
[21] Toward Data-Driven Discovery of Software Vulnerabilities
2020
[22] Learning to Catch Security Patches
2020
[23] Atoms of Confusion: Misunderstanding of Obfuscated Source Code
2020
[24] Toward Automated Vehicle Teleoperation: Vision, Opportunities, and Challenges
2020
[25] VComputeLib: Enabling Cross-Platform GPGPU on Mobile and Embedded GPUs
2019
[26] Manutenibilità del codice sorgente scritto in Rust
2019
[27] New Metrics for Predicting the Reliability of Individual Component Based on Software Design Metrics
2019
[28] Software Reliability: A Must
2019
[29] Comparing the Performance of String Operations Across Programming Languages
2019
[30] Hybrid Technique for Complexity Analysis for Java Code
2019
[31] Effects of measurements on correlations of software code metrics
2019
[32] Investigating Evolution in Open Source Software
2019
[33] Team Topologies: Organizing Business and Technology Teams for Fast Flow
2019
[34] A User Feedback Centric Approach for Detecting and Mitigating God Class Code Smell Using Frequent Usage Patterns
2019
[35] Large-Scale Empirical Study of Important Features Indicative of Discovered Vulnerabilities to Assess Application Security
2019
[36] PRIKUPLJANJE I PRIKAZ PODATAKA O IZVRŠAVANJU PROGRAMA
2019
[37] Examining Software Design Projects in a First-Year Engineering Course:: The Impact of the Project Type on Programming Complexity and Programming
2018
[38] Designing ANFIS Model to Predict the Reliability of Component-Based System
Soft Computing: Theories and Applications, 2018
[39] A Decision Tree Approach to Identify the Factors Affecting Reliability for Component-Based System
Smart Computing and Informatics, 2018
[40] Using code quality features to predict bugs in procedural software systems
SBES 2018 Proceedings of the XXXII Brazilian Symposium on Software Engineering, 2018
[41] Prevalence of confusing code in software projects: atoms of confusion in the wild
MSR 2018 Proceedings of the 15th International Conference on Mining Software Repositories, 2018
[42] Code Complexity Management for Practitioners
2018
[43] PERFORMANCE EVALUATION OF IMPROVED COGNITIVE COMPLEXITY METRIC AND OTHER CODE BASED COMPLEXITY METRICS
2018
[44] Prevalence of Confusing Code in Sotware Projects
2018
[45] An Empirical Comparison between API Tutorials and API Crowd Documentation
2018
[46] Linear Prediction Model for Effort in Programming based on User Acceptance and Revised use Case Point Method
International Journal of Advanced …, 2017
[47] Code smells for Model-View-Controller architectures
Empirical Software Engineering, 2017
[48] Proactive Software Complexity Assessment
2017
[49] Evaluating code complexity triggers, use of complexity measures and the influence of code complexity on maintenance time
Empirical Software Engineering, 2017
[50] An Empirical Study on the Effect of Testing on Code Quality using Topic Models: A Case Study on Software Development Systems
IEEE TRANSACTIONS ON RELIABILITY, 2017
[51] On the Effectiveness of Bug Predictors with Procedural Systems: A Quantitative Study
Fundamental Approaches to Software Engineering, 2017
[52] An Assessment Framework of Routing Complexities using LOC Metrics
2017
[53] Comparison of IDE extracted effort versus static metrics for assessing software maintainability
Thesis, 2017
[54] Network Security Metrics: Estimating the Resilience of Networks Against Zero Day Attacks
2017
[55] Agents are More Complex than Other Software: An Empirical Investigation
2017
[56] Correlations of software code metrics: an empirical study
IWSM Mensura 2017 Proceedings of the 27th International Workshop on Software Measurement and 12th International Conference on Software Process and Product Measurement, 2017
[57] Conception des systèmes embarqués: applications, algorithmes et architectures
Electronique. Université Bretagne Sud; Université Bretagne Loire, 2016
[58] Qualitative and Quantitative Assessment of Integration Testing for Model-Based Software in the Automotive Industry
2016
[59] Transaction-Aware Aspects with TransJ: An Initial Empirical Study to Demonstrate Improvement in Reusability
2016
[60] Software Complexity Prediction by Using Basic Attributes
International Journal of Advanced Engineering Research and Science, 2016
[61] Topic-based software defect explanation
Journal of Systems and Software, 2016
[62] Validating software measures using action research a method and industrial experiences
Proceedings of the 20th International Conference on Evaluation and Assessment in Software Engineering, 2016
[63] The European Atlas of Forest Tree Species: modelling, data and information on forest tree species
2016
[64] Unveiling anomalies and their impact on software quality in model-based automotive software revisions with software metrics and domain experts
ISSTA 2016 Proceedings of the 25th International Symposium on Software Testing and Analysis, 2016
[65] Validating Software Measures Using Action Research
2016
[66] Comparing strategies to construct local disaster recovery networks
2016
[67] An Accumulated Cognitive Approach to Measure Software Complexity
2015
[68] Análise de complexidade de programas em ferramentas de apoio à decisão
2015
[69] Evaluating and Mitigating the Impact of Complexity in Software Models
2015
[70] EVALUATING TESTING EFFORT AND ITS CORRELATION TO CYCLOMACTIC COMPLEXITY AND CODE COVERAGE
2015
[71] Comparing the applicability of complexity measurements for simulink models during integration testing: an industrial case study
Proceedings of the Second International Workshop on Software Architecture and Metrics, 2015
[72] Using C Language Extensions for Developing Embedded Software: A Case Study
Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2015
[73] VCCFinder: Finding Potential Vulnerabilities in Open-Source Projects to Assist Code Audits
Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security, 2015
[74] Towards Improving Software Security using Language Engineering and mbeddr C
2015
[75] Empirical analysis of the relationship between CC and SLOC in a large corpus of Java methods and C functions
Journal of Software: Evolution and Process, 2015
[76] Evaluating the authoring complexity of interactive narratives with interactive behaviour trees
Foundations of Digital Games, 2015
[77] FAA RESEARCH PROJECT ON SYSTEM COMPLEXITY EFFECTS ON AIRCRAFT SAFETY: CANDIDATE COMPLEXITY METRICS
2015
[78] Automated analysis of software artefacts-a use case in e-assessment
Dissertation, 2015
[79] Software Development Method for Improving Maintainability Using Code Generation
2015
[80] Polymorphism in the Spotlight: How Developers Use it in Practice.
2014
[81] Identifying Risky Areas of Software Code in Agile/Lean Software Development: A Method and its Industrial Evaluation
Conference Paper, 2014
[82] A COMPARATIVE STUDY OF SOFTWARE COMPLEXITY METRIC
Engineering Sciences International Research Journal, 2014
[83] Automação da análise de qualidade de código
2014
[84] Identifying risky areas of software code in Agile/Lean software development: An industrial experience report
Software Maintenance, Reengineering and Reverse Engineering (CSMR-WCRE), 2014 Software Evolution Week-IEEE Conference on. IEEE, 2014
[85] Empowering Technical Risk Assessment in Software Development
2014
[86] A survey on impact of lines of code on software complexity
Advances in Engineering and Technology Research (ICAETR), 2014 International Conference on, 2014
[87] Meteor framework, a new approach to webdevelopment: an experimental analysis
2014
[88] Empirical analysis of the relationship between CC and SLOC in a large corpus of Java methods
D Landman, A Serebrenik, J Vinju - homepages.cwi.nl, 2014
[89] A framework for improving the concept of Cyclomatic complexity in object-oriented programming
VKG Bhalla - dspace.thapar.edu, 2014
[90] Improving Software Security using Language Engineering and mbeddr C
2014
[91] The relationship between CC and SLOC: a preliminary analysis on its evolution
2014
[92] The Modularity of the Resource Utilization Model in Python
2014
[93] Monitoring Evolution of Code Complexity in Agile/Lean Software Development
2013
[94] Factors Affecting the Design and Use of Reusable Components
2013
[95] An empirical evaluation of mutation testing for improving the test quality of safety-critical software
Software Engineering, IEEE Transactions on, 2013
[96] A Comparison of Five Programming Languages in a Graph Clustering Scenario.
J. UCS, 2013
[97] Supporting Concurrency Abstractions in High-level Language Virtual Machines
2013
[98] A Conceptual Approach for Assessing SOA Design Defects' Impact on Quality Attributes
Distributed Computing and Applications to Business, Engineering & Science (DCABES), 2013 12th International Symposium on. IEEE, 2013
[99] Measuring Source Code Quality Of Multi-Language Software Systems
2013
[100] A Study in Determining Complexity
J Brood - pure.ltu.se, 2013
[101] En studie i att bestämma komplexitet: Att visa och exponera relationer mellan objekt i en topologi
Thesis, 2013
[102] A comparison of five programming languages in a graph clustering scenario
2013
[103] Cyclomatic Complexity for WCF: A Service Oriented Architecture
Frontiers of Information Technology (FIT), 2012 10th International Conference on. IEEE, 2012
[104] Who? where? what? examining distributed development in two large open source projects
Mining Software Repositories (MSR), 2012 9th IEEE Working Conference on. IEEE, 2012
[105] Understanding structural complexity evolution: a quantitative analysis
Software Maintenance and Reengineering (CSMR), 2012 16th European Conference on. IEEE, 2012
[106] Analyzing measurements of the R statistical open source software
Software Engineering Workshop (SEW), 2012 35th Annual IEEE, 2012
[107] (S)LOC Count Evolution for Selected OSS Projects
2009
[108] Analysis of Cognitive Complexity with Cyclomatic Complexity Metric of Software
[109] An Empirical Study of the Extent and Causes of Technical Debt in Public Organizations Software Systems
[110] Improving code smell predictions in continuous integration by differentiating organic from cumulative measures
[111] Code Context Based Generation of Refactoring Guidance

Copyright © 2024 by authors and Scientific Research Publishing Inc.

Creative Commons License

This work and the related PDF file are licensed under a Creative Commons Attribution 4.0 International License.