microsoft / TPM-2.0-Parser
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,611 units with 13,039 lines of code in units (49.5% of code).
    • 1 very complex units (176 lines of code)
    • 2 complex units (304 lines of code)
    • 11 medium complex units (658 lines of code)
    • 30 simple units (984 lines of code)
    • 1,567 very simple units (10,917 lines of code)
1% | 2% | 5% | 7% | 83%
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
cs1% | 2% | 5% | 7% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
TPM Parser/Tpm2Lib1% | 2% | 4% | 7% | 84%
TPM Parser/Controls0% | 0% | 21% | 3% | 75%
TPM Parser0% | 0% | 16% | 26% | 56%
TPM Parser/Views0% | 0% | 0% | 13% | 86%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
Type UnionElementFromSelector()
in TPM Parser/Tpm2Lib/X_TpmDefs.cs
176 99 2
private void UpdateHandleData()
in TPM Parser/Tpm2Lib/Tpm2.cs
183 31 4
public static string CleanHex()
in TPM Parser/Tpm2Lib/Tpm2.cs
121 30 1
private void AppShell_KeyDown()
in TPM Parser/AppShell.xaml.cs
40 19 2
private void CoreDispatcher_AcceleratorKeyActivated()
in TPM Parser/Controls/NavigationHelper.cs
28 19 2
public static string ToCSharpStyle()
in TPM Parser/Tpm2Lib/Globs.cs
23 17 1
public static AsymCryptoSystem CreateFrom()
in TPM Parser/Tpm2Lib/CryptoAsym.cs
92 15 2
public void PutInternal()
in TPM Parser/Tpm2Lib/Marshaller.cs
75 15 2
public static bool CrackCommand()
in TPM Parser/Tpm2Lib/Tpm2.cs
89 15 5
protected override void OnKeyDown()
in TPM Parser/Controls/NavMenuListView.cs
67 14 1
private bool VerifySignature()
in TPM Parser/Tpm2Lib/CryptoAsym.cs
55 13 4
public static SymmCipher Create()
in TPM Parser/Tpm2Lib/CryptoSymm.cs
52 11 3
public static string ParseResponse()
in TPM Parser/Tpm2Lib/Tpm2.cs
78 11 2
internal virtual void ToHost()
in TPM Parser/Tpm2Lib/TpmBaseClasses.cs
59 11 1
private void AddLine()
in TPM Parser/Tpm2Lib/SupportClasses.cs
55 10 3
public static object NetToHostValue()
in TPM Parser/Tpm2Lib/Globs.cs
37 9 2
public static object FromBytes()
in TPM Parser/Tpm2Lib/Globs.cs
37 9 2
public static int SizeOf()
in TPM Parser/Tpm2Lib/Globs.cs
21 9 1
public static bool BigEndianArraysAreEqual()
in TPM Parser/Tpm2Lib/Globs.cs
30 9 2
internal void Print()
in TPM Parser/Tpm2Lib/SupportClasses.cs
64 9 3