microsoft / BotFramework-Emulator
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,334 units with 16,125 lines of code in units (35.2% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (387 lines of code)
    • 15 medium complex units (871 lines of code)
    • 85 simple units (2,545 lines of code)
    • 1,232 very simple units (12,322 lines of code)
0% | 2% | 5% | 15% | 76%
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% | 4% | 5% | 14% | 76%
tsx0% | 0% | 5% | 18% | 75%
js0% | 0% | 0% | 0% | 100%
nsh0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
packages/app/shared0% | 17% | 0% | 3% | 79%
packages/app/client0% | 1% | 3% | 12% | 81%
packages/app/main0% | 0% | 7% | 19% | 73%
packages/extensions/luis0% | 0% | 14% | 30% | 54%
packages/extensions/json0% | 0% | 23% | 24% | 52%
packages/sdk/ui-react0% | 0% | 5% | 26% | 67%
packages/sdk/shared0% | 0% | 10% | 0% | 89%
packages/extensions/qnamaker0% | 0% | 0% | 27% | 72%
scripts0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
packages/tools/test-bot0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static async globalHandles()
in packages/app/client/src/utils/eventHandlers.ts
95 31 1
export function chat()
in packages/app/shared/src/state/reducers/chat.ts
292 30 2
public async openBot()
in packages/app/main/src/protocolHandler.ts
69 21 1
static async confirmAndSwitchBots()
in packages/app/client/src/ui/helpers/activeBotHelper.ts
55 19 1
private populateCompositeEntity()
in packages/extensions/luis/client/src/Adapters/RecognizerResultAdapter.tsx
54 19 4
public prepTranscriptActivities()
in packages/app/main/src/server/state/conversation.ts
39 18 1
protected accessoryClick()
in packages/extensions/json/src/windowHostReceiver.tsx
70 18 2
private getEntityValue()
in packages/extensions/luis/client/src/Adapters/RecognizerResultAdapter.tsx
47 17 1
export function json2HTML()
in packages/sdk/shared/src/utils/json2HTML.ts
50 17 2
export function createUploadHandler()
in packages/app/main/src/server/routes/directLine/handlers/upload.ts
79 15 1
export function createBotFrameworkAuthenticationMiddleware()
in packages/app/main/src/server/routes/handlers/botFrameworkAuthentication.ts
79 14 1
public render()
in packages/app/client/src/ui/dialogs/botCreationDialog/botCreationDialog.tsx
131 12 0
protected async getConnectedServicesByType()
in packages/app/main/src/commands/connectedServiceCommands.ts
41 12 2
public handleIncomingActivity()
in packages/app/client/src/utils/restartConversationQueue.ts
35 11 1
public openTranscript()
in packages/app/main/src/protocolHandler.ts
36 11 1
public async resolveOAuthCards()
in packages/app/main/src/server/utils/oauthLinkEncoder.ts
30 11 1
public calculatePaneSizes()
in packages/sdk/ui-react/src/splitter/splitter.tsx
56 11 2
private stateChanged()
in packages/app/client/src/ui/editor/emulator/parts/inspector/inspector.tsx
24 10 2
renderItem()
in packages/app/client/src/ui/editor/emulator/parts/log/logEntry.tsx
42 10 2
static async confirmAndOpenBotFromFile()
in packages/app/client/src/ui/helpers/activeBotHelper.ts
37 10 1