microsoft / landcover
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 642 units with 7,583 lines of code in units (64.3% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (148 lines of code)
    • 19 medium complex units (992 lines of code)
    • 46 simple units (1,227 lines of code)
    • 576 very simple units (5,216 lines of code)
0% | 1% | 13% | 16% | 68%
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
js0% | 3% | 15% | 19% | 61%
py0% | 0% | 10% | 10% | 79%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
web_tool/js0% | 3% | 15% | 19% | 61%
training0% | 0% | 77% | 0% | 22%
web_tool0% | 0% | 4% | 8% | 87%
training/models0% | 0% | 12% | 0% | 87%
ROOT0% | 0% | 0% | 26% | 73%
utils0% | 0% | 0% | 22% | 77%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
jscolor : function()
in web_tool/js/jscolor.js
148 26 2
value: function show()
in web_tool/js/noty.js
91 24 0
def main()
in training/train_unsupervised.py
142 20 0
43 20 3
def rolling_window()
in training/train_unsupervised.py
67 18 2
redrawPosition : function()
in web_tool/js/jscolor.js
47 18 0
_initLayout: function()
in web_tool/js/leaflet-slider.js
67 16 0
def init_weights()
in training/models/base_network.py
29 15 3
this.exportColor = function()
in web_tool/js/jscolor.js
33 14 1
this.fromRGB = function()
in web_tool/js/jscolor.js
32 14 4
this.fromString = function()
in web_tool/js/jscolor.js
42 14 2
22 14 3
24 13 0
46 13 0
def create_session()
in web_tool/SessionHandler.py
37 12 5
tryInstallOnElements : function()
in web_tool/js/jscolor.js
30 12 2
def run_large()
in web_tool/ModelSessionPyTorchCycle.py
39 11 2
80 11 0
96 11 3
25 11 3