awslabs / aws-support-tools
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
  • 20% duplication:
    • 7,150 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,462 duplicated lines
  • 45 duplicates
system20% (1,462 lines)
Duplication per Extension
html99% (748 lines)
py17% (570 lines)
ps13% (54 lines)
yaml13% (52 lines)
erb24% (20 lines)
c2% (18 lines)
Duplication per Component (primary)
SES56% (806 lines)
MWAA33% (310 lines)
WAF22% (218 lines)
Systems Manager3% (54 lines)
OpsWorks4% (38 lines)
Connect18% (23 lines)
Lambda4% (7 lines)
SNS4% (6 lines)
EMR0% (0 lines)
Cognito0% (0 lines)
APIGateway0% (0 lines)
Elasticsearch Service0% (0 lines)
EC20% (0 lines)
DataPipeline0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 45 duplicates...
Size#FoldersFilesLinesCode
374 x 2 SES/SESReports/example
SES/SESReports/lambda-dep-package/template
Jul-04-2018-15-42-10.html
begin_new.html
1:414 (99%)
1:414 (99%)
view
80 x 2 WAF/WAF-Enhanced-Replicator
WAF/WAF-Enhanced-Replicator
wafget.py
wafget.py
645:733 (9%)
816:904 (9%)
view
79 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
190:269 (8%)
345:425 (8%)
view
19 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
298:316 (2%)
318:336 (2%)
view
17 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
271:287 (1%)
309:325 (1%)
view
15 x 2 Systems Manager/SSM...SSMAgent-Toolkit/Public
Systems Manager/SSM...SSMAgent-Toolkit/Public
Get-LocalSystemAccountEnvironmentVari...
Get-SystemWideEnvironmentVariablesPro...
29:44 (34%)
28:43 (33%)
view
14 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
292:305 (1%)
432:445 (1%)
view
14 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
429:442 (1%)
447:460 (1%)
view
13 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
266:278 (1%)
284:296 (1%)
view
12 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
542:553 (1%)
552:563 (1%)
view
11 x 2 WAF/WAF-Enhanced-Replicator
WAF/WAF-Enhanced-Replicator
wafget.py
wafget.py
203:213 (1%)
236:246 (1%)
view
11 x 2 SES/SESReports
SES/SESReports
ses-reports.yaml
ses-reports.yaml
317:327 (2%)
333:343 (2%)
view
11 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
292:302 (1%)
450:460 (1%)
view
11 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
280:290 (1%)
438:448 (1%)
view
10 x 2 OpsWorks/sample-cookbook...-ruby/templates/default
OpsWorks/sample-cookbook...-ruby/templates/default
cpulimit.erb
cpulimit.sh.erb
1:10 (17%)
1:10 (40%)
view
9 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
204:212 (<1%)
371:379 (<1%)
view
9 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
216:224 (<1%)
359:367 (<1%)
view
9 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
359:367 (<1%)
371:379 (<1%)
view
9 x 2 MWAA/verify_env
MWAA/verify_env
verify_env.py
verify_env.py
322:330 (<1%)
421:430 (<1%)
view
9 x 2 SES/SESReports
SES/SESReports
ses-reports.yaml
ses-reports.yaml
50:58 (2%)
211:219 (2%)
view