microsoft / CDM
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 7,067 units with 81,398 lines of code in units (74.2% of code).
    • 7 very complex units (1,183 lines of code)
    • 84 complex units (7,699 lines of code)
    • 364 medium complex units (18,659 lines of code)
    • 580 simple units (14,208 lines of code)
    • 6,032 very simple units (39,649 lines of code)
1% | 9% | 22% | 17% | 48%
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
cs2% | 9% | 24% | 17% | 45%
java<1% | 9% | 19% | 14% | 55%
py1% | 8% | 22% | 20% | 46%
ts<1% | 9% | 25% | 18% | 45%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
CSharp/Microsoft.CommonDataModel.ObjectModel3% | 10% | 24% | 17% | 44%
Java/objectmodel<1% | 9% | 19% | 14% | 55%
Python/cdm1% | 8% | 22% | 20% | 46%
TypeScript/ResolvedModel3% | 10% | 28% | 14% | 42%
TypeScript/Cdm0% | 12% | 21% | 19% | 46%
TypeScript/Persistence0% | 6% | 38% | 23% | 31%
TypeScript/Utilities0% | 8% | 29% | 4% | 57%
TypeScript/Storage0% | 0% | 7% | 24% | 68%
CSharp/Microsoft.CommonDataModel.ObjectModel.Telemetry0% | 0% | 29% | 6% | 64%
CSharp/Microsoft.CommonDataModel.ObjectModel.Adapter.Syms0% | 0% | 24% | 19% | 56%
TypeScript/Enums0% | 0% | 79% | 0% | 20%
CSharp/Microsoft.CommonDataModel.ObjectModel.Adapter.Adls0% | 0% | 0% | 40% | 59%
TypeScript0% | 0% | 0% | 0% | 100%
Python0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public async Task CreateResolvedEntityAsync()
in objectModel/CSharp/Microsoft.CommonDataModel.ObjectModel/Cdm/CdmEntityDefinition.cs
386 73 4
def _get_applier_generated_attributes()
in objectModel/Python/cdm/resolvedmodel/resolved_attribute_set_builder.py
104 71 4
public static evaluateExpressionTree()
in objectModel/TypeScript/ResolvedModel/ExpressionParser/ExpressionTree.ts
81 70 2
internal CdmObjectBase ResolveSymbolReference()
in objectModel/CSharp/Microsoft.CommonDataModel.ObjectModel/Cdm/CdmCorpusDefinition.cs
236 67 5
public CdmObjectBase resolveSymbolReference()
in objectModel/Java/objectmodel/src/main/java/com/microsoft/commondatamodel/objectmodel/cdm/CdmCorpusDefinition.java
217 67 5
def _evaluate_expression_tree()
in objectModel/Python/cdm/resolvedmodel/expression_parser/expression_tree.py
71 56 2
internal static dynamic EvaluateExpressionTree()
in objectModel/CSharp/Microsoft.CommonDataModel.ObjectModel/ResolvedModel/ExpressionParser/ExpressionTree.cs
88 51 2
public static Object evaluateExpressionTree()
in objectModel/Java/objectmodel/src/main/java/com/microsoft/commondatamodel/objectmodel/resolvedmodel/expressionparser/ExpressionTree.java
77 48 2
public T MakeObject()
in objectModel/CSharp/Microsoft.CommonDataModel.ObjectModel/Cdm/CdmCorpusDefinition.cs
141 45 3
public T makeObject()
in objectModel/Java/objectmodel/src/main/java/com/microsoft/commondatamodel/objectmodel/cdm/CdmCorpusDefinition.java
141 45 3
public MakeObject()
in objectModel/TypeScript/Cdm/CdmCorpusDefinition.ts
143 45 3
private List GetApplierGeneratedAttributes()
in objectModel/CSharp/Microsoft.CommonDataModel.ObjectModel/ResolvedModel/ResolvedAttributeSetBuilder.cs
173 44 3
def _prune_to_scope()
in objectModel/Python/cdm/objectmodel/cdm_attribute_context.py
68 44 2
private reportErrorStatus()
in objectModel/TypeScript/Cdm/CdmCorpusDefinition.ts
127 43 3
def _combine_resolution_guidance()
in objectModel/Python/cdm/objectmodel/cdm_attribute_resolution_guidance_def.py
99 42 2
def _finalize_attribute_context()
in objectModel/Python/cdm/objectmodel/cdm_attribute_context.py
53 41 7
public static fromObject()
in objectModel/TypeScript/Persistence/CdmFolder/ManifestPersistence.ts
116 41 5
public ResolvedAttributeSetBuilder constructResolvedAttributes()
in objectModel/Java/objectmodel/src/main/java/com/microsoft/commondatamodel/objectmodel/cdm/CdmEntityAttributeDefinition.java
165 39 2
String traitsToDataFormat()
in objectModel/Java/objectmodel/src/main/java/com/microsoft/commondatamodel/objectmodel/utilities/TraitToPropertyMap.java
104 39 1
def _update_attribute_defaults()
in objectModel/Python/cdm/objectmodel/cdm_attribute_resolution_guidance_def.py
62 38 3