aws-samples / aws-ai-solution-kit
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
  • For duplication, we look at places in code where there are 6 or more lines of code that are exactly the same.
  • Before duplication is calculated, the code is cleaned to remove empty lines, comments, and frequently duplicated constructs such as imports.
  • You should aim at having as little as possible (<5%) of duplicated code as high-level of duplication can lead to maintenance difficulties, poor factoring, and logical contradictions.
Learn more...
Duplication Overall
  • 34% duplication:
    • 2,018 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 704 duplicated lines
  • 34 duplicates
system34% (704 lines)
Duplication per Extension
py29% (356 lines)
ts43% (348 lines)
Duplication per Component (primary)
source/super-resolution-gpu83% (124 lines)
source/super-resolution-inf184% (124 lines)
source/super-resolution-gpu/container100% (98 lines)
source/super-resolution-inf1/container100% (98 lines)
source/infer-ocr/src7% (58 lines)
source/human-seg/src61% (34 lines)
source/super-resolution/src60% (33 lines)
source/porn-image/src54% (28 lines)
source/human-seg66% (26 lines)
source/super-resolution65% (26 lines)
source/lib6% (21 lines)
source/infer-ocr21% (16 lines)
source/porn-image26% (11 lines)
source/lib/custom_resource70% (7 lines)
ROOT0% (0 lines)
source/lib/s3_to_efs0% (0 lines)
source0% (0 lines)

Duplication Between Components (50+ lines)

G source/super-resolution-gpu source/super-resolution-gpu source/super-resolution-inf1 source/super-resolution-inf1 source/super-resolution-gpu--source/super-resolution-inf1 248 source/super-resolution-gpu/container source/super-resolution-gpu/container source/super-resolution-inf1/container source/super-resolution-inf1/container source/super-resolution-gpu/container--source/super-resolution-inf1/container 196 source/human-seg/src source/human-seg/src source/super-resolution/src source/super-resolution/src source/human-seg/src--source/super-resolution/src 66 source/porn-image/src source/porn-image/src source/human-seg/src--source/porn-image/src 56 source/infer-ocr/src source/infer-ocr/src source/human-seg/src--source/infer-ocr/src 52 source/porn-image/src--source/super-resolution/src 54 source/infer-ocr/src--source/super-resolution/src 50 source/infer-ocr/src--source/porn-image/src 52 source/human-seg source/human-seg source/super-resolution source/super-resolution source/human-seg--source/super-resolution 52

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 34 duplicates...
Size#FoldersFilesLinesCode
98 x 2 source/super-resolution-gpu/container/model
source/super-resolution-inf1/container/model
predictor.py
predictor.py
13:134 (100%)
13:134 (100%)
view
43 x 2 source/super-resolution-gpu
source/super-resolution-inf1
super-resolution-gpu.ts
super-resolution-inf1.ts
141:193 (29%)
139:191 (29%)
view
25 x 2 source/super-resolution-gpu
source/super-resolution-inf1
super-resolution-gpu.ts
super-resolution-inf1.ts
69:105 (16%)
67:103 (17%)
view
23 x 2 source/super-resolution-gpu
source/super-resolution-inf1
super-resolution-gpu.ts
super-resolution-inf1.ts
108:138 (15%)
106:136 (15%)
view
20 x 2 source/infer-ocr/src
source/porn-image/src
infer_ocr_app.py
porn_image_app.py
100:120 (16%)
26:47 (40%)
view
20 x 2 source/human-seg/src
source/infer-ocr/src
human_seg_app.py
infer_ocr_app.py
15:35 (37%)
100:120 (16%)
view
20 x 2 source/human-seg/src
source/porn-image/src
human_seg_app.py
porn_image_app.py
15:35 (37%)
26:47 (40%)
view
19 x 2 source/infer-ocr/src
source/super-resolution/src
infer_ocr_app.py
super_resolution_app.py
100:118 (15%)
25:43 (35%)
view
19 x 2 source/human-seg/src
source/super-resolution/src
human_seg_app.py
super_resolution_app.py
15:33 (35%)
25:43 (35%)
view
19 x 2 source/porn-image/src
source/super-resolution/src
porn_image_app.py
super_resolution_app.py
26:45 (38%)
25:43 (35%)
view
18 x 2 source/super-resolution-gpu
source/super-resolution-inf1
super-resolution-gpu.ts
super-resolution-inf1.ts
20:40 (12%)
20:40 (12%)
view
18 x 2 source/human-seg
source/super-resolution
human-seg.ts
super-resolution.ts
24:44 (47%)
25:45 (46%)
view
16 x 2 source/infer-ocr
source/super-resolution
infer-ocr.ts
super-resolution.ts
62:78 (21%)
25:41 (41%)
view
16 x 2 source/human-seg
source/infer-ocr
human-seg.ts
infer-ocr.ts
24:40 (42%)
62:78 (21%)
view
15 x 2 source/super-resolution-gpu
source/super-resolution-inf1
super-resolution-gpu.ts
super-resolution-inf1.ts
47:66 (10%)
45:64 (10%)
view
14 x 2 source/human-seg/src
source/super-resolution/src
human_seg_app.py
super_resolution_app.py
56:71 (25%)
56:71 (25%)
view
11 x 2 source/porn-image
source/super-resolution
porn-image.ts
super-resolution.ts
26:37 (27%)
25:36 (28%)
view
11 x 2 source/human-seg
source/porn-image
human-seg.ts
porn-image.ts
24:35 (28%)
26:37 (27%)
view
11 x 2 source/infer-ocr
source/porn-image
infer-ocr.ts
porn-image.ts
62:73 (15%)
26:37 (27%)
view
9 x 2 source/lib
source/super-resolution-inf1
ai-kits-rest-api.ts
super-resolution-inf1.ts
71:79 (7%)
143:151 (6%)
view
Duplicated Units
The list of top 5 duplicated units.
See data for all 5 unit duplicates...
Size#FoldersFilesLinesCode
49 x 2 source/super-resolution-gpu/container/model
source/super-resolution-inf1/container/model
predictor.py
predictor.py
0:0 
0:0 
view
26 x 2 source/super-resolution-gpu/container/model
source/super-resolution-inf1/container/model
predictor.py
predictor.py
0:0 
0:0 
view
12 x 2 source/super-resolution-gpu/container/model
source/super-resolution-inf1/container/model
predictor.py
predictor.py
0:0 
0:0 
view
6 x 2 source/super-resolution-gpu/container/model
source/super-resolution-inf1/container/model
predictor.py
predictor.py
0:0 
0:0 
view
7 x 2 source/super-resolution-gpu/container/model
source/super-resolution-inf1/container/model
predictor.py
predictor.py
0:0 
0:0 
view