facebookresearch / clevr-dataset-gen
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 41 units with 1,007 lines of code in units (81.3% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (337 lines of code)
    • 4 medium complex units (165 lines of code)
    • 8 simple units (251 lines of code)
    • 27 very simple units (254 lines of code)
0% | 33% | 16% | 24% | 25%
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% | 33% | 16% | 24% | 25%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
question_generation0% | 53% | 13% | 16% | 16%
image_generation0% | 0% | 21% | 38% | 39%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def instantiate_templates_dfs()
in question_generation/generate_questions.py
217 45 7
def main()
in question_generation/generate_questions.py
120 33 1
def render_scene()
in image_generation/render_images.py
83 21 7
def precompute_filter_options()
in question_generation/generate_questions.py
28 13 2
def find_relate_filter_options()
in question_generation/generate_questions.py
24 12 6
def other_heuristic()
in question_generation/generate_questions.py
30 11 2
def compute_all_relationships()
in image_generation/render_images.py
17 10 2
def main()
in image_generation/render_images.py
47 9 1
def insert_scene_node()
in question_generation/question_engine.py
30 9 2
def add_random_objects()
in image_generation/render_images.py
83 8 4
def answer_question()
in question_generation/question_engine.py
24 8 5
def is_degenerate()
in question_generation/question_engine.py
20 8 5
def add_empty_filter_options()
in question_generation/generate_questions.py
13 7 3
def make_same_attr_handler()
in question_generation/question_engine.py
17 6 1
def main()
in image_generation/collect_scenes.py
30 5 1
def check_visibility()
in image_generation/render_images.py
14 5 2
def make_query_handler()
in question_generation/question_engine.py
15 5 1
def add_object()
in image_generation/utils.py
14 4 5
def add_material()
in image_generation/utils.py
22 4 2
def make_filter_handler()
in question_generation/question_engine.py
12 4 1