aws-samples / cognito-at-edge-federated-ui-sample
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
  • 14% duplication:
    • 1,109 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 160 duplicated lines
  • 3 duplicates
system14% (160 lines)
Duplication per Extension
scss55% (100 lines)
tsx21% (60 lines)
Duplication per Component (primary)
web/src/components35% (160 lines)
web/src/state0% (0 lines)
web/src0% (0 lines)
web/src/services0% (0 lines)
web/src/routes0% (0 lines)
web/src/hooks0% (0 lines)
web/testing/mocks0% (0 lines)
web/public0% (0 lines)
infrastructure/lib0% (0 lines)
infrastructure/lib/helpers0% (0 lines)
infrastructure/lib/constructs0% (0 lines)
infrastructure0% (0 lines)
Longest Duplicates
The list of 3 longest duplicates.
See data for all 3 duplicates...
Size#FoldersFilesLinesCode
50 x 2 web/src/components/pages/home
web/src/components/pages/sample
home.scss
sample.scss
1:64 (100%)
1:64 (100%)
view
17 x 2 web/src/components/pages/home
web/src/components/pages/sample
home.tsx
sample.tsx
46:62 (29%)
57:73 (19%)
view
13 x 2 web/src/components/pages/home
web/src/components/pages/sample
home.tsx
sample.tsx
64:76 (22%)
75:87 (14%)
view