aws-samples / amazon-workmail-lambda-templates
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
  • 38% duplication:
    • 2,294 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 882 duplicated lines
  • 131 duplicates
system38% (882 lines)
Duplication per Extension
yaml48% (500 lines)
py32% (382 lines)
Duplication per Component (primary)
workmail-save-and-update-email58% (195 lines)
workmail-update-email70% (169 lines)
workmail-translate-email54% (139 lines)
workmail-salesforce-python31% (117 lines)
workmail-hello-world-python53% (76 lines)
workmail-restricted-mailboxes-python32% (53 lines)
workmail-wordpress-python32% (49 lines)
workmail-chat-bot-python19% (29 lines)
workmail-upstream-gateway-filter19% (21 lines)
workmail-ws1-integration9% (20 lines)
workmail-stop-mail-storm8% (14 lines)

Duplication Between Components (50+ lines)

G workmail-save-and-update-email workmail-save-and-update-email workmail-update-email workmail-update-email workmail-save-and-update-email--workmail-update-email 351 workmail-translate-email workmail-translate-email workmail-save-and-update-email--workmail-translate-email 255 workmail-translate-email--workmail-update-email 236 workmail-wordpress-python workmail-wordpress-python workmail-translate-email--workmail-wordpress-python 70 workmail-hello-world-python workmail-hello-world-python workmail-hello-world-python--workmail-update-email 56 workmail-hello-world-python--workmail-translate-email 56 workmail-salesforce-python workmail-salesforce-python workmail-hello-world-python--workmail-salesforce-python 150 workmail-salesforce-python--workmail-save-and-update-email 99 workmail-salesforce-python--workmail-update-email 108 workmail-salesforce-python--workmail-translate-email 126 workmail-salesforce-python--workmail-wordpress-python 52 workmail-chat-bot-python workmail-chat-bot-python workmail-chat-bot-python--workmail-wordpress-python 56

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 131 duplicates...
Size#FoldersFilesLinesCode
43 x 2 workmail-hello-world-python
workmail-salesforce-python
template.yaml
template.yaml
56:103 (43%)
80:127 (34%)
view
27 x 2 workmail-save-and-update-email
workmail-update-email
template.yaml
template.yaml
71:97 (15%)
45:71 (22%)
view
25 x 2 workmail-save-and-update-email
workmail-update-email
template.yaml
template.yaml
106:131 (14%)
79:104 (20%)
view
23 x 2 workmail-hello-world-python
workmail-salesforce-python
template.yaml
template.yaml
32:54 (23%)
47:69 (18%)
view
22 x 2 workmail-translate-email
workmail-update-email
template.yaml
template.yaml
74:95 (19%)
83:104 (18%)
view
22 x 2 workmail-save-and-update-email
workmail-translate-email
template.yaml
template.yaml
110:131 (12%)
74:95 (19%)
view
18 x 2 workmail-save-and-update-email
workmail-save-and-update-email
template.yaml
template.yaml
110:127 (10%)
134:151 (10%)
view
18 x 2 workmail-save-and-update-email
workmail-translate-email
template.yaml
template.yaml
134:151 (10%)
74:91 (15%)
view
18 x 2 workmail-translate-email/src
workmail-update-email/src
app.py
app.py
77:97 (56%)
74:94 (60%)
view
18 x 2 workmail-save-and-update-email/src
workmail-update-email/src
app.py
app.py
104:124 (35%)
74:94 (60%)
view
18 x 2 workmail-save-and-update-email
workmail-update-email
template.yaml
template.yaml
134:151 (10%)
83:100 (14%)
view
18 x 2 workmail-save-and-update-email/src
workmail-translate-email/src
app.py
app.py
104:124 (35%)
77:97 (56%)
view
16 x 2 workmail-salesforce-python/src
workmail-translate-email/src
email_utils.py
utils.py
24:41 (23%)
81:112 (16%)
view
16 x 2 workmail-chat-bot-python/src
workmail-translate-email/src
utils.py
utils.py
58:76 (40%)
96:113 (16%)
view
15 x 2 workmail-chat-bot-python/src
workmail-salesforce-python/src
utils.py
email_utils.py
58:75 (37%)
25:41 (21%)
view
15 x 2 workmail-save-and-update-email
workmail-update-email
template.yaml
template.yaml
159:173 (8%)
106:120 (12%)
view
15 x 2 workmail-upstream-gateway-filter
workmail-wordpress-python
template.yaml
template.yaml
35:49 (26%)
34:48 (21%)
view
15 x 2 workmail-salesforce-python/src
workmail-update-email/src
email_utils.py
utils.py
72:87 (21%)
146:175 (16%)
view
14 x 2 workmail-save-and-update-email
workmail-wordpress-python
template.yaml
template.yaml
71:84 (8%)
34:47 (20%)
view
14 x 2 workmail-restricted-mailboxes-python
workmail-translate-email
template.yaml
template.yaml
41:54 (22%)
34:47 (12%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
32 x 2 workmail-chat-bot-python/src
workmail-wordpress-python/src
utils.py
utils.py
0:0 
0:0 
view
21 x 3 workmail-save-and-update-email/src
workmail-restricted-mailboxes-python/src
workmail-translate-email/src
utils.py
utils.py
utils.py
0:0 
0:0 
0:0 
view
20 x 3 workmail-update-email/src
workmail-save-and-update-email/src
workmail-translate-email/src
utils.py
utils.py
utils.py
0:0 
0:0 
0:0 
view
15 x 2 workmail-update-email/src
workmail-save-and-update-email/src
utils.py
utils.py
0:0 
0:0 
view