aws-quickstart / quickstart-ammos-smallsat-toolkit
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
  • 41% duplication:
    • 3,748 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,552 duplicated lines
  • 46 duplicates
system41% (1,552 lines)
Duplication per Extension
yaml42% (1,484 lines)
py53% (68 lines)
Duplication per Component (primary)
templates50% (1,470 lines)
functions/source/RoleChecker48% (34 lines)
functions/source/CognitoClientInspect60% (34 lines)
configs/ait/config2% (14 lines)
functions/source/LoggingProcessorLambda0% (0 lines)

Duplication Between Components (50+ lines)

G functions/source/CognitoClientInspect functions/source/CognitoClientInspect functions/source/RoleChecker functions/source/RoleChecker functions/source/CognitoClientInspect--functions/source/RoleChecker 68

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 46 duplicates...
Size#FoldersFilesLinesCode
292 x 2 templates
templates
ammos-cubs.main.template.yaml
ammos-cubs.testing.template.yaml
1:292 (55%)
1:292 (55%)
view
165 x 2 templates
templates
ammos-cubs.main.template.yaml
ammos-cubs.testing.template.yaml
319:483 (31%)
317:481 (31%)
view
43 x 2 templates
templates
ammos-cubs.main.template.yaml
ammos-cubs.testing.template.yaml
487:529 (8%)
483:525 (8%)
view
31 x 2 templates
templates
ammos-cubs-ait.template.yaml
ammos-cubs-ait.template.yaml
326:356 (8%)
361:391 (8%)
view
28 x 2 functions/source/CognitoClientInspect
functions/source/RoleChecker
cfnresponse.py
cfnresponse.py
10:48 (100%)
10:48 (100%)
view
26 x 2 templates
templates
ammos-cubs-ait.template.yaml
ammos-cubs-editor.template.yaml
326:351 (7%)
101:126 (9%)
view
26 x 2 templates
templates
ammos-cubs-ait.template.yaml
ammos-cubs-editor.template.yaml
361:386 (7%)
101:126 (9%)
view
24 x 2 templates
templates
ast-iam-roles.template.yaml
ast-iam-roles.template.yaml
173:196 (5%)
217:240 (5%)
view
20 x 2 templates
templates
ammos-config.template.yaml
ammos-cubs-cognito.template.yaml
3:22 (21%)
3:22 (22%)
view
19 x 2 templates
templates
ammos-config.template.yaml
ammos-cubs-logging.template.yaml
4:22 (20%)
27:45 (6%)
view
19 x 2 templates
templates
ammos-cubs-cognito.template.yaml
ammos-cubs-logging.template.yaml
4:22 (21%)
27:45 (6%)
view
15 x 2 templates
templates
ammos-cubs.main.template.yaml
ast-iam-roles.template.yaml
190:204 (2%)
27:41 (3%)
view
15 x 2 templates
templates
ammos-cubs.preconfig.template.yaml
ammos-cubs.testing.template.yaml
88:102 (14%)
292:306 (2%)
view
15 x 2 templates
templates
ammos-cubs.preconfig.template.yaml
ammos-cubs.testing.template.yaml
60:74 (14%)
190:204 (2%)
view
15 x 2 templates
templates
ammos-cubs.main.template.yaml
ammos-cubs.preconfig.template.yaml
190:204 (2%)
60:74 (14%)
view
15 x 2 templates
templates
ammos-cubs.testing.template.yaml
ast-iam-roles.template.yaml
190:204 (2%)
27:41 (3%)
view
15 x 2 templates
templates
ammos-cubs.preconfig.template.yaml
ast-iam-roles.template.yaml
60:74 (14%)
27:41 (3%)
view
14 x 2 templates
templates
ammos-cubs-ait.template.yaml
ammos-cubs-editor.template.yaml
60:73 (3%)
56:69 (5%)
view
14 x 2 templates
templates
ast-iam-roles.template.yaml
ast-iam-roles.template.yaml
245:258 (2%)
268:281 (2%)
view
14 x 2 templates
templates
ast-iam-roles.template.yaml
ast-iam-roles.template.yaml
158:171 (2%)
202:215 (2%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
24 x 2 functions/source/RoleChecker
functions/source/CognitoClientInspect
cfnresponse.py
cfnresponse.py
0:0 
0:0 
view