aws-samples / aws-waf-dashboard
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
  • 11% duplication:
    • 26,700 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,075 duplicated lines
  • 249 duplicates
system11% (3,075 lines)
Duplication per Extension
py11% (2,973 lines)
yaml19% (102 lines)
Duplication per Component (primary)
cloudformation-custom-resources/kibana-customizer-lambda/urllib312% (836 lines)
cloudformation-custom-resources/kibana-customizer-lambda/requests_aws4auth63% (606 lines)
cloudformation-custom-resources/kibana-customizer-lambda/chardet10% (479 lines)
cloudformation-custom-resources/kibana-customizer-lambda/crhelper99% (328 lines)
cloudformation-custom-resources/domain-setter-lambda/crhelper99% (328 lines)
cloudformation-custom-resources/es-cognito-auth-lambda/crhelper99% (328 lines)
ROOT19% (102 lines)
cloudformation-custom-resources/es-cognito-auth-lambda36% (20 lines)
cloudformation-custom-resources/domain-setter-lambda43% (18 lines)
cloudformation-custom-resources/kibana-customizer-lambda12% (16 lines)
cloudformation-custom-resources/kibana-customizer-lambda/requests<1% (14 lines)
cloudformation-custom-resources/kibana-customizer-lambda/idna0% (0 lines)
cloudformation-custom-resources/kibana-customizer-lambda/certifi0% (0 lines)
cloudformation-custom-resources0% (0 lines)

Duplication Between Components (50+ lines)

G cloudformation-custom-resources/kibana-customizer-lambda/requests_aws4auth cloudformation-custom-resources/kibana-customizer-lambda/requests_aws4auth cloudformation-custom-resources/kibana-customizer-lambda/urllib3 cloudformation-custom-resources/kibana-customizer-lambda/urllib3 cloudformation-custom-resources/kibana-customizer-lambda/requests_aws4auth--cloudformation-custom-resources/kibana-customizer-lambda/urllib3 1212 cloudformation-custom-resources/domain-setter-lambda/crhelper cloudformation-custom-resources/domain-setter-lambda/crhelper cloudformation-custom-resources/es-cognito-auth-lambda/crhelper cloudformation-custom-resources/es-cognito-auth-lambda/crhelper cloudformation-custom-resources/domain-setter-lambda/crhelper--cloudformation-custom-resources/es-cognito-auth-lambda/crhelper 656 cloudformation-custom-resources/kibana-customizer-lambda/crhelper cloudformation-custom-resources/kibana-customizer-lambda/crhelper cloudformation-custom-resources/domain-setter-lambda/crhelper--cloudformation-custom-resources/kibana-customizer-lambda/crhelper 656 cloudformation-custom-resources/es-cognito-auth-lambda/crhelper--cloudformation-custom-resources/kibana-customizer-lambda/crhelper 656

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 249 duplicates...
Size#FoldersFilesLinesCode
606 x 2 cloudformation-custom-re...ambda/requests_aws4auth
cloudformation-custom-re...lambda/urllib3/packages
six.py
six.py
31:868 (100%)
31:868 (100%)
view
259 x 2 cloudformation-custom-re...-setter-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
resource_helper.py
resource_helper.py
21:318 (100%)
21:318 (100%)
view
259 x 2 cloudformation-custom-re...-setter-lambda/crhelper
cloudformation-custom-re...tomizer-lambda/crhelper
resource_helper.py
resource_helper.py
21:318 (100%)
21:318 (100%)
view
259 x 2 cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...tomizer-lambda/crhelper
resource_helper.py
resource_helper.py
21:318 (100%)
21:318 (100%)
view
49 x 2 cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...tomizer-lambda/crhelper
log_helper.py
log_helper.py
6:83 (100%)
6:83 (100%)
view
49 x 2 cloudformation-custom-re...-setter-lambda/crhelper
cloudformation-custom-re...tomizer-lambda/crhelper
log_helper.py
log_helper.py
6:83 (100%)
6:83 (100%)
view
49 x 2 cloudformation-custom-re...-setter-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
log_helper.py
log_helper.py
6:83 (100%)
6:83 (100%)
view
20 x 2 cloudformation-custom-re...-setter-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
utils.py
utils.py
7:28 (100%)
7:28 (100%)
view
20 x 2 cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...tomizer-lambda/crhelper
utils.py
utils.py
7:28 (100%)
7:28 (100%)
view
20 x 2 cloudformation-custom-re...-setter-lambda/crhelper
cloudformation-custom-re...tomizer-lambda/crhelper
utils.py
utils.py
7:28 (100%)
7:28 (100%)
view
18 x 2 cloudformation-custom-re...stomizer-lambda/chardet
cloudformation-custom-re...stomizer-lambda/chardet
eucjpprober.py
sjisprober.py
52:71 (37%)
52:70 (36%)
view
15 x 2 cloudformation-custom-re...stomizer-lambda/chardet
cloudformation-custom-re...stomizer-lambda/chardet
eucjpprober.py
mbcharsetprober.py
56:71 (31%)
61:75 (32%)
view
15 x 2 cloudformation-custom-re...stomizer-lambda/chardet
cloudformation-custom-re...stomizer-lambda/chardet
mbcharsetprober.py
sjisprober.py
61:75 (32%)
56:70 (30%)
view
14 x 2 cloudformation-custom-re...stomizer-lambda/chardet
cloudformation-custom-re...stomizer-lambda/chardet
mbcssm.py
mbcssm.py
33:46 (2%)
340:353 (2%)
view
12 x 2 cloudformation-custom-re...stomizer-lambda/chardet
cloudformation-custom-re...stomizer-lambda/chardet
eucjpprober.py
sjisprober.py
77:92 (25%)
77:92 (24%)
view
12 x 2 ROOT
ROOT
waf-dashboard.yaml.yaml
waf-dashboard.yaml.yaml
62:73 (2%)
446:457 (2%)
view
12 x 2 cloudformation-custom-re...stomizer-lambda/chardet
cloudformation-custom-re...stomizer-lambda/chardet
mbcssm.py
mbcssm.py
393:404 (2%)
448:459 (2%)
view
11 x 2 cloudformation-custom-re...stomizer-lambda/chardet
cloudformation-custom-re...stomizer-lambda/chardet
langcyrillicmodel.py
langcyrillicmodel.py
50:60 (3%)
69:79 (3%)
view
11 x 2 cloudformation-custom-re...stomizer-lambda/chardet
cloudformation-custom-re...stomizer-lambda/chardet
escsm.py
escsm.py
95:105 (5%)
150:160 (5%)
view
11 x 2 cloudformation-custom-re...stomizer-lambda/chardet
cloudformation-custom-re...stomizer-lambda/chardet
escsm.py
escsm.py
95:105 (5%)
206:216 (5%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 29 unit duplicates...
Size#FoldersFilesLinesCode
51 x 2 cloudformation-custom-re...ambda/requests_aws4auth
cloudformation-custom-re...lambda/urllib3/packages
six.py
six.py
0:0 
0:0 
view
37 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
resource_helper.py
resource_helper.py
resource_helper.py
0:0 
0:0 
0:0 
view
29 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
log_helper.py
log_helper.py
log_helper.py
0:0 
0:0 
0:0 
view
24 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
resource_helper.py
resource_helper.py
resource_helper.py
0:0 
0:0 
0:0 
view
20 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
resource_helper.py
resource_helper.py
resource_helper.py
0:0 
0:0 
0:0 
view
18 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
utils.py
utils.py
utils.py
0:0 
0:0 
0:0 
view
16 x 2 cloudformation-custom-re...ambda/requests_aws4auth
cloudformation-custom-re...lambda/urllib3/packages
six.py
six.py
0:0 
0:0 
view
16 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
resource_helper.py
resource_helper.py
resource_helper.py
0:0 
0:0 
0:0 
view
16 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
resource_helper.py
resource_helper.py
resource_helper.py
0:0 
0:0 
0:0 
view
15 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
resource_helper.py
resource_helper.py
resource_helper.py
0:0 
0:0 
0:0 
view
13 x 2 cloudformation-custom-re...ambda/requests_aws4auth
cloudformation-custom-re...lambda/urllib3/packages
six.py
six.py
0:0 
0:0 
view
14 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
resource_helper.py
resource_helper.py
resource_helper.py
0:0 
0:0 
0:0 
view
12 x 2 cloudformation-custom-re...ambda/requests_aws4auth
cloudformation-custom-re...lambda/urllib3/packages
six.py
six.py
0:0 
0:0 
view
12 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
resource_helper.py
resource_helper.py
resource_helper.py
0:0 
0:0 
0:0 
view
10 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
log_helper.py
log_helper.py
log_helper.py
0:0 
0:0 
0:0 
view
10 x 2 cloudformation-custom-re...ambda/requests_aws4auth
cloudformation-custom-re...lambda/urllib3/packages
six.py
six.py
0:0 
0:0 
view
9 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
resource_helper.py
resource_helper.py
resource_helper.py
0:0 
0:0 
0:0 
view
9 x 3 cloudformation-custom-re...tomizer-lambda/crhelper
cloudformation-custom-re...to-auth-lambda/crhelper
cloudformation-custom-re...-setter-lambda/crhelper
log_helper.py
log_helper.py
log_helper.py
0:0 
0:0 
0:0 
view
14 x 2 cloudformation-custom-re...ambda/requests_aws4auth
cloudformation-custom-re...lambda/urllib3/packages
six.py
six.py
0:0 
0:0 
view
9 x 2 cloudformation-custom-re...ambda/requests_aws4auth
cloudformation-custom-re...lambda/urllib3/packages
six.py
six.py
0:0 
0:0 
view