Linux / Drivers / Nfc
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 657 units with 14,135 lines of code in units (74.7% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (266 lines of code)
    • 40 medium complex units (2,547 lines of code)
    • 118 simple units (4,303 lines of code)
    • 497 very simple units (7,019 lines of code)
0% | 1% | 18% | 30% | 49%
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% | 1% | 18% | 30% | 49%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 5% | 23% | 21% | 50%
st21nfca0% | 6% | 16% | 24% | 52%
pn5330% | 0% | 18% | 32% | 48%
pn5440% | 0% | 34% | 27% | 38%
st95hf0% | 0% | 28% | 36% | 35%
nfcmrvl0% | 0% | 12% | 34% | 53%
microread0% | 0% | 19% | 35% | 45%
st-nci0% | 0% | 7% | 28% | 63%
nxp-nci0% | 0% | 17% | 28% | 53%
fdp0% | 0% | 7% | 54% | 38%
s3fwrn50% | 0% | 0% | 42% | 57%
Most Complex Units
Top 50 most complex units
Unit# linesMcCabe index# params
138 36 2
128 27 3
62 22 2
130 22 1
90 22 3
104 21 1
93 20 3
108 20 2
84 18 2
106 17 2
45 17 1
60 17 3
55 16 2
50 16 2
56 16 3
82 16 3
35 15 1
80 14 5
100 14 1
61 13 2
45 13 3
50 13 3
116 13 1
61 13 4
48 13 1
57 13 1
41 12 2
48 12 2
56 12 1
32 12 1
58 12 1
62 12 5
51 12 5
61 11 5
39 11 2
35 11 2
51 11 3
50 11 1
48 11 1
49 11 1
60 11 2
28 11 3
41 10 2
46 10 3
70 10 3
40 10 3
53 10 5
43 10 2
45 10 3
64 10 2