facebook / infer
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,468 units with 8,856 lines of code in units (4.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 12 medium complex units (633 lines of code)
    • 24 simple units (726 lines of code)
    • 1,432 very simple units (7,497 lines of code)
0% | 0% | 7% | 8% | 84%
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
h0% | 0% | 17% | 17% | 64%
java0% | 0% | <1% | <1% | 98%
cpp0% | 0% | 0% | 35% | 64%
c0% | 0% | 0% | 0% | 100%
js0% | 0% | 0% | 0% | 100%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
facebook-clang-plugins/libtooling0% | 0% | 16% | 18% | 64%
infer/models0% | 0% | <1% | <1% | 99%
website/src0% | 0% | 0% | 0% | 100%
infer/annotations0% | 0% | 0% | 0% | 100%
infer/src0% | 0% | 0% | 0% | 100%
sledge/model0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
87 20 1
69 16 1
81 15 1
16 14 1
65 14 1
11 13 1
40 13 1
41 12 1
47 12 1
60 11 1
50 11 1
66 11 1
24 10 2
43 10 1
48 10 1
28 10 1
28 10 1
49 10 1
24 9 1
29 9 1
17 9 0
32 9 1
39 8 2
24 8 5
28 7 1
40 7 1
31 7 1
28 7 1
38 7 1
32 7 1
32 6 1
21 6 1
20 6 1
20 6 1
32 6 1
19 6 0
149 5 0
32 5 1
16 5 1
26 5 1
26 5 1
24 5 1
26 5 1
23 5 1
17 5 2
12 4 1
9 4 1
5 4 3
9 4 0
6 4 1