aws-samples / aws-network-firewall-automation-examples
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
  • 64% duplication:
    • 3,400 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,196 duplicated lines
  • 494 duplicates
system64% (2,196 lines)
Duplication per Extension
yaml81% (1,554 lines)
js83% (541 lines)
yml13% (101 lines)
Duplication per Component (primary)
Abuse.ch/cfn-templates77% (459 lines)
SpamHaus/cfn-templates94% (350 lines)
EmergingThreats/cfn-templates86% (314 lines)
TorProject/cfn-templates90% (170 lines)
Abuse.ch/src85% (153 lines)
TLSFingerprint/cnf-templates64% (147 lines)
SpamHaus/src97% (130 lines)
SFTP-FQDN/templates67% (114 lines)
NfwSlackIntegartion/src11% (101 lines)
EmergingThreats/src66% (90 lines)
TLSFingerprint/src78% (67 lines)
TorProject/src95% (65 lines)
SFTP-FQDN/src78% (36 lines)

Duplication Between Components (50+ lines)

G Abuse.ch/cfn-templates Abuse.ch/cfn-templates EmergingThreats/cfn-templates EmergingThreats/cfn-templates Abuse.ch/cfn-templates--EmergingThreats/cfn-templates 597 SpamHaus/cfn-templates SpamHaus/cfn-templates Abuse.ch/cfn-templates--SpamHaus/cfn-templates 493 TorProject/cfn-templates TorProject/cfn-templates Abuse.ch/cfn-templates--TorProject/cfn-templates 385 SFTP-FQDN/templates SFTP-FQDN/templates Abuse.ch/cfn-templates--SFTP-FQDN/templates 306 TLSFingerprint/cnf-templates TLSFingerprint/cnf-templates Abuse.ch/cfn-templates--TLSFingerprint/cnf-templates 286 Abuse.ch/src Abuse.ch/src Abuse.ch/cfn-templates--Abuse.ch/src 284 SpamHaus/src SpamHaus/src Abuse.ch/cfn-templates--SpamHaus/src 63 EmergingThreats/src EmergingThreats/src Abuse.ch/cfn-templates--EmergingThreats/src 135 EmergingThreats/cfn-templates--SpamHaus/cfn-templates 585 EmergingThreats/cfn-templates--TorProject/cfn-templates 403 EmergingThreats/cfn-templates--SFTP-FQDN/templates 243 EmergingThreats/cfn-templates--TLSFingerprint/cnf-templates 180 EmergingThreats/cfn-templates--SpamHaus/src 140 EmergingThreats/cfn-templates--EmergingThreats/src 172 TorProject/src TorProject/src EmergingThreats/cfn-templates--TorProject/src 84 SpamHaus/cfn-templates--TorProject/cfn-templates 462 SpamHaus/cfn-templates--TLSFingerprint/cnf-templates 180 SpamHaus/cfn-templates--SpamHaus/src 224 SpamHaus/cfn-templates--TorProject/src 117 TorProject/cfn-templates--TorProject/src 114 SFTP-FQDN/templates--SpamHaus/cfn-templates 250 SFTP-FQDN/templates--TorProject/cfn-templates 166 SFTP-FQDN/templates--TLSFingerprint/cnf-templates 104 TLSFingerprint/cnf-templates--TorProject/cfn-templates 120 TLSFingerprint/src TLSFingerprint/src TLSFingerprint/cnf-templates--TLSFingerprint/src 126 Abuse.ch/src--EmergingThreats/cfn-templates 157 Abuse.ch/src--SpamHaus/cfn-templates 63 Abuse.ch/src--SpamHaus/src 71 Abuse.ch/src--EmergingThreats/src 152 Abuse.ch/src--TorProject/src 55 SpamHaus/src--TorProject/cfn-templates 117 SpamHaus/src--TorProject/src 141 EmergingThreats/src--SpamHaus/cfn-templates 89 EmergingThreats/src--TorProject/cfn-templates 61 EmergingThreats/src--SpamHaus/src 108 EmergingThreats/src--TorProject/src 76 SFTP-FQDN/src SFTP-FQDN/src SFTP-FQDN/src--SFTP-FQDN/templates 68

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 494 duplicates...
Size#FoldersFilesLinesCode
73 x 2 SpamHaus/cfn-templates
SpamHaus/cfn-templates
SpamHausDropIPFiltering.yaml
SpamHausEDropIPFiltering.yaml
116:202 (39%)
116:202 (39%)
view
54 x 2 SpamHaus/src
SpamHaus/src
SpamHauseDropIPFiltering.js
SpamHauseEDropIPFiltering.js
7:74 (80%)
7:73 (80%)
view
47 x 2 SpamHaus/cfn-templates
TorProject/cfn-templates
SpamHausDropIPFiltering.yaml
TorProjectIPFiltering.yaml
132:187 (25%)
134:189 (25%)
view
47 x 2 SpamHaus/cfn-templates
TorProject/cfn-templates
SpamHausEDropIPFiltering.yaml
TorProjectIPFiltering.yaml
132:187 (25%)
134:189 (25%)
view
42 x 2 SpamHaus/cfn-templates
SpamHaus/cfn-templates
SpamHausDropIPFiltering.yaml
SpamHausEDropIPFiltering.yaml
64:105 (22%)
64:105 (22%)
view
39 x 2 SpamHaus/src
TorProject/src
SpamHauseEDropIPFiltering.js
TorProjectIPFiltering.js
23:72 (58%)
24:73 (57%)
view
39 x 2 SpamHaus/src
TorProject/src
SpamHauseDropIPFiltering.js
TorProjectIPFiltering.js
23:72 (58%)
24:73 (57%)
view
36 x 2 EmergingThreats/cfn-templates
SpamHaus/cfn-templates
EmergingThreatsIPFiltering.yaml
SpamHausDropIPFiltering.yaml
145:189 (19%)
147:192 (19%)
view
36 x 2 EmergingThreats/cfn-templates
SpamHaus/cfn-templates
EmergingThreatsIPFiltering.yaml
SpamHausEDropIPFiltering.yaml
145:189 (19%)
147:192 (19%)
view
35 x 2 Abuse.ch/cfn-templates
Abuse.ch/cfn-templates
AbuseCH.yaml
AbuseCHJA3.yaml
95:129 (15%)
75:109 (18%)
view
34 x 2 SFTP-FQDN/templates
SpamHaus/cfn-templates
SFTP-FQDN.yaml
SpamHausDropIPFiltering.yaml
33:66 (20%)
29:62 (18%)
view
34 x 2 SpamHaus/cfn-templates
TorProject/cfn-templates
SpamHausEDropIPFiltering.yaml
TorProjectIPFiltering.yaml
29:62 (18%)
29:62 (18%)
view
34 x 2 SFTP-FQDN/templates
TorProject/cfn-templates
SFTP-FQDN.yaml
TorProjectIPFiltering.yaml
33:66 (20%)
29:62 (18%)
view
34 x 2 EmergingThreats/cfn-templates
EmergingThreats/cfn-templates
EmergingThreatsBotCC.yaml
EmergingThreatsIPFiltering.yaml
29:62 (19%)
29:62 (18%)
view
34 x 2 EmergingThreats/cfn-templates
SpamHaus/cfn-templates
EmergingThreatsBotCC.yaml
SpamHausEDropIPFiltering.yaml
29:62 (19%)
29:62 (18%)
view
34 x 2 EmergingThreats/cfn-templates
TorProject/cfn-templates
EmergingThreatsIPFiltering.yaml
TorProjectIPFiltering.yaml
29:62 (18%)
29:62 (18%)
view
34 x 2 EmergingThreats/cfn-templates
SpamHaus/cfn-templates
EmergingThreatsIPFiltering.yaml
SpamHausDropIPFiltering.yaml
29:62 (18%)
29:62 (18%)
view
34 x 2 Abuse.ch/cfn-templates
TLSFingerprint/cnf-templates
ANFAbuseHostfile.yaml
TLSFingerprint.yaml
71:104 (18%)
85:118 (14%)
view
34 x 2 EmergingThreats/cfn-templates
SFTP-FQDN/templates
EmergingThreatsIPFiltering.yaml
SFTP-FQDN.yaml
29:62 (18%)
33:66 (20%)
view
34 x 2 SpamHaus/cfn-templates
SpamHaus/cfn-templates
SpamHausDropIPFiltering.yaml
SpamHausEDropIPFiltering.yaml
29:62 (18%)
29:62 (18%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
22 x 2 SpamHaus/src
SpamHaus/src
SpamHauseEDropIPFiltering.js
SpamHauseDropIPFiltering.js
9:32 
9:32 
view
20 x 3 Abuse.ch/src
Abuse.ch/src
EmergingThreats/src
AbuseCHJA3.js
AbuseCH.js
EmergingBotCC.js
9:29 
10:30 
8:28 
view