facebookresearch / aroma-paper-artifacts
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 68 units with 978 lines of code in units (52.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 5 medium complex units (304 lines of code)
    • 7 simple units (140 lines of code)
    • 56 very simple units (534 lines of code)
0% | 0% | 31% | 14% | 54%
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
py0% | 0% | 28% | 13% | 57%
java0% | 0% | 39% | 15% | 45%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/main/python0% | 0% | 28% | 13% | 57%
src/main/java0% | 0% | 40% | 16% | 43%
data0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
private JSONArray getSerializedTree()
in reference/src/main/java/ConvertJava.java
90 20 2
def get_completions2()
in reference/src/main/python/similar.py
83 16 2
def get_completions3()
in reference/src/main/python/similar.py
57 16 5
def get_completions_via_clustering()
in reference/src/main/python/similar.py
49 12 2
def get_sub_ast_aux()
in reference/src/main/python/similar.py
25 11 3
def ast_to_code_print_lines()
in reference/src/main/python/similar.py
14 10 3
def prune_ast()
in reference/src/main/python/similar.py
24 9 2
def prune_last_jd()
in reference/src/main/python/similar.py
35 8 2
def featurize_and_test_record()
in reference/src/main/python/similar.py
21 8 2
def get_leftmost_leaf()
in reference/src/main/python/similar.py
10 7 1
private String getLeadingOrTrailing()
in reference/src/main/java/ConvertJava.java
21 7 3
private void setClassName()
in reference/src/main/java/ConvertJava.java
15 7 3
def ast_to_code_collect_lines()
in reference/src/main/python/similar.py
7 5 2
def sample_n_records()
in reference/src/main/python/similar.py
16 5 2
def distance_set()
in reference/src/main/python/similar.py
14 5 1
def print_match_index()
in reference/src/main/python/similar.py
13 5 2
private void dumpMethodAst()
in reference/src/main/java/ConvertJava.java
21 5 2
def ast_to_code_aux()
in reference/src/main/python/similar.py
7 4 2
def append_feature_index()
in reference/src/main/python/similar.py
10 4 5
def get_record_part()
in reference/src/main/python/similar.py
12 4 1