microsoft / BotBuilder-Samples
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,647 units with 21,526 lines of code in units (41.1% of code).
    • 0 very complex units (0 lines of code)
    • 3 complex units (298 lines of code)
    • 24 medium complex units (1,485 lines of code)
    • 99 simple units (3,139 lines of code)
    • 1,521 very simple units (16,604 lines of code)
0% | 1% | 6% | 14% | 77%
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
ts0% | 6% | 28% | 17% | 48%
js0% | 0% | 1% | 19% | 79%
cs0% | 0% | <1% | 8% | 90%
java0% | 0% | 0% | 10% | 89%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
experimental/generation0% | 11% | 23% | 24% | 40%
experimental/adaptive-tool0% | 0% | 36% | 13% | 49%
Migration/MigrationV3V40% | 0% | 2% | 10% | 86%
experimental/sso-with-skills0% | 0% | 7% | 8% | 84%
generators/generator-botbuilder0% | 0% | 3% | 11% | 84%
composer-samples/csharp_dotnetcore0% | 0% | 0% | 16% | 83%
composer-samples/javascript_nodejs0% | 0% | 0% | 27% | 72%
experimental/composer-samples0% | 0% | 0% | 17% | 82%
generators/vsix-vs-win0% | 0% | 0% | 8% | 91%
generators/java0% | 0% | 0% | 10% | 89%
generators/dotnet-templates0% | 0% | 0% | 7% | 92%
experimental/immediate-accept-adapter0% | 0% | 0% | 7% | 92%
experimental/adaptive-dialog0% | 0% | 0% | 1% | 98%
Migration/Dispatch0% | 0% | 0% | 0% | 100%
generators/python0% | 0% | 0% | 0% | 100%
experimental/adaptive-runtime-packages0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
async function processTemplate()
in experimental/generation/generator/packages/library/src/dialogGenerator.ts
135 39 9
function expandSchema()
in experimental/generation/generator/packages/library/src/dialogGenerator.ts
69 29 6
function substitutions()
in experimental/generation/generator/packages/library/src/substitutions.ts
94 28 4
export function provideCompletionItems()
in experimental/adaptive-tool/server/lg/src/providers/completion.ts
101 25 2
function processSuggestions()
in experimental/adaptive-tool/server/lu/src/providers/completion.ts
115 20 3
function parseLGTemplate()
in experimental/generation/generator/packages/library/src/mergeAssets.ts
50 20 7
export async function updateDiagnostics()
in experimental/adaptive-tool/server/lg/src/providers/diagnostics.ts
99 19 2
async function processTemplates()
in experimental/generation/generator/packages/library/src/dialogGenerator.ts
73 19 8
async function findTemplate()
in experimental/generation/generator/packages/library/src/dialogGenerator.ts
62 18 2
async function mergeRootLGFile()
in experimental/generation/generator/packages/library/src/mergeAssets.ts
59 18 10
export async function generateTest()
in experimental/generation/generator/packages/library/src/testGenerator.ts
81 17 5
async function ensureEntitiesAndTemplates()
in experimental/generation/generator/packages/library/src/dialogGenerator.ts
42 15 4
function promoteItems()
in experimental/generation/generator/packages/library/src/processSchemas.ts
21 15 1
await walkJSON()
in experimental/generation/generator/packages/library/src/dialogGenerator.ts
26 14 4
async function changeEntityEnumLG()
in experimental/generation/generator/packages/library/src/mergeAssets.ts
62 14 7
export async function swaggerGenerate()
in experimental/generation/generator/packages/library/src/swaggerDialogGenerator.ts
65 14 6
_verifyNoPromptOptions()
in generators/generator-botbuilder/generators/app/index.js
30 14 0
export function provideCompletionItems()
in experimental/adaptive-tool/server/qna/src/providers/completion.ts
117 13 2
protected override async Task OnBeginDialogAsync()
in experimental/sso-with-skills/RootBot/Dialogs/MainDialog.cs
25 13 3
protected override async Task OnBeginDialogAsync()
in experimental/sso-with-skills/SkillBot/Dialogs/MainDialog.cs
28 13 3