facebookresearch / isc2021
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 71 units with 1,255 lines of code in units (57.0% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (145 lines of code)
    • 4 medium complex units (396 lines of code)
    • 10 simple units (307 lines of code)
    • 56 very simple units (407 lines of code)
0% | 11% | 31% | 24% | 32%
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% | 19% | 12% | 22% | 45%
c0% | 0% | 59% | 26% | 14%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
baselines0% | 36% | 22% | 7% | 34%
lear_gist-1.20% | 0% | 59% | 26% | 14%
isc0% | 0% | 0% | 36% | 63%
scripts0% | 0% | 0% | 62% | 37%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in baselines/GeM_baseline.py
145 28 0
int main()
in lear_gist-1.2/compute_gist_stream.c
77 18 2
def main()
in baselines/gist_baseline.py
90 16 0
void prefilt()
in lear_gist-1.2/gist.c
94 13 2
void color_prefilt()
in lear_gist-1.2/gist.c
135 13 2
def find_matches()
in baselines/how_find_matches.py
29 10 1
int main()
in lear_gist-1.2/compute_gist.c
40 10 2
static void color_down_N()
in lear_gist-1.2/gist.c
45 9 4
def compute_metrics_track2()
in scripts/compute_metrics.py
46 8 1
def search_with_capped_res()
in isc/descriptor_matching.py
33 8 4
16 7 1
static void fftshift()
in lear_gist-1.2/gist.c
25 7 3
def find_tp_ranks()
in isc/metrics.py
23 6 2
def knn_match_and_make_predictions()
in isc/descriptor_matching.py
22 6 7
static void down_N()
in lear_gist-1.2/gist.c
28 6 3
def extract_from_image_list()
in baselines/gist_baseline.py
21 5 3
def load_model()
in baselines/GeM_baseline.py
18 5 2
def to_arrays()
in isc/metrics.py
6 4 2
def apply_maxres_IP()
in isc/descriptor_matching.py
17 4 2
def match_and_make_predictions()
in isc/descriptor_matching.py
15 4 7