aws-samples / aws-lambda-inference-cdk-compute-blog
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
  • 36% duplication:
    • 512 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 186 duplicated lines
  • 14 duplicates
system36% (186 lines)
Duplication per Extension
ts35% (124 lines)
py40% (62 lines)
Duplication per Component (primary)
lib35% (124 lines)
ml-images/oci64% (31 lines)
ml-images/efs52% (31 lines)
ml-images/s30% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G ml-images/efs ml-images/efs ml-images/oci ml-images/oci ml-images/efs--ml-images/oci 62

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 14 longest duplicates.
See data for all 14 duplicates...
Size#FoldersFilesLinesCode
21 x 2 ml-images/efs
ml-images/oci
app.py
app.py
78:103 (35%)
62:87 (43%)
view
12 x 2 lib
lib
ml-efs-stack.ts
ml-s3-stack.ts
114:127 (10%)
111:124 (7%)
view
12 x 2 lib
lib
ml-oci-stack.ts
ml-s3-stack.ts
73:86 (14%)
111:124 (7%)
view
12 x 2 lib
lib
ml-efs-stack.ts
ml-oci-stack.ts
114:127 (10%)
73:86 (14%)
view
11 x 2 lib
lib
ml-efs-stack.ts
ml-oci-stack.ts
91:101 (9%)
50:60 (13%)
view
11 x 2 lib
lib
ml-oci-stack.ts
ml-s3-stack.ts
50:60 (13%)
88:98 (7%)
view
11 x 2 lib
lib
ml-efs-stack.ts
ml-s3-stack.ts
91:101 (9%)
88:98 (7%)
view
10 x 2 lib
lib
ml-efs-stack.ts
ml-s3-stack.ts
143:152 (8%)
174:183 (6%)
view
10 x 2 ml-images/efs
ml-images/oci
app.py
app.py
48:60 (16%)
43:53 (20%)
view
10 x 2 lib
lib
ml-efs-stack.ts
ml-oci-stack.ts
144:153 (8%)
103:112 (12%)
view
9 x 2 lib
lib
ml-oci-stack.ts
ml-s3-stack.ts
103:111 (10%)
175:183 (5%)
view
8 x 2 lib
lib
ml-oci-stack.ts
ml-s3-stack.ts
116:123 (9%)
189:196 (5%)
view
8 x 2 lib
lib
ml-efs-stack.ts
ml-oci-stack.ts
157:164 (7%)
116:123 (9%)
view
8 x 2 lib
lib
ml-efs-stack.ts
ml-s3-stack.ts
157:164 (7%)
189:196 (5%)
view