aws / serverless-application-model
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
  • 29% duplication:
    • 15,900 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,697 duplicated lines
  • 1,293 duplicates
system29% (4,697 lines)
Duplication per Extension
yaml62% (3,538 lines)
py11% (1,127 lines)
yml94% (32 lines)
Duplication per Component (primary)
integration/resources64% (3,503 lines)
samtranslator/model15% (871 lines)
samtranslator/swagger15% (123 lines)
samtranslator/open_api22% (79 lines)
integration/config27% (35 lines)
ROOT26% (32 lines)
samtranslator/intrinsics6% (18 lines)
samtranslator/plugins1% (18 lines)
integration/helpers2% (18 lines)
samtranslator/translator0% (0 lines)
samtranslator0% (0 lines)
samtranslator/feature_toggle0% (0 lines)
samtranslator/validator0% (0 lines)
samtranslator/policy_template_processor0% (0 lines)
samtranslator/policy_templates_data0% (0 lines)
samtranslator/public0% (0 lines)
samtranslator/sdk0% (0 lines)
samtranslator/utils0% (0 lines)
samtranslator/parser0% (0 lines)
samtranslator/metrics0% (0 lines)
integration/single0% (0 lines)
integration0% (0 lines)
integration/combination0% (0 lines)
integration/metrics0% (0 lines)
integration/setup0% (0 lines)

Duplication Between Components (50+ lines)

G samtranslator/open_api samtranslator/open_api samtranslator/swagger samtranslator/swagger samtranslator/open_api--samtranslator/swagger 158

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 1,293 duplicates...
Size#FoldersFilesLinesCode
95 x 2 integration/resources/templates/combination
integration/resources/templates/combination
api_with_authorizers_max.yaml
api_with_authorizers_max_openapi.yaml
1:98 (52%)
4:101 (42%)
view
73 x 2 samtranslator/model
samtranslator/model
function_policies.py
resource_policies.py
29:205 (91%)
29:205 (91%)
view
64 x 2 integration/resources/templates/combination
integration/resources/templates/combination
api_with_authorizers_max.yaml
api_with_authorizers_max_openapi.yaml
100:170 (35%)
113:182 (28%)
view
43 x 2 samtranslator/model/eventsources
samtranslator/model/stepfunctions
push.py
events.py
709:757 (5%)
373:421 (16%)
view
41 x 2 integration/resources/templates/combination
integration/resources/templates/combination
api_with_cors.yaml
api_with_cors_openapi.yaml
1:46 (100%)
1:46 (100%)
view
36 x 2 integration/resources/templates/combination
integration/resources/templates/combination
function_with_all_event_types.yaml
function_with_all_event_types_conditi...
101:142 (29%)
90:131 (31%)
view
35 x 2 integration/resources/templates/combination
integration/resources/templates/combination
api_with_request_models.yaml
api_with_request_models_openapi.yaml
5:41 (89%)
6:42 (87%)
view
35 x 2 integration/resources/templates/combination
integration/resources/templates/combination
function_with_all_event_types.yaml
function_with_all_event_types_conditi...
51:90 (28%)
42:81 (30%)
view
32 x 2 integration/resources/templates/combination
integration/resources/templates/combination
http_api_with_disable_execute_api_end...
http_api_with_disable_execute_api_end...
1:32 (84%)
1:32 (84%)
view
32 x 2 integration/resources/templates/combination
integration/resources/templates/combination
http_api_with_custom_domains_regional...
http_api_with_disable_execute_api_end...
27:58 (56%)
1:32 (84%)
view
32 x 2 integration/resources/templates/combination
integration/resources/templates/combination
http_api_with_custom_domains_regional...
http_api_with_disable_execute_api_end...
27:58 (56%)
1:32 (84%)
view
30 x 2 integration/resources/templates/combination
integration/resources/templates/combination
function_with_custom_code_deploy.yaml
function_with_deployment_basic.yaml
14:45 (75%)
14:45 (75%)
view
30 x 2 integration/resources/templates/combination
integration/resources/templates/combination
function_with_mq.yaml
function_with_mq_using_autogen_role.yaml
49:79 (17%)
49:79 (23%)
view
30 x 2 integration/resources/templates/combination
integration/resources/templates/combination
state_machine_with_cwe_dlq_generated....
state_machine_with_cwe_with_dlq_and_r...
3:32 (52%)
5:34 (50%)
view
30 x 2 integration/resources/templates/combination
integration/resources/templates/combination
function_with_all_event_types.yaml
function_with_all_event_types_conditi...
13:45 (24%)
8:40 (26%)
view
29 x 2 integration/resources/templates/combination
integration/resources/templates/combination
state_machine_with_schedule_dlq_and_r...
state_machine_with_schedule_dlq_gener...
5:34 (50%)
3:32 (52%)
view
29 x 2 integration/resources/templates/combination
integration/resources/templates/combination
state_machine_with_schedule.yaml
state_machine_with_schedule_dlq_gener...
1:31 (69%)
1:31 (52%)
view
28 x 2 integration/resources/templates/combination
integration/resources/templates/combination
function_with_deployment_alarms_and_h...
function_with_deployment_basic.yaml
24:52 (26%)
17:45 (70%)
view
28 x 2 integration/resources/templates/combination
integration/resources/templates/combination
function_with_deployment_basic.yaml
function_with_deployment_disabled.yaml
17:45 (70%)
31:59 (53%)
view
28 x 2 integration/resources/templates/combination
integration/resources/templates/combination
function_with_deployment_disabled.yaml
function_with_deployment_globals.yaml
31:59 (53%)
22:50 (59%)
view
Duplicated Units
The list of top 12 duplicated units.
See data for all 12 unit duplicates...
Size#FoldersFilesLinesCode
24 x 2 samtranslator/model
samtranslator/model
resource_policies.py
function_policies.py
0:0 
0:0 
view
29 x 2 samtranslator/model
samtranslator/model
resource_policies.py
function_policies.py
0:0 
0:0 
view
23 x 2 samtranslator/model
samtranslator/model
resource_policies.py
function_policies.py
0:0 
0:0 
view
11 x 2 samtranslator/model
samtranslator/model
sam_resources.py
sam_resources.py
0:0 
0:0 
view
13 x 2 samtranslator/open_api
samtranslator/swagger
open_api.py
swagger.py
0:0 
0:0 
view
12 x 2 samtranslator/model
samtranslator/model
resource_policies.py
function_policies.py
0:0 
0:0 
view
10 x 2 samtranslator/model
samtranslator/model
resource_policies.py
function_policies.py
0:0 
0:0 
view
10 x 2 samtranslator/open_api
samtranslator/swagger
open_api.py
swagger.py
0:0 
0:0 
view
10 x 2 samtranslator/open_api
samtranslator/swagger
open_api.py
swagger.py
0:0 
0:0 
view
7 x 2 samtranslator/open_api
samtranslator/swagger
open_api.py
swagger.py
0:0 
0:0 
view
10 x 2 samtranslator/model
samtranslator/model
resource_policies.py
function_policies.py
0:0 
0:0 
view
6 x 2 samtranslator/model
samtranslator/model
resource_policies.py
function_policies.py
0:0 
0:0 
view