microsoft / bond
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 2,852 units with 19,605 lines of code in units (47.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 32 medium complex units (1,432 lines of code)
    • 54 simple units (1,775 lines of code)
    • 2,766 very simple units (16,398 lines of code)
0% | 0% | 7% | 9% | 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
cs0% | 0% | 7% | 16% | 75%
h0% | 0% | 8% | 5% | 85%
java0% | 0% | 6% | 3% | 90%
py0% | 0% | 0% | 34% | 65%
groovy0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
cs/src0% | 0% | 7% | 16% | 75%
cpp/inc0% | 0% | 9% | 5% | 85%
java/core0% | 0% | 5% | 2% | 91%
java/compat0% | 0% | 100% | 0% | 0%
java/json0% | 0% | 0% | 12% | 87%
compiler/extra0% | 0% | 0% | 58% | 41%
tools/ci-scripts0% | 0% | 0% | 23% | 76%
python/inc0% | 0% | 0% | 0% | 100%
java/gradle-plugin0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
50 25 1
static Variant GetDefaultValue()
in cs/src/core/Schema.cs
49 25 1
public void skip()
in java/core/src/main/java/org/bondlib/SimpleBinaryReader.java
79 23 2
bool OmittedField()
in cpp/inc/bond/protocol/simple_json_writer.h
52 20 3
void SkipType()
in cpp/inc/bond/protocol/compact_binary.h
43 19 2
void SkipType()
in cpp/inc/bond/protocol/fast_binary.h
47 19 2
inline void SimpleBinaryWriter::WriteFieldOmitted()
in cpp/inc/bond/protocol/simple_binary_impl.h
57 18 3
public void Skip()
in cs/src/core/protocols/CompactBinary.cs
48 18 1
public void Skip()
in cs/src/core/protocols/FastBinary.cs
48 18 1
public void skip()
in java/core/src/main/java/org/bondlib/CompactBinaryReader.java
45 18 1
public void skip()
in java/core/src/main/java/org/bondlib/FastBinaryReader.java
41 18 1
public void writeFieldOmitted()
in java/core/src/main/java/org/bondlib/SimpleBinaryWriter.java
55 18 3
public void WriteFieldOmitted()
in cs/src/core/protocols/SimpleBinary.cs
54 17 3
private void initializeSchemaVariantWithDefaultValue()
in java/core/src/main/java/org/bondlib/StructBondType.java
40 17 2
bool IsMatching()
in cpp/inc/bond/core/detail/typeid_value.h
35 14 1
inline bool BasicTypeField()
in cpp/inc/bond/core/detail/typeid_value.h
35 14 5
inline void BasicTypeContainer()
in cpp/inc/bond/core/detail/typeid_value.h
36 14 4
inline MapByKey()
in cpp/inc/bond/core/detail/typeid_value.h
35 14 5
inline void MapByElement()
in cpp/inc/bond/core/detail/typeid_value.h
35 14 5
inline bool ValidateType()
in cpp/inc/bond/core/detail/validate.h
37 14 2