aws-samples / amazon-aurora-call-to-amazon-sagemaker-sample
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
  • 25% duplication:
    • 66,455 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 16,880 duplicated lines
  • 521 duplicates
system25% (16,880 lines)
Duplication per Extension
py24% (16,106 lines)
yaml44% (774 lines)
Duplication per Component (primary)
stk-sample/lambda/stk-player-events-loader-mysql26% (13,923 lines)
stk-sample/lambda/stk-player-events-loader-pg17% (2,183 lines)
stk-sample/eks/aws-load-balancer-controller56% (518 lines)
stk-sample/eks/stk39% (111 lines)
stk-sample/eks25% (81 lines)
stk-sample/eks/spot-sig-handler43% (36 lines)
stk-sample/redshift12% (28 lines)
stk-sample/lambda/stk-player-events-filter0% (0 lines)
stk-sample/ec20% (0 lines)
stk-sample/ec2/ec2_build0% (0 lines)
stk-sample/glue0% (0 lines)
players-encounters0% (0 lines)

Duplication Between Components (50+ lines)

G stk-sample/eks stk-sample/eks stk-sample/eks/stk stk-sample/eks/stk stk-sample/eks--stk-sample/eks/stk 156 stk-sample/eks/spot-sig-handler stk-sample/eks/spot-sig-handler stk-sample/redshift stk-sample/redshift stk-sample/eks/spot-sig-handler--stk-sample/redshift 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 521 duplicates...
Size#FoldersFilesLinesCode
4574 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...er-mysql/package/mysqlx
errorcode.py
errorcode.py
32:4609 (100%)
32:4609 (98%)
view
195 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...er-mysql/package/mysqlx
constants.py
constants.py
800:1049 (24%)
64:313 (93%)
view
161 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...er-mysql/package/mysqlx
charsets.py
charsets.py
32:196 (51%)
32:196 (51%)
view
150 x 2 stk-sample/lambda/stk-pl...e/setuptools/_distutils
stk-sample/lambda/stk-pl...e/setuptools/_distutils
msvc9compiler.py
msvccompiler.py
417:614 (27%)
305:502 (33%)
view
93 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...er-mysql/package/mysqlx
charsets.py
charsets.py
257:349 (29%)
257:349 (29%)
view
71 x 2 stk-sample/lambda/stk-pl...ools/_distutils/command
stk-sample/lambda/stk-pl...kage/setuptools/command
sdist.py
py36compat.py
210:322 (24%)
16:128 (94%)
view
67 x 2 stk-sample/lambda/stk-pl...l/connector/locales/eng
stk-sample/lambda/stk-pl...kage/mysqlx/locales/eng
client_error.py
client_error.py
32:100 (100%)
32:100 (100%)
view
65 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
__init__.py
legacy.py
153:217 (40%)
750:814 (13%)
view
59 x 2 stk-sample/eks
stk-sample/eks/stk
eks-cluster-spec.yaml
eks-x86-cluster-spec.yaml
1:61 (100%)
1:61 (100%)
view
38 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
dbapi.py
legacy.py
713:795 (7%)
543:625 (7%)
view
36 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...er-mysql/package/mysqlx
charsets.py
charsets.py
193:228 (11%)
193:228 (11%)
view
35 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
dbapi.py
native.py
8:42 (7%)
4:38 (16%)
view
35 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...er-mysql/package/mysqlx
charsets.py
charsets.py
226:260 (11%)
226:260 (11%)
view
33 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
legacy.py
native.py
639:673 (6%)
83:117 (15%)
view
31 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
__init__.py
dbapi.py
102:150 (19%)
188:236 (6%)
view
31 x 2 stk-sample/lambda/stk-pl...e/setuptools/_distutils
stk-sample/lambda/stk-pl...ysql/package/setuptools
dist.py
dist.py
873:913 (4%)
613:656 (4%)
view
31 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
dbapi.py
legacy.py
188:236 (6%)
112:160 (6%)
view
31 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
__init__.py
legacy.py
102:150 (19%)
112:160 (6%)
view
29 x 2 stk-sample/lambda/stk-pl...e/setuptools/_distutils
stk-sample/lambda/stk-pl...e/setuptools/_distutils
msvc9compiler.py
msvccompiler.py
739:788 (5%)
536:585 (6%)
view
29 x 2 stk-sample/eks/aws-load-balancer-controller
stk-sample/eks/aws-load-balancer-controller
v2_3_0_full.yaml
v2_3_0_full.yaml
207:235 (3%)
349:377 (3%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 60 unit duplicates...
Size#FoldersFilesLinesCode
75 x 2 stk-sample/lambda/stk-pl...e/setuptools/_distutils
stk-sample/lambda/stk-pl...e/setuptools/_distutils
msvccompiler.py
msvc9compiler.py
0:0 
0:0 
view
28 x 2 stk-sample/lambda/stk-pl...e/setuptools/_distutils
stk-sample/lambda/stk-pl...e/setuptools/_distutils
msvccompiler.py
msvc9compiler.py
0:0 
0:0 
view
20 x 2 stk-sample/lambda/stk-pl...e/setuptools/_distutils
stk-sample/lambda/stk-pl...e/setuptools/_distutils
msvccompiler.py
msvc9compiler.py
0:0 
0:0 
view
18 x 2 stk-sample/lambda/stk-pl...ools/_distutils/command
stk-sample/lambda/stk-pl...kage/setuptools/command
sdist.py
py36compat.py
0:0 
0:0 
view
17 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...package/mysql/connector
cursor.py
abstracts.py
0:0 
0:0 
view
28 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
legacy.py
dbapi.py
0:0 
0:0 
view
21 x 2 stk-sample/lambda/stk-pl...r-pg/package/asn1crypto
stk-sample/lambda/stk-pl...r-pg/package/asn1crypto
core.py
core.py
0:0 
0:0 
view
24 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...package/mysql/connector
abstracts.py
connection.py
0:0 
0:0 
view
19 x 2 stk-sample/lambda/stk-pl...ysql/package/setuptools
stk-sample/lambda/stk-pl...e/setuptools/_distutils
__init__.py
cmd.py
0:0 
0:0 
view
22 x 2 stk-sample/lambda/stk-pl...e/setuptools/_distutils
stk-sample/lambda/stk-pl...e/setuptools/_distutils
msvccompiler.py
msvc9compiler.py
0:0 
0:0 
view
14 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...package/mysql/connector
cursor.py
abstracts.py
0:0 
0:0 
view
15 x 2 stk-sample/lambda/stk-pl...e/setuptools/_distutils
stk-sample/lambda/stk-pl...e/setuptools/_distutils
msvccompiler.py
msvc9compiler.py
0:0 
0:0 
view
14 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
legacy.py
dbapi.py
0:0 
0:0 
view
28 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
legacy.py
dbapi.py
0:0 
0:0 
view
13 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...package/mysql/connector
cursor.py
abstracts.py
0:0 
0:0 
view
15 x 2 stk-sample/lambda/stk-pl...ysql/package/setuptools
stk-sample/lambda/stk-pl...kage/setuptools/command
package_index.py
build_py.py
0:0 
0:0 
view
15 x 2 stk-sample/lambda/stk-pl...ools/_distutils/command
stk-sample/lambda/stk-pl...kage/setuptools/command
sdist.py
py36compat.py
0:0 
0:0 
view
12 x 3 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
legacy.py
__init__.py
dbapi.py
0:0 
0:0 
0:0 
view
12 x 2 stk-sample/lambda/stk-pl...oader-pg/package/pg8000
stk-sample/lambda/stk-pl...oader-pg/package/pg8000
legacy.py
dbapi.py
0:0 
0:0 
view
11 x 2 stk-sample/lambda/stk-pl...package/mysql/connector
stk-sample/lambda/stk-pl...package/mysql/connector
cursor.py
abstracts.py
0:0 
0:0 
view