facebook / nailgun
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 330 units with 2,921 lines of code in units (75.4% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (188 lines of code)
    • 6 medium complex units (367 lines of code)
    • 17 simple units (457 lines of code)
    • 306 very simple units (1,909 lines of code)
0% | 6% | 12% | 15% | 65%
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
c0% | 38% | 0% | 16% | 44%
java0% | 0% | 14% | 10% | 75%
py0% | 0% | 18% | 32% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
nailgun-client/c0% | 38% | 0% | 16% | 44%
nailgun-server/src/main/java/com/facebook/nailgun0% | 0% | 14% | 11% | 74%
nailgun-client/py0% | 0% | 18% | 32% | 49%
nailgun-server/src/main/java/com/facebook/nailgun/builtins0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
188 44 3
36 17 1
91 16 2
73 15 0
63 12 0
42 12 1
62 11 3
24 10 1
34 8 2
26 8 3
34 8 3
30 8 1
34 7 6
33 7 0
47 7 0
19 6 2
12 6 2
16 6 1
16 6 3
17 6 1
21 6 1
30 6 3
41 6 3
23 6 0
9 5 2
15 5 1
28 5 0
27 5 0
21 5 3
29 5 0
20 5 3
16 5 0
26 5 1
23 5 1
29 5 0
10 4 1
13 4 2
14 4 3
19 4 1
12 4 1
11 4 0
8 4 3
6 4 0
10 4 0
13 4 1
21 4 1
22 4 0
22 4 1
15 4 1
19 4 0