facebookresearch / votenet
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 233 units with 3,306 lines of code in units (62.3% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (202 lines of code)
    • 10 medium complex units (471 lines of code)
    • 15 simple units (452 lines of code)
    • 206 very simple units (2,181 lines of code)
0% | 6% | 14% | 13% | 65%
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% | 6% | 15% | 14% | 63%
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
models0% | 30% | 0% | 3% | 65%
sunrgbd0% | 0% | 21% | 24% | 54%
scannet0% | 0% | 34% | 6% | 58%
utils0% | 0% | 12% | 19% | 68%
ROOT0% | 0% | 63% | 0% | 36%
pointnet20% | 0% | 0% | 19% | 80%
pointnet2/_ext_src/src0% | 0% | 0% | 0% | 100%
pointnet2/_ext_src/include0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def parse_predictions()
in models/ap_helper.py
105 31 2
def dump_results()
in models/dump_helper.py
97 26 4
35 19 0
36 19 0
def extract_sunrgbd_data()
in sunrgbd/sunrgbd_data.py
57 18 8
def eval_det_cls()
in utils/eval_det.py
53 17 5
def eval_det_multiprocessing()
in utils/eval_det.py
33 15 5
def export()
in scannet/load_scannet_data.py
53 15 6
29 14 0
def data_viz()
in sunrgbd/sunrgbd_data.py
78 13 3
def eval_det()
in utils/eval_det.py
26 12 5
def __getitem__()
in scannet/scannet_detection_dataset.py
71 11 2
def forward()
in pointnet2/pointnet2_utils.py
40 10 4
def forward()
in pointnet2/pointnet2_modules.py
39 10 4
def get_box3d_dim_statistics()
in sunrgbd/sunrgbd_data.py
36 10 3
27 10 4
def __getitem__()
in sunrgbd/sunrgbd_detection_dataset.py
105 9 2
def point_cloud_to_image()
in utils/pc_util.py
26 8 4
def voc_ap()
in utils/eval_det.py
17 7 3
def volume_to_point_cloud()
in utils/pc_util.py
13 7 1