aws-samples / workshop-textract-comprehend-es
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
  • 17% duplication:
    • 602 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 107 duplicated lines
  • 9 duplicates
system17% (107 lines)
Duplication per Extension
yaml19% (79 lines)
py14% (28 lines)
Duplication per Component (primary)
bootstrap19% (79 lines)
sources/lambda/async11% (14 lines)
sources/lambda/sync22% (14 lines)
Longest Duplicates
The list of 9 longest duplicates.
See data for all 9 duplicates...
Size#FoldersFilesLinesCode
15 x 2 bootstrap
bootstrap
es-template.yaml
es-template.yaml
76:90 (4%)
111:125 (4%)
view
14 x 2 bootstrap
bootstrap
es-template.yaml
es-template.yaml
94:107 (4%)
129:142 (4%)
view
10 x 2 bootstrap
bootstrap
cfn-template.yaml
es-template.yaml
33:42 (11%)
249:258 (3%)
view
7 x 2 sources/lambda/async
sources/lambda/sync
document_analyzer.py
index.py
45:52 (18%)
64:70 (11%)
view
7 x 2 sources/lambda/async
sources/lambda/sync
document_indexer.py
index.py
26:33 (31%)
27:33 (11%)
view
7 x 2 bootstrap
bootstrap
cfn-template.yaml
es-template.yaml
32:38 (7%)
76:82 (2%)
view
7 x 2 bootstrap
bootstrap
cfn-template.yaml
es-template.yaml
32:38 (7%)
111:117 (2%)
view
6 x 2 bootstrap
bootstrap
es-template.yaml
es-template.yaml
112:117 (1%)
249:254 (1%)
view
6 x 2 bootstrap
bootstrap
es-template.yaml
es-template.yaml
77:82 (1%)
249:254 (1%)
view