aws-samples / streaming-analytics-workshop
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
  • 42% duplication:
    • 1,786 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 764 duplicated lines
  • 21 duplicates
system42% (764 lines)
Duplication per Extension
ts57% (521 lines)
py36% (157 lines)
yaml23% (70 lines)
js50% (16 lines)
Duplication per Component (primary)
resources/beam-on-kda/cdk/lib58% (265 lines)
resources/flink-on-kda/cdk/lib55% (256 lines)
resources/flink-on-kda23% (151 lines)
resources/beam-on-kda/cdk/lambda55% (38 lines)
resources/flink-on-kda/cdk/lambda100% (38 lines)
resources/beam-on-kda/cdk100% (8 lines)
resources/flink-on-kda/cdk100% (8 lines)
workshop0% (0 lines)
workshop/layouts/partials0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G resources/beam-on-kda/cdk/lib resources/beam-on-kda/cdk/lib resources/flink-on-kda/cdk/lib resources/flink-on-kda/cdk/lib resources/beam-on-kda/cdk/lib--resources/flink-on-kda/cdk/lib 511 resources/beam-on-kda/cdk/lambda resources/beam-on-kda/cdk/lambda resources/flink-on-kda/cdk/lambda resources/flink-on-kda/cdk/lambda resources/beam-on-kda/cdk/lambda--resources/flink-on-kda/cdk/lambda 76

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 21 duplicates...
Size#FoldersFilesLinesCode
57 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
github-build-pipeline.ts
github-build-pipeline.ts
13:90 (52%)
13:90 (52%)
view
50 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
github-build-pipeline.ts
github-build-pipeline.ts
92:157 (46%)
92:157 (46%)
view
30 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
windows-dev-environment.ts
workshop-infrastructure.ts
89:124 (18%)
152:187 (12%)
view
29 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
windows-dev-environment.ts
workshop-infrastructure.ts
43:78 (18%)
96:130 (12%)
view
28 x 2 resources/flink-on-kda
resources/flink-on-kda
index.py
index.py
81:108 (8%)
118:145 (8%)
view
27 x 2 resources/beam-on-kda/cdk/lambda
resources/flink-on-kda/cdk/lambda
build-pipeline-helper.py
build-pipeline-helper.py
8:46 (100%)
8:46 (100%)
view
25 x 2 resources/flink-on-kda
resources/flink-on-kda
index.py
index.py
84:108 (7%)
161:185 (7%)
view
25 x 2 resources/flink-on-kda
resources/flink-on-kda
index.py
index.py
121:145 (7%)
161:185 (7%)
view
22 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
windows-dev-environment.ts
workshop-infrastructure.ts
191:213 (13%)
259:281 (9%)
view
19 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
windows-dev-environment.ts
workshop-infrastructure.ts
126:149 (11%)
189:212 (8%)
view
16 x 2 resources/flink-on-kda
resources/flink-on-kda
step-scaling.yaml
step-scaling.yaml
269:284 (5%)
296:311 (5%)
view
11 x 2 resources/beam-on-kda/cdk/lambda
resources/flink-on-kda/cdk/lambda
empty-bucket.py
empty-bucket.py
7:21 (100%)
7:21 (100%)
view
10 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
windows-dev-environment.ts
workshop-infrastructure.ts
31:43 (6%)
46:58 (4%)
view
10 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
windows-dev-environment.ts
workshop-infrastructure.ts
163:176 (6%)
227:240 (4%)
view
10 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
workshop-infrastructure.ts
workshop-infrastructure.ts
43:54 (7%)
139:150 (4%)
view
10 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
empty-bucket.ts
empty-bucket.ts
10:24 (50%)
10:24 (50%)
view
10 x 2 resources/flink-on-kda
resources/flink-on-kda
step-scaling.yaml
step-scaling.yaml
153:162 (3%)
170:179 (3%)
view
9 x 2 resources/beam-on-kda/cdk/lib
resources/flink-on-kda/cdk/lib
empty-bucket.ts
empty-bucket.ts
26:37 (45%)
26:37 (45%)
view
9 x 2 resources/flink-on-kda
resources/flink-on-kda
step-scaling.yaml
step-scaling.yaml
207:215 (3%)
233:242 (3%)
view
8 x 2 resources/beam-on-kda/cdk
resources/flink-on-kda/cdk
jest.config.js
jest.config.js
1:8 (100%)
1:8 (100%)
view
Duplicated Units
The list of top 3 duplicated units.
See data for all 3 unit duplicates...
Size#FoldersFilesLinesCode
12 x 2 resources/beam-on-kda/cdk/lambda
resources/flink-on-kda/cdk/lambda
build-pipeline-helper.py
build-pipeline-helper.py
0:0 
0:0 
view
11 x 2 resources/beam-on-kda/cdk/lambda
resources/flink-on-kda/cdk/lambda
build-pipeline-helper.py
build-pipeline-helper.py
0:0 
0:0 
view
10 x 2 resources/beam-on-kda/cdk/lambda
resources/flink-on-kda/cdk/lambda
empty-bucket.py
empty-bucket.py
0:0 
0:0 
view