aws-samples / lambda-refarch-imagerecognition
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
  • 5% duplication:
    • 1,020 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 52 duplicated lines
  • 5 duplicates
system5% (52 lines)
Duplication per Extension
js11% (52 lines)
Duplication per Component (primary)
amplify/backend/function13% (30 lines)
lambda-functions/store-image-metadata24% (22 lines)
lambda-functions/transform-metadata0% (0 lines)
lambda-functions/rekognition0% (0 lines)
lambda-functions/extract-image-metadata0% (0 lines)
lambda-functions/thumbnail0% (0 lines)
amplify/backend/api0% (0 lines)
amplify/backend/auth0% (0 lines)
src/react-frontend/src0% (0 lines)
src/react-frontend/public0% (0 lines)
cloudformation0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G amplify/backend/function amplify/backend/function lambda-functions/store-image-metadata lambda-functions/store-image-metadata amplify/backend/function--lambda-functions/store-image-metadata 50

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
9 x 2 amplify/backend/function/S3Trigger984fb593/src
lambda-functions/store-image-metadata
reference-index.js
index.js
45:54 (6%)
28:37 (10%)
view
7 x 2 amplify/backend/function/S3Trigger984fb593/src
lambda-functions/store-image-metadata
index.js
index.js
36:42 (7%)
20:26 (7%)
view
7 x 2 amplify/backend/function/S3Trigger984fb593/src
amplify/backend/function/S3Trigger984fb593/src
index.js
reference-index.js
27:33 (7%)
175:181 (5%)
view
6 x 2 amplify/backend/function/S3Trigger984fb593/src
lambda-functions/store-image-metadata
reference-index.js
index.js
176:181 (4%)
12:17 (6%)
view
6 x 2 amplify/backend/function/S3Trigger984fb593/src
lambda-functions/store-image-metadata
index.js
index.js
28:33 (6%)
12:17 (6%)
view