aws-solutions / aws-devops-monitoring-dashboard
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
  • 13% duplication:
    • 3,350 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 459 duplicated lines
  • 35 duplicates
system13% (459 lines)
Duplication per Extension
ts11% (182 lines)
py15% (150 lines)
js14% (127 lines)
Duplication per Component (primary)
source/lambda/quicksight-custom-resources15% (150 lines)
source/lambda/event_parser31% (95 lines)
source/lib/events30% (74 lines)
source/lib11% (52 lines)
source/lib/quicksight-custom-resources15% (35 lines)
source/lambda/query_runner6% (32 lines)
source/lib/database5% (12 lines)
source/lib/solution-helper13% (9 lines)
source/lib/deployment-helper0% (0 lines)
source0% (0 lines)
source/lambda/solution_helper0% (0 lines)
deployment/cdk-solution-helper0% (0 lines)

Duplication Between Components (50+ lines)

G source/lib source/lib source/lib/events source/lib/events source/lib--source/lib/events 104

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 35 duplicates...
Size#FoldersFilesLinesCode
20 x 2 source/lib
source/lib/events
aws_devops_monitoring_dashboard_stack.ts
code_build_events_construct.ts
340:363 (4%)
127:150 (13%)
view
18 x 2 source/lambda/quicksight-custom-resources
source/lambda/quicksight-custom-resources
lambda_function.py
lambda_function.py
56:73 (15%)
138:157 (15%)
view
17 x 2 source/lambda/quicksight-custom-resources
source/lambda/quicksight-custom-resources
lambda_function.py
lambda_function.py
86:103 (15%)
117:135 (15%)
view
14 x 2 source/lambda/event_parser/lib
source/lambda/query_runner/lib
logger.js
logger.js
19:38 (100%)
19:38 (100%)
view
13 x 2 source/lib/quicksight-custom-resources
source/lib/quicksight-custom-resources
quicksight-construct.ts
quicksight-stack.ts
1:13 (10%)
1:13 (12%)
view
12 x 2 source/lambda/quicksight-custom-resources/util
source/lambda/quicksight-custom-resources/util
template.py
template.py
54:67 (11%)
76:89 (11%)
view
10 x 2 source/lib
source/lib/events
aws_devops_monitoring_dashboard_stack.ts
code_build_events_construct.ts
214:225 (2%)
100:111 (6%)
view
10 x 2 source/lib
source/lib/events
aws_devops_monitoring_dashboard_stack.ts
code_build_events_construct.ts
312:325 (2%)
76:89 (6%)
view
9 x 2 source/lib
source/lib/solution-helper
aws_devops_monitoring_dashboard_stack.ts
solution-helper-construct.ts
313:325 (1%)
50:62 (20%)
view
9 x 2 source/lib/quicksight-custom-resources
source/lib/solution-helper
quicksight-construct.ts
solution-helper-construct.ts
110:122 (7%)
50:62 (20%)
view
9 x 2 source/lib/events
source/lib/solution-helper
code_build_events_construct.ts
solution-helper-construct.ts
77:89 (6%)
50:62 (20%)
view
9 x 2 source/lib
source/lib/quicksight-custom-resources
aws_devops_monitoring_dashboard_stack.ts
quicksight-construct.ts
313:325 (1%)
110:122 (7%)
view
9 x 2 source/lambda/quicksight-custom-resources/util
source/lambda/quicksight-custom-resources/util
analysis.py
dashboard.py
29:39 (15%)
32:42 (13%)
view
9 x 2 source/lib/events
source/lib/quicksight-custom-resources
code_build_events_construct.ts
quicksight-construct.ts
77:89 (6%)
110:122 (7%)
view
8 x 2 source/lambda/event_parser
source/lambda/event_parser
codedeploy_events.js
codepipeline_events.js
30:41 (30%)
30:41 (20%)
view
8 x 2 source/lib/events
source/lib/events
code_deploy_events_construct.ts
code_pipeline_events_construct.ts
37:46 (29%)
37:46 (29%)
view
7 x 2 source/lambda/quicksight-custom-resources/util
source/lambda/quicksight-custom-resources/util
dataset.py
datasource.py
83:91 (8%)
75:83 (10%)
view
7 x 2 source/lambda/event_parser
source/lambda/event_parser
codebuild_index.js
index.js
47:53 (19%)
67:73 (13%)
view
7 x 2 source/lambda/event_parser
source/lambda/event_parser
codedeploy_events.js
synthetic_canary_alarm_events.js
35:45 (26%)
41:51 (16%)
view
6 x 2 source/lambda/query_runner
source/lambda/query_runner
add_athena_partition.js
index.js
105:114 (5%)
152:161 (5%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
8 x 2 source/lambda/event_parser/lib
source/lambda/query_runner/lib
logger.js
logger.js
22:30 
22:30 
view