facebook / mariana-trench
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,250 units with 13,423 lines of code in units (56.0% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (185 lines of code)
    • 32 medium complex units (1,927 lines of code)
    • 74 simple units (2,287 lines of code)
    • 1,142 very simple units (9,024 lines of code)
0% | 1% | 14% | 17% | 67%
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
cpp0% | 1% | 17% | 18% | 61%
py0% | 0% | 8% | 10% | 81%
h0% | 0% | 0% | 11% | 88%
java0% | 0% | 0% | 20% | 80%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 1% | 13% | 17% | 66%
source/model-generator0% | 0% | 23% | 15% | 61%
shim0% | 0% | 17% | 15% | 67%
scripts0% | 0% | 0% | 6% | 93%
desugar/com/facebook/marianatrench0% | 0% | 0% | 20% | 80%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
142 37 0
43 31 1
93 25 2
121 24 2
129 23 3
58 21 0
129 20 6
87 18 10
50 18 2
79 18 0
66 17 4
21 17 1
61 17 4
19 16 1
35 16 1
58 16 1
60 15 1
58 14 1
83 13 2
9 13 0
13 13 1
47 13 1
48 12 5
52 12 1
45 12 1
53 12 2
28 12 2
47 11 4
43 11 1
55 11 2
103 11 1
47 11 6
79 11 2
51 11 1
70 10 7
49 10 3
24 10 1
23 10 1
33 10 2
46 10 1
30 10 3
37 9 2
28 9 3
65 9 7
42 9 2
32 9 1
28 9 2
36 9 3
68 8 4
29 8 1