awslabs / scale-out-computing-on-aws
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
  • 17% duplication:
    • 31,016 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 5,454 duplicated lines
  • 806 duplicates
system17% (5,454 lines)
Duplication per Extension
py20% (2,491 lines)
html40% (1,690 lines)
css8% (1,261 lines)
yml5% (12 lines)
Duplication per Component (primary)
source/soca/cluster_web_ui/templates40% (1,690 lines)
source/soca/cluster_web_ui/static8% (1,261 lines)
source/soca/cluster_web_ui/api40% (1,206 lines)
source/soca/cluster_manager15% (434 lines)
source/soca/cluster_web_ui/views15% (267 lines)
source/soca/cluster_web_ui/scheduled_tasks26% (120 lines)
source/soca/cluster_web_ui13% (104 lines)
source/soca/cluster_analytics23% (90 lines)
source/soca/cluster_hooks/queuejob25% (79 lines)
installer/resources/src3% (72 lines)
installer/resources/functions/TagEC2ResourceLambda58% (28 lines)
installer/resources/functions/CreateELBSSLCertificate43% (28 lines)
installer/resources/functions/GetESPrivateIPLambda42% (28 lines)
source/soca/cluster_hooks20% (22 lines)
installer/resources/functions/SolutionMetricsLambda14% (13 lines)
installer7% (12 lines)
source/soca/cluster_manager/settings0% (0 lines)
source/soca/cluster_manager/utilities0% (0 lines)
source/soca/cluster_analytics/metricbeat0% (0 lines)
source/scripts0% (0 lines)
ROOT0% (0 lines)
installer/resources/functions/ResetDSPassword0% (0 lines)
installer/resources/functions/EFSThroughputLambda0% (0 lines)

Duplication Between Components (50+ lines)

G source/soca/cluster_manager source/soca/cluster_manager source/soca/cluster_web_ui/api source/soca/cluster_web_ui/api source/soca/cluster_manager--source/soca/cluster_web_ui/api 224 source/soca/cluster_web_ui/views source/soca/cluster_web_ui/views source/soca/cluster_web_ui/api--source/soca/cluster_web_ui/views 120 source/soca/cluster_analytics source/soca/cluster_analytics source/soca/cluster_analytics--source/soca/cluster_manager 85 source/soca/cluster_analytics--source/soca/cluster_web_ui/api 64 installer/resources/functions/CreateELBSSLCertificate installer/resources/functions/CreateELBSSLCertificate installer/resources/functions/TagEC2ResourceLambda installer/resources/functions/TagEC2ResourceLambda installer/resources/functions/CreateELBSSLCertificate--installer/resources/functions/TagEC2ResourceLambda 56 installer/resources/functions/GetESPrivateIPLambda installer/resources/functions/GetESPrivateIPLambda installer/resources/functions/CreateELBSSLCertificate--installer/resources/functions/GetESPrivateIPLambda 56 installer/resources/functions/GetESPrivateIPLambda--installer/resources/functions/TagEC2ResourceLambda 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 806 duplicates...
Size#FoldersFilesLinesCode
78 x 2 source/soca/cluster_manager
source/soca/cluster_web_ui/api/v1/dcv
cloudformation_builder.py
create_linux_desktop.py
137:247 (18%)
282:392 (22%)
view
64 x 2 source/soca/cluster_web_ui/static/css
source/soca/cluster_web_ui/static/css
app.css
app.css
11527:11590 (<1%)
11593:11656 (<1%)
view
64 x 2 source/soca/cluster_web_ui/static/css
source/soca/cluster_web_ui/static/css
app.css
app.css
11672:11735 (<1%)
11738:11801 (<1%)
view
60 x 2 source/soca/cluster_web_ui/templates
source/soca/cluster_web_ui/templates
remote_desktop.html
remote_desktop_windows.html
110:187 (13%)
110:187 (15%)
view
42 x 2 source/soca/cluster_web_ui/templates
source/soca/cluster_web_ui/templates
remote_desktop.html
remote_desktop_windows.html
390:448 (9%)
294:352 (10%)
view
38 x 2 source/soca/cluster_web_ui/api/v1/dcv
source/soca/cluster_web_ui/api/v1/dcv
create_linux_desktop.py
create_windows_desktop.py
40:82 (11%)
42:84 (14%)
view
37 x 2 source/soca/cluster_web_ui/templates
source/soca/cluster_web_ui/templates
remote_desktop.html
remote_desktop_windows.html
578:636 (8%)
483:542 (9%)
view
33 x 2 source/soca/cluster_web_ui/templates/admin
source/soca/cluster_web_ui/templates/admin
ami_management.html
queues.html
1:38 (28%)
1:41 (15%)
view
33 x 2 source/soca/cluster_web_ui/templates
source/soca/cluster_web_ui/templates
my_activity.html
my_jobs.html
1:41 (56%)
1:41 (25%)
view
31 x 2 source/soca/cluster_web_ui/templates
source/soca/cluster_web_ui/templates
remote_desktop.html
remote_desktop_windows.html
227:265 (6%)
227:265 (7%)
view
31 x 2 source/soca/cluster_web_ui/templates
source/soca/cluster_web_ui/templates
remote_desktop.html
remote_desktop_windows.html
70:108 (6%)
70:108 (7%)
view
30 x 2 source/soca/cluster_web_ui/templates
source/soca/cluster_web_ui/templates
my_jobs.html
submit_job.html
1:38 (23%)
1:38 (42%)
view
30 x 2 source/soca/cluster_web_ui/templates/admin
source/soca/cluster_web_ui/templates/admin
groups.html
users.html
1:38 (20%)
1:37 (16%)
view
30 x 2 source/soca/cluster_web_...v1/ldap/activedirectory
source/soca/cluster_web_ui/api/v1/ldap/openldap
group.py
group.py
216:276 (14%)
192:252 (18%)
view
30 x 2 source/soca/cluster_web_ui/templates
source/soca/cluster_web_ui/templates
my_activity.html
submit_job.html
1:38 (51%)
1:38 (42%)
view
29 x 2 source/soca/cluster_web_...v1/ldap/activedirectory
source/soca/cluster_web_ui/api/v1/ldap/openldap
user.py
user.py
39:74 (12%)
37:73 (13%)
view
29 x 2 source/soca/cluster_web_ui/templates
source/soca/cluster_web_ui/templates
configuration.html
editor.html
1:38 (38%)
1:38 (36%)
view
28 x 2 installer/resources/func...CreateELBSSLCertificate
installer/resources/functions/TagEC2ResourceLambda
cfnresponse.py
cfnresponse.py
8:47 (100%)
8:47 (100%)
view
28 x 2 installer/resources/func...CreateELBSSLCertificate
installer/resources/functions/GetESPrivateIPLambda
cfnresponse.py
cfnresponse.py
8:47 (100%)
8:47 (100%)
view
28 x 2 installer/resources/functions/GetESPrivateIPLambda
installer/resources/functions/TagEC2ResourceLambda
cfnresponse.py
cfnresponse.py
8:47 (100%)
8:47 (100%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
28 x 2 source/soca/cluster_web_ui/api/v1/dcv
source/soca/cluster_web_ui/api/v1/dcv
create_windows_desktop.py
create_linux_desktop.py
0:0 
0:0 
view
24 x 3 installer/resources/functions/TagEC2ResourceLambda
installer/resources/functions/GetESPrivateIPLambda
installer/resources/func...CreateELBSSLCertificate
cfnresponse.py
cfnresponse.py
cfnresponse.py
0:0 
0:0 
0:0 
view