facebookresearch / ContrastiveSceneContexts
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,333 units with 18,398 lines of code in units (75.5% of code).
    • 0 very complex units (0 lines of code)
    • 10 complex units (938 lines of code)
    • 39 medium complex units (2,240 lines of code)
    • 88 simple units (2,390 lines of code)
    • 1,196 very simple units (12,830 lines of code)
0% | 5% | 12% | 12% | 69%
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% | 5% | 12% | 13% | 68%
cpp0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
downstream/insseg/datasets0% | 12% | 6% | 15% | 64%
downstream/semseg/datasets0% | 10% | 6% | 19% | 63%
downstream/votenet/models0% | 7% | 3% | 6% | 81%
pretrain/contrastive_scene_contexts/lib0% | 6% | 17% | 12% | 63%
downstream/insseg/lib0% | 4% | 19% | 18% | 57%
downstream/semseg/lib0% | 4% | 14% | 20% | 59%
downstream/votenet/lib0% | 0% | 35% | 15% | 49%
downstream/votenet/datasets0% | 0% | 25% | 16% | 57%
pretrain/scannet_pair0% | 0% | 5% | 22% | 71%
pretrain/contrastive_scene_contexts/model0% | 0% | 3% | 6% | 90%
downstream/insseg/models0% | 0% | 3% | 0% | 96%
downstream/semseg/models0% | 0% | 3% | 0% | 96%
pretrain/contrastive_scene_contexts0% | 0% | 0% | 0% | 100%
downstream/votenet0% | 0% | 0% | 0% | 100%
downstream/insseg0% | 0% | 0% | 0% | 100%
downstream/semseg0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def evaluate_matches()
in downstream/semseg/datasets/evaluation/evaluate_semantic_instance.py
111 41 2
def evaluate_matches()
in downstream/semseg/datasets/evaluation/scannet_benchmark_utils/scripts/evaluate_semantic_instance.py
111 41 2
def evaluate_matches()
in downstream/insseg/datasets/evaluation/evaluate_semantic_instance.py
111 41 2
def evaluate_matches()
in downstream/insseg/datasets/evaluation/scannet_benchmark_utils/scripts/evaluate_semantic_instance.py
111 41 2
def evaluate_matches()
in pretrain/contrastive_scene_contexts/lib/evaluation/evaluate_semantic_instance.py
111 41 2
def parse_predictions()
in downstream/votenet/models/ap_helper.py
105 31 2
def backproject()
in downstream/semseg/lib/pc_utils.py
64 28 9
def backproject()
in downstream/insseg/lib/pc_utils.py
64 28 9
def __getitem__()
in downstream/insseg/datasets/dataset.py
53 26 2
def dump_results()
in downstream/votenet/models/dump_helper.py
97 26 4
def train()
in downstream/insseg/lib/ddp_trainer.py
132 25 1
def train()
in downstream/semseg/lib/ddp_trainer.py
102 23 1
def eval_det_cls()
in downstream/votenet/datasets/evaluation/evaluate_object_detection_helper.py
53 23 5
def evaluate_one_epoch()
in downstream/votenet/lib/ddp_trainer.py
44 23 2
def test()
in downstream/votenet/lib/ddp_trainer.py
50 23 1
def test()
in downstream/insseg/lib/test.py
133 20 3
def __init__()
in downstream/votenet/lib/ddp_trainer.py
137 20 2
def extract_sunrgbd_data()
in downstream/votenet/datasets/sunrgbd/sunrgbd_data.py
57 18 8
def eval_det_cls()
in downstream/votenet/lib/utils/eval_det.py
53 17 5
def train_one_epoch()
in downstream/votenet/lib/ddp_trainer.py
37 17 2