microsoft / CameraTraps
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,543 units with 31,738 lines of code in units (60.8% of code).
    • 0 very complex units (0 lines of code)
    • 13 complex units (2,367 lines of code)
    • 134 medium complex units (8,547 lines of code)
    • 218 simple units (6,703 lines of code)
    • 1,178 very simple units (14,121 lines of code)
0% | 7% | 26% | 21% | 44%
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% | 27% | 21% | 43%
cs0% | 20% | 17% | 8% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
api0% | 14% | 32% | 12% | 39%
data_management0% | 16% | 22% | 24% | 36%
archive0% | 6% | 24% | 24% | 44%
visualization0% | 19% | 18% | 12% | 49%
taxonomy_mapping0% | 9% | 55% | 14% | 20%
classification0% | 0% | 36% | 23% | 40%
research0% | 0% | 17% | 23% | 59%
detection0% | 0% | 32% | 27% | 40%
api_flask_redis0% | 0% | 88% | 0% | 11%
benchmark0% | 0% | 0% | 33% | 66%
sandbox0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def process_sequences()
in data_management/megadb/converters/cct_to_megadb.py
140 49 3
def sanity_check_json_db()
in data_management/databases/sanity_check_json_db.py
152 48 2
def find_repeat_detections()
in api/batch_processing/postprocessing/repeat_detection_elimination/repeat_detections_core.py
205 41 3
def s3dg_base()
in archive/classification_marcel/tf-slim/nets/s3dg.py
270 40 9
def csv_to_sequences()
in data_management/importers/idaho-camera-traps.py
173 40 1
def decode_serialized_example()
in data_management/tfrecords/tools/iterate_tfrecords.py
117 37 3
def create_batch_job()
in api/batch_processing/api_core/server_orchestration.py
131 35 2
delegate void SetProgressBarCallback()
in api/batch_processing/postprocessing/CameraTrapJsonFileProcessingApp/Form.cs
417 35 4
def break_into_images_annotations()
in data_management/megadb/converters/megadb_to_cct.py
70 32 2
def process_images()
in visualization/visualize_db.py
186 31 4
def request_detections()
in api/batch_processing/api_core/server.py
76 30 0
def get_preferred_taxonomic_match()
in taxonomy_mapping/process_species_by_dataset.py
79 30 1
def inception_v2_base()
in archive/classification_marcel/tf-slim/nets/inception_v2.py
351 29 7
def _build_nasnet_base()
in archive/classification_marcel/tf-slim/nets/nasnet/nasnet.py
81 25 9
def inception_resnet_v2_base()
in archive/classification_marcel/tf-slim/nets/inception_resnet_v2.py
116 24 6
def __init__()
in archive/data_management/tfrecords/make_tfrecords_from_vott.py
43 24 4
def main()
in research/active_learning/main.py
83 24 0
def inception_v3_base()
in archive/classification_marcel/tf-slim/nets/inception_v3.py
298 23 5
def compute_precision_recall_with_sequences()
in archive/detection/eval/analyze_sequence_detection_one_guess_per_sequence.py
124 23 5
def make_cct_embedded()
in data_management/megadb/converters/cct_to_megadb.py
73 23 2