microsoft / botframework-solutions
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 496 units with 7,252 lines of code in units (40.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 18 medium complex units (973 lines of code)
    • 54 simple units (1,965 lines of code)
    • 424 very simple units (4,314 lines of code)
0% | 0% | 13% | 27% | 59%
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% | 0% | 17% | 26% | 56%
cs0% | 0% | 11% | 24% | 63%
js0% | 0% | 0% | 45% | 54%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
tools/botskills/src0% | 0% | 24% | 17% | 58%
sdk/csharp/libraries0% | 0% | 15% | 23% | 61%
sdk/typescript/libraries0% | 0% | 14% | 32% | 52%
templates/typescript/generator-bot-virtualassistant0% | 0% | 8% | 33% | 57%
templates/csharp/VA0% | 0% | 14% | 26% | 58%
templates/csharp/Skill0% | 0% | 0% | 25% | 74%
tools/scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private async getExecutionModel()
in tools/botskills/src/functionality/connectSkill.ts
96 24 4
private async interruptDialog()
in templates/typescript/generator-bot-virtualassistant/generators/app/templates/sample-assistant/src/dialogs/mainDialog.ts
80 21 1
export function manifestV2Validation()
in tools/botskills/src/utils/validationUtils.ts
34 21 3
private async Task InterruptDialogAsync()
in templates/csharp/VA/VA/Dialogs/MainDialog.cs
95 20 2
public async onTurn()
in sdk/typescript/libraries/bot-solutions/src/middleware/eventDebuggerMiddleware.ts
31 17 2
public async authenticate()
in tools/botskills/src/utils/authenticationUtils.ts
130 16 3
public static bool IsStartActivity()
in sdk/csharp/libraries/microsoft.bot.solutions/Extensions/ActivityEx.cs
34 13 1
export function isStartActivity()
in sdk/typescript/libraries/bot-solutions/src/extensions/activityEx.ts
26 13 1
protected async routeStep()
in templates/typescript/generator-bot-virtualassistant/generators/skill/templates/sample-skill/src/dialogs/_mainDialog.ts
49 13 1
private async interceptOAuthCards()
in templates/typescript/generator-bot-virtualassistant/generators/app/templates/sample-assistant/src/tokenExchange/tokenExchangeSkillHandler.ts
29 12 2
export function manifestV1Validation()
in tools/botskills/src/utils/validationUtils.ts
21 12 2
protected override async Task OnContinueDialogAsync()
in sdk/csharp/libraries/microsoft.bot.solutions/Dialogs/ActivityHandlerDialog.cs
57 11 2
protected override async Task OnContinueDialogAsync()
in sdk/csharp/libraries/microsoft.bot.solutions/Dialogs/RouterDialog.cs
73 11 2
private void LoadResponses()
in sdk/csharp/libraries/microsoft.bot.solutions/Responses/ResponseManager.cs
55 11 3
protected async onContinueDialog()
in sdk/typescript/libraries/bot-solutions/src/dialogs/activityHandlerDialog.ts
42 11 1
protected async onContinueDialog()
in sdk/typescript/libraries/bot-solutions/src/dialogs/routerDialog.ts
51 11 1
export function applyConversationReference()
in sdk/typescript/libraries/bot-solutions/src/extensions/activityEx.ts
32 11 3
private async Task InterceptOAuthCardsAsync()
in templates/csharp/VA/VA/TokenExchange/TokenExchangeSkillHandler.cs
38 11 2
public async Task OnTurnAsync()
in sdk/csharp/libraries/microsoft.bot.solutions/Middleware/EventDebuggerMiddleware.cs
37 10 3
export function listToSpeechReadyString()
in sdk/typescript/libraries/bot-solutions/src/responses/speechUtility.ts
23 10 4