microsoft / sarif-website
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 1,747 units with 24,794 lines of code in units (85.6% of code).
    • 4 very complex units (1,349 lines of code)
    • 9 complex units (873 lines of code)
    • 79 medium complex units (2,868 lines of code)
    • 184 simple units (4,787 lines of code)
    • 1,471 very simple units (14,917 lines of code)
5% | 3% | 11% | 19% | 60%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
js5% | 3% | 11% | 19% | 59%
cs0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/SarifWeb/wwwroot/js5% | 3% | 11% | 19% | 59%
src/SarifWeb/Services0% | 0% | 0% | 0% | 100%
src/SarifWeb/Controllers0% | 0% | 0% | 0% | 100%
src/SarifWeb0% | 0% | 0% | 0% | 100%
src/SarifWeb/Utilities0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
define()
in src/SarifWeb/wwwroot/js/ace/worker-json.js
498 153 5
function()
in src/SarifWeb/wwwroot/js/bootstrap.bundle.js
353 83 0
function()
in src/SarifWeb/wwwroot/js/bootstrap.bundle.js
256 74 0
function()
in src/SarifWeb/wwwroot/js/bootstrap.bundle.js
242 73 0
function()
in src/SarifWeb/wwwroot/js/bootstrap.bundle.js
208 47 0
function flip()
in src/SarifWeb/wwwroot/js/bootstrap.bundle.js
57 41 2
function flip()
in src/SarifWeb/wwwroot/js/esm/popper.js
57 41 2
function flip()
in src/SarifWeb/wwwroot/js/popper.js
57 41 2
function flip()
in src/SarifWeb/wwwroot/js/umd/popper.js
57 41 2
function()
in src/SarifWeb/wwwroot/js/bootstrap.bundle.js
116 32 0
function()
in src/SarifWeb/wwwroot/js/bootstrap.bundle.js
126 29 0
function()
in src/SarifWeb/wwwroot/js/bootstrap.bundle.js
140 28 0
applyMedia = function()
in src/SarifWeb/wwwroot/js/respond.js
55 27 1
exports.$detectIndentation = function()
in src/SarifWeb/wwwroot/js/ace/ext-whitespace.js
47 24 2
this.updateCompletions = function()
in src/SarifWeb/wwwroot/js/ace/ext-language_tools.js
30 20 1
this.$getDefaultValue = function()
in src/SarifWeb/wwwroot/js/ace/ext-emmet.js
37 19 2
this.$getDefaultValue = function()
in src/SarifWeb/wwwroot/js/ace/ext-language_tools.js
37 19 2
Serializer._serializeObject = function()
in src/SarifWeb/wwwroot/js/ai.0.15.0-build58334.js
65 19 2
function getBoundaries()
in src/SarifWeb/wwwroot/js/bootstrap.bundle.js
39 19 4
this.onChange = function()
in src/SarifWeb/wwwroot/js/ace/ext-emmet.js
45 18 1