facebookresearch / UNOC
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 403 units with 4,366 lines of code in units (88.8% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (125 lines of code)
    • 10 medium complex units (538 lines of code)
    • 36 simple units (950 lines of code)
    • 356 very simple units (2,753 lines of code)
0% | 2% | 12% | 21% | 63%
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% | 2% | 12% | 21% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 3% | 14% | 16% | 65%
src/npybvh0% | 0% | 6% | 41% | 52%
src/parsers0% | 0% | 0% | 52% | 47%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create_training_data_config()
in src/data_creation_torch.py
125 39 7
def eval()
in src/eval.py
110 25 4
def plot()
in src/plots.py
47 22 7
def extract_batch()
in src/data_packer.py
37 18 3
def train_config()
in src/train.py
66 16 3
35 14 7
def plot_evaluation()
in src/eval.py
71 13 10
def positions_to_local_rot()
in src/definitions.py
56 12 2
def _parse_hierarchy()
in src/npybvh/bvh.py
27 12 2
47 11 5
def fix_bone_lengths()
in src/utils.py
42 11 6
def batch_convert_frames()
in src/parsers/unoc_parser.py
38 10 6
def batch_convert_frames()
in src/parsers/bvh_converter.py
30 9 6
def data_to_features()
in src/featuresets.py
22 9 1
def extract()
in src/data_packer.py
16 9 3
47 9 9
45 9 4
def get_all_files_of_folder()
in src/parsers/unoc_parser.py
20 8 2
def load_numpy()
in src/parsers/bvh_converter.py
38 8 2
def get_hand_joints()
in src/definitions.py
10 8 1