aws-samples / aws-cross-region-elasticsearch-backup-restore
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
  • 21% duplication:
    • 458 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 99 duplicated lines
  • 8 duplicates
system21% (99 lines)
Duplication per Extension
ts30% (51 lines)
yaml17% (48 lines)
Duplication per Component (primary)
ROOT17% (48 lines)
src/es-snapshot-validate-state55% (22 lines)
src/es-backup-scheduler28% (17 lines)
src/es-snapshot-restore17% (12 lines)
python-scripts0% (0 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
12 x 2 src/es-snapshot-restore
src/es-snapshot-validate-state
index.ts
index.ts
70:83 (17%)
36:49 (30%)
view
11 x 2 ROOT
ROOT
template.yaml
template.yaml
98:108 (4%)
146:156 (4%)
view
10 x 2 ROOT
ROOT
template.yaml
template.yaml
121:130 (3%)
198:207 (3%)
view
10 x 2 src/es-backup-scheduler
src/es-snapshot-validate-state
index.ts
index.ts
6:15 (16%)
6:15 (25%)
view
7 x 2 src/es-backup-scheduler
src/es-snapshot-validate-state
index.ts
index.ts
57:65 (11%)
36:42 (17%)
view
7 x 2 src/es-backup-scheduler
src/es-snapshot-restore
index.ts
index.ts
57:65 (11%)
70:76 (10%)
view
6 x 2 ROOT
ROOT
template.yaml
template.yaml
162:167 (2%)
201:206 (2%)
view
6 x 2 ROOT
ROOT
template.yaml
template.yaml
124:129 (2%)
162:167 (2%)
view