facebookresearch / AugLy
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 744 units with 4,396 lines of code in units (37.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (71 lines of code)
    • 7 simple units (182 lines of code)
    • 735 very simple units (4,143 lines of code)
0% | 0% | 1% | 4% | 94%
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% | 0% | 1% | 4% | 94%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
augly/text/augmenters0% | 0% | 12% | 20% | 66%
augly/video/augmenters0% | 0% | 0% | 13% | 86%
augly/image0% | 0% | 0% | 0% | 100%
augly/video0% | 0% | 0% | 0% | 100%
augly/audio0% | 0% | 0% | 0% | 100%
augly/text0% | 0% | 0% | 0% | 100%
augly/video/helpers0% | 0% | 0% | 0% | 100%
augly/image/utils0% | 0% | 0% | 0% | 100%
augly/utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def substitute()
in augly/text/augmenters/fun_fonts.py
43 14 2
def insert()
in augly/text/augmenters/upside_down.py
28 11 2
def substitute()
in augly/text/augmenters/typo.py
36 8 2
def apply_augmentation()
in augly/video/augmenters/cv2/text.py
41 7 3
def substitute()
in augly/text/augmenters/word_replacement.py
29 7 2
def substitute()
in augly/text/augmenters/letter_replacement.py
32 7 2
def augment()
in augly/text/augmenters/case.py
7 7 3
def get_command()
in augly/video/augmenters/ffmpeg/concat.py
25 6 3
def apply_font()
in augly/text/augmenters/fun_fonts.py
12 6 5
def get_command()
in augly/video/augmenters/ffmpeg/trim.py
19 5 3
def __init__()
in augly/video/augmenters/ffmpeg/resize.py
5 5 3
def apply_augmentation()
in augly/video/augmenters/cv2/shapes.py
23 5 3
def random_radius()
in augly/video/augmenters/cv2/shapes.py
5 5 1
def random_noise_intensity()
in augly/image/intensity.py
10 5 3
def rotated_rect_with_max_area()
in augly/image/utils/utils.py
13 5 3
def check_random_state()
in augly/audio/utils.py
10 5 1
def replace()
in augly/text/augmenters/word_replacement.py
5 5 2
def delete()
in augly/text/augmenters/words_augmenter.py
28 5 2
def augment()
in augly/text/augmenters/bidirectional.py
5 5 3
def augment()
in augly/text/augmenters/insertion.py
5 5 3