aws-samples / happy-path
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
  • 20% duplication:
    • 1,901 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 388 duplicated lines
  • 21 duplicates
system20% (388 lines)
Duplication per Extension
yaml52% (356 lines)
js5% (32 lines)
Duplication per Component (primary)
workflows/templates91% (255 lines)
backend26% (101 lines)
workflows/functions17% (32 lines)
localTesting0% (0 lines)
frontend0% (0 lines)
frontend/src0% (0 lines)
frontend/public0% (0 lines)
backend/api0% (0 lines)
backend/upload0% (0 lines)
backend/layers0% (0 lines)
backend/streams0% (0 lines)

Duplication Between Components (50+ lines)

G backend backend workflows/templates workflows/templates backend--workflows/templates 68

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
74 x 2 workflows/templates/v2
workflows/templates/v3
template.yaml
template.yaml
5:86 (94%)
5:86 (82%)
view
51 x 2 workflows/templates/v3
workflows/templates/v4
template.yaml
template.yaml
31:84 (56%)
31:84 (59%)
view
51 x 2 workflows/templates/v2
workflows/templates/v4
template.yaml
template.yaml
31:84 (65%)
31:84 (59%)
view
20 x 2 workflows/templates/v3
workflows/templates/v4
template.yaml
template.yaml
5:28 (22%)
5:28 (23%)
view
20 x 2 workflows/templates/v1
workflows/templates/v3
template.yaml
template.yaml
5:28 (83%)
5:28 (22%)
view
20 x 2 workflows/templates/v1
workflows/templates/v2
template.yaml
template.yaml
5:28 (83%)
5:28 (25%)
view
20 x 2 workflows/templates/v2
workflows/templates/v4
template.yaml
template.yaml
5:28 (25%)
5:28 (23%)
view
20 x 2 workflows/templates/v1
workflows/templates/v4
template.yaml
template.yaml
5:28 (83%)
5:28 (23%)
view
19 x 2 backend
backend
realtime.yaml
realtime.yaml
64:82 (16%)
103:121 (16%)
view
14 x 2 backend
backend
realtime.yaml
realtime.yaml
47:60 (11%)
86:99 (11%)
view
10 x 2 workflows/functions/analyze/moderator
workflows/functions/analyze/people
app.js
app.js
59:71 (35%)
64:76 (31%)
view
10 x 2 backend
backend
template.yaml
template.yaml
122:131 (3%)
148:157 (3%)
view
8 x 2 backend
workflows/templates/v1
template.yaml
template.yaml
21:29 (2%)
11:19 (33%)
view
8 x 2 backend
workflows/templates/v4
template.yaml
template.yaml
21:29 (2%)
11:19 (9%)
view
8 x 2 workflows/templates/v3
workflows/templates/v4
template.yaml
template.yaml
91:98 (8%)
87:94 (9%)
view
8 x 2 backend
workflows/templates/v2
template.yaml
template.yaml
21:29 (2%)
11:19 (10%)
view
8 x 2 backend
workflows/templates/v3
template.yaml
template.yaml
21:29 (2%)
11:19 (8%)
view
7 x 2 backend
workflows/templates/v4
template.yaml
template.yaml
31:38 (2%)
31:38 (8%)
view
7 x 2 backend
workflows/templates/v3
template.yaml
template.yaml
31:38 (2%)
31:38 (7%)
view
7 x 2 backend
workflows/templates/v2
template.yaml
template.yaml
31:38 (2%)
31:38 (8%)
view