microsoft / botframework-cli
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,728 units with 47,672 lines of code in units (70.6% of code).
    • 3 very complex units (1,200 lines of code)
    • 25 complex units (2,674 lines of code)
    • 133 medium complex units (8,042 lines of code)
    • 254 simple units (8,447 lines of code)
    • 2,313 very simple units (27,309 lines of code)
2% | 5% | 16% | 17% | 57%
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
ts2% | 3% | 15% | 17% | 60%
js3% | 14% | 22% | 17% | 41%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/orchestratorlib4% | 8% | 20% | 15% | 51%
packages/dispatcher1% | 0% | 10% | 15% | 71%
packages/lu3% | 13% | 22% | 21% | 39%
packages/dialog0% | 11% | 37% | 16% | 35%
packages/chatdown0% | 26% | 23% | 13% | 36%
packages/qnamaker0% | 9% | 14% | 26% | 49%
packages/luis0% | 9% | 12% | 28% | 49%
packages/lg0% | 13% | 8% | 35% | 42%
packages/command0% | 18% | 0% | 16% | 65%
packages/orchestrator0% | 0% | 69% | 20% | 9%
common/scripts0% | 0% | 0% | 31% | 68%
packages/plugins0% | 0% | 0% | 40% | 59%
packages/config0% | 0% | 0% | 16% | 83%
packages/cli0% | 0% | 0% | 0% | 100%
common/config0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
const parseAndHandleSimpleIntentSection = function()
in packages/lu/src/parser/lufile/parseFileContents.js
295 105 3
public static aggregateBinaryConfusionMatrixArrayIntoEvaluationOutputs()
in packages/dispatcher/src/mathematics/confusion_matrix/UtilityConfusionMatrix.ts
408 59 8
497 58 4
parseAndTranslate : async function()
in packages/lu/src/parser/lufile/translate-helpers.js
200 46 2
const parseFeatureSections = function()
in packages/lu/src/parser/lufile/parseFileContents.js
93 43 3
async run()
in packages/luis/src/commands/luis/build.ts
112 43 0
const parseAndHandleModelInfoSection = function()
in packages/lu/src/parser/lufile/parseFileContents.js
149 42 4
async run()
in packages/qnamaker/src/commands/qnamaker/build.ts
114 42 0
public static utteranceLabelsToJsonString()
in packages/orchestratorlib/src/labelresolver.ts
178 38 1
const resolveQuestionRef = function()
in packages/lu/src/parser/lu/luMerger.js
56 37 3
public static scoreBatchObjectLabels()
in packages/orchestratorlib/src/utilitylabelresolver.ts
209 36 4
async function readCommandsFromAggregate()
in packages/chatdown/utils/index.js
104 33 2
const parseAndHandleEntitySection = function()
in packages/lu/src/parser/lufile/parseFileContents.js
110 33 5
private verifySchema()
in packages/dialog/src/library/schemaMerger.ts
91 32 1
const validateBoundaries = function()
in packages/lu/src/parser/luis/luisValidator.js
105 31 1
public static scoreObjectLabels()
in packages/orchestratorlib/src/utilitylabelresolver.ts
180 31 4
const parseAndHandleEntityV2 = function()
in packages/lu/src/parser/lufile/parseFileContents.js
99 30 5
public async commandLetLoop()
in packages/orchestratorlib/src/predict.ts
78 30 0
public static scoreBatchStringLabels()
in packages/orchestratorlib/src/utilitylabelresolver.ts
196 30 4
readSync: function()
in packages/chatdown/utils/read-text-file.js
32 28 1