facebookresearch / PointContrast
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 721 units with 10,085 lines of code in units (73.4% of code).
    • 0 very complex units (0 lines of code)
    • 4 complex units (391 lines of code)
    • 27 medium complex units (1,336 lines of code)
    • 52 simple units (1,338 lines of code)
    • 638 very simple units (7,020 lines of code)
0% | 3% | 13% | 13% | 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% | 3% | 13% | 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/votenet_det_new/models0% | 7% | 3% | 5% | 82%
downstream/semseg/lib0% | 10% | 16% | 19% | 54%
downstream/votenet_det_new/lib0% | 0% | 24% | 19% | 55%
downstream/semseg0% | 0% | 71% | 18% | 9%
downstream/votenet_det_new0% | 0% | 81% | 11% | 7%
pretrain/pointcontrast/lib0% | 0% | 6% | 24% | 68%
pretrain/data_preprocess/scannet_pair0% | 0% | 5% | 22% | 71%
downstream/semseg/models0% | 0% | 3% | 0% | 96%
pretrain/pointcontrast/model0% | 0% | 6% | 0% | 93%
pretrain/pointcontrast0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def train()
in downstream/semseg/lib/train.py
125 33 5
def parse_predictions()
in downstream/votenet_det_new/models/ap_helper.py
105 31 2
def backproject()
in downstream/semseg/lib/pc_utils.py
64 28 9
def dump_results()
in downstream/votenet_det_new/models/dump_helper.py
97 26 4
def main()
in downstream/semseg/ddp_main.py
110 22 2
def test()
in downstream/votenet_det_new/lib/test.py
54 22 4
def test()
in downstream/semseg/lib/test.py
105 19 5
def evaluate_one_epoch()
in downstream/votenet_det_new/lib/train.py
40 19 7
def extract_sunrgbd_data()
in downstream/votenet_det_new/lib/datasets/sunrgbd/sunrgbd_data.py
57 18 8
def eval_det_cls()
in downstream/votenet_det_new/lib/utils/eval_det.py
53 17 5
def convert_conv_type()
in downstream/semseg/models/modules/common.py
37 16 3
def convert_conv_type()
in downstream/votenet_det_new/models/backbone/sparseconv/models/modules/common.py
37 16 3
def convert_conv_type()
in pretrain/pointcontrast/model/modules/common.py
37 16 3
def export()
in downstream/votenet_det_new/lib/datasets/scannet/load_scannet_data.py
53 15 6
def eval_det_multiprocessing()
in downstream/votenet_det_new/lib/utils/eval_det.py
33 15 5
def train_one_epoch()
in downstream/votenet_det_new/lib/train.py
35 15 8
def test_pointcloud()
in downstream/semseg/lib/datasets/stanford.py
38 14 2
def test_pointcloud()
in downstream/semseg/lib/datasets/scannet.py
33 13 2
def __getitem__()
in downstream/semseg/lib/dataset.py
24 13 2
def save_predictions()
in downstream/semseg/lib/utils.py
39 13 7