ajaxorg / ace
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 5,076 units with 85,499 lines of code in units (68.4% of code).
    • 8 very complex units (1,024 lines of code)
    • 25 complex units (5,070 lines of code)
    • 222 medium complex units (8,480 lines of code)
    • 450 simple units (10,484 lines of code)
    • 4,371 very simple units (60,441 lines of code)
1% | 5% | 9% | 12% | 70%
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
js1% | 5% | 9% | 12% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/ace1% | 6% | 9% | 11% | 71%
tool0% | 0% | 14% | 36% | 48%
ROOT0% | 0% | 14% | 19% | 66%
api/resources0% | 0% | 14% | 22% | 62%
doc/site0% | 0% | 0% | 44% | 55%
build_support0% | 0% | 0% | 33% | 66%
tool/templates0% | 0% | 0% | 0% | 100%
doc0% | 0% | 0% | 0% | 100%
experiments0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
this.vbsBlock = function()
in lib/ace/mode/folding/vbscript.js
220 80 4
var CstyleBehaviour = function()
in lib/ace/mode/behaviour/cstyle.js
233 79 1
EntityParser.replaceEntityNumbers = function()
in lib/ace/mode/html/saxparser.js
54 76 1
function isFullWidth()
in lib/ace/edit_session.js
36 65 1
this.rubyBlock = function()
in lib/ace/mode/folding/ruby.js
138 61 4
function lex()
in lib/ace/mode/lua/luaparse.js
70 59 0
var XmlBehaviour = function()
in lib/ace/mode/behaviour/xml.js
134 56 0
139 54 2
function _getCharClass()
in lib/ace/lib/bidiutil.js
81 49 4
this.$renderChanges = function()
in lib/ace/virtual_renderer.js
123 48 2
evalInput: function()
in lib/ace/keyboard/vim.js
143 44 2
function parseElementStartPart()
in lib/ace/mode/xml/sax.js
137 42 5
this.$onChange = function()
in lib/ace/range_list.js
102 42 1
function onMouseDown()
in lib/ace/mouse/multi_select_handler.js
65 39 1
handleKeyboard: function()
in lib/ace/keyboard/vim.js
70 39 5
define()
in lib/ace/lib/dom.js
72 37 3
paste: function()
in lib/ace/keyboard/vim.js
144 36 3
this.getLineTokens = function()
in lib/ace/tokenizer.js
118 35 2
setTimeout()
in lib/ace/editor.js
90 35 1
EntityParser.consumeEntity = function()
in lib/ace/mode/html/saxparser.js
97 35 3