aws-samples / automated-iot-fleet-provisioning-by-claim
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
  • 8% duplication:
    • 1,003 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 81 duplicated lines
  • 5 duplicates
system8% (81 lines)
Duplication per Extension
yaml12% (59 lines)
py4% (22 lines)
Duplication per Component (primary)
SubTemplates/IoT26% (47 lines)
ROOT3% (12 lines)
SubTemplates/IoT/Lambdas/cert_rotation_monitor23% (11 lines)
SubTemplates/IoT/Lambdas/cert_rotation_hook29% (11 lines)
SubTemplates/IoT/Lambdas/bootstrap_generator0% (0 lines)
SubTemplates/IoT/Lambdas/provision_hook0% (0 lines)
SubTemplates/IoT/Lambdas/provision_device0% (0 lines)
SubTemplates/IoT/Lambdas/provision_device/client0% (0 lines)
SubTemplates/IoT/Lambdas/provision_device/client/utils0% (0 lines)
Longest Duplicates
The list of 5 longest duplicates.
See data for all 5 duplicates...
Size#FoldersFilesLinesCode
20 x 2 SubTemplates/IoT
SubTemplates/IoT
template.yaml
template.yaml
99:118 (11%)
126:145 (11%)
view
11 x 2 SubTemplates/IoT/Lambdas/cert_rotation_hook
SubTemplates/IoT/Lambdas/cert_rotation_monitor
app.py
app.py
43:61 (29%)
49:67 (23%)
view
7 x 2 SubTemplates/IoT
SubTemplates/IoT
template.yaml
template.yaml
99:105 (3%)
166:172 (3%)
view
7 x 2 SubTemplates/IoT
SubTemplates/IoT
template.yaml
template.yaml
126:132 (3%)
166:172 (3%)
view
6 x 2 ROOT
ROOT
pipeline.yaml
pipeline.yaml
56:61 (2%)
78:83 (2%)
view