aws-samples / aws-lex-v2-bot-analytics
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
  • 31% duplication:
    • 2,876 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 913 duplicated lines
  • 187 duplicates
system31% (913 lines)
Duplication per Extension
yaml44% (727 lines)
py24% (166 lines)
js3% (20 lines)
Duplication per Component (primary)
ROOT43% (727 lines)
src/lambda_functions/bot_tester55% (132 lines)
src/lambda_functions/banker_bot28% (22 lines)
src/lambda_functions/cw_custom_widget_nodejs/widgets4% (20 lines)
src/lambda_functions/cw_metric_filter_cr5% (6 lines)
src/lambda_functions/resource_name_cfn_cr15% (6 lines)
src/lambda_functions/cw_custom_widget_python/lib0% (0 lines)
src/lambda_functions/cw_custom_widget_python0% (0 lines)
src/lambda_functions/cw_custom_widget_python/widgets0% (0 lines)
src/lambda_functions/cw_custom_widget_nodejs/lib0% (0 lines)
src/lambda_functions/cw_custom_widget_nodejs0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 187 duplicates...
Size#FoldersFilesLinesCode
30 x 2 ROOT
ROOT
template.yaml
template.yaml
668:697 (1%)
716:745 (1%)
view
25 x 2 ROOT
ROOT
template.yaml
template.yaml
444:468 (1%)
535:559 (1%)
view
24 x 2 ROOT
ROOT
template.yaml
template.yaml
1449:1472 (1%)
1485:1508 (1%)
view
23 x 2 ROOT
ROOT
template.yaml
template.yaml
444:466 (1%)
625:647 (1%)
view
23 x 2 ROOT
ROOT
template.yaml
template.yaml
535:557 (1%)
625:647 (1%)
view
21 x 2 ROOT
ROOT
template.yaml
template.yaml
725:745 (1%)
1323:1345 (1%)
view
21 x 2 ROOT
ROOT
template.yaml
template.yaml
481:501 (1%)
571:591 (1%)
view
21 x 2 ROOT
ROOT
template.yaml
template.yaml
390:410 (1%)
571:591 (1%)
view
21 x 2 ROOT
ROOT
template.yaml
template.yaml
390:410 (1%)
481:501 (1%)
view
21 x 2 ROOT
ROOT
template.yaml
template.yaml
677:697 (1%)
1323:1345 (1%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
390:409 (1%)
1324:1345 (1%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
726:745 (1%)
1280:1299 (1%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
571:590 (1%)
1324:1345 (1%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
390:409 (1%)
1280:1299 (1%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
571:590 (1%)
1280:1299 (1%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
571:590 (1%)
726:745 (1%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
571:590 (1%)
678:697 (1%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
678:697 (1%)
1280:1299 (1%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
1280:1299 (1%)
1324:1345 (1%)
view
20 x 2 ROOT
ROOT
template.yaml
template.yaml
481:500 (1%)
1324:1345 (1%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
13 x 2 src/lambda_functions/banker_bot
src/lambda_functions/banker_bot
lambda_function.py
lambda_function.py
0:0 
0:0 
view