aws-samples / postgres-lightweight-locks-simulator
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
  • 23% duplication:
    • 2,200 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 520 duplicated lines
  • 42 duplicates
system23% (520 lines)
Duplication per Extension
yaml27% (468 lines)
py13% (52 lines)
Duplication per Component (primary)
k8s-load-simu-setup28% (362 lines)
django_app/logistics/migrations36% (52 lines)
django_app13% (44 lines)
k8s-load-simu-setup/pgbouncer-multi-user53% (34 lines)
spot-sig-handler34% (28 lines)
pybusybox0% (0 lines)
django_app/logistics/templates0% (0 lines)
django_app/logistics0% (0 lines)
django_app/django_app0% (0 lines)

Duplication Between Components (50+ lines)

G k8s-load-simu-setup k8s-load-simu-setup k8s-load-simu-setup/pgbouncer-multi-user k8s-load-simu-setup/pgbouncer-multi-user k8s-load-simu-setup--k8s-load-simu-setup/pgbouncer-multi-user 95 spot-sig-handler spot-sig-handler k8s-load-simu-setup--spot-sig-handler 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 42 duplicates...
Size#FoldersFilesLinesCode
15 x 2 django_app/logistics/migrations
django_app/logistics/migrations
0001_initial.py
0001_initial.py
40:54 (16%)
76:90 (16%)
view
14 x 2 k8s-load-simu-setup
k8s-load-simu-setup
pgbouncer-db-deploy.yaml
pgbouncer-logisitics-deploy.yaml
33:47 (31%)
53:67 (22%)
view
12 x 2 k8s-load-simu-setup
k8s-load-simu-setup/pgbouncer-multi-user
pgbouncer-logisitics-deploy.yaml
pgbouncer-db-10-14-seq-postgres1-depl...
55:67 (19%)
35:47 (26%)
view
12 x 2 k8s-load-simu-setup
k8s-load-simu-setup/pgbouncer-multi-user
pgbouncer-db-deploy.yaml
pgbouncer-db-10-14-seq-postgres1-depl...
35:47 (26%)
35:47 (26%)
view
11 x 2 k8s-load-simu-setup
k8s-load-simu-setup
cwagent-fluentd-quickstart.yaml
cwagent-fluentd-quickstart.yaml
368:378 (1%)
528:538 (1%)
view
11 x 2 k8s-load-simu-setup
k8s-load-simu-setup
pg-io-snapshot-batch.yaml
pg-io-snapshot.yaml
18:28 (37%)
27:37 (30%)
view
11 x 2 django_app/logistics/migrations
django_app/logistics/migrations
0001_initial.py
0003_auto_20211014_0429.py
94:104 (12%)
14:24 (68%)
view
10 x 2 k8s-load-simu-setup
spot-sig-handler
appsimulator.yaml
spot-sig-handler-ds.yaml
6:15 (11%)
6:15 (12%)
view
10 x 2 k8s-load-simu-setup
spot-sig-handler
appsimulator.yaml
spot-sig-handler-ds.yaml
28:37 (11%)
24:33 (12%)
view
9 x 2 k8s-load-simu-setup
k8s-load-simu-setup/pgbouncer-multi-user
pgbouncer-db-svc.yaml
pgbouncer-db-10-14-seq-postgres1-svc....
13:21 (40%)
10:18 (47%)
view
9 x 2 k8s-load-simu-setup
k8s-load-simu-setup
pgbouncer-db-svc.yaml
pgbouncer-logisitics-svc.yaml
13:21 (40%)
10:18 (47%)
view
9 x 2 k8s-load-simu-setup
k8s-load-simu-setup
cwagent-fluentd-quickstart.yaml
cwagent-fluentd-quickstart.yaml
245:254 (1%)
259:268 (1%)
view
9 x 2 k8s-load-simu-setup
k8s-load-simu-setup/pgbouncer-multi-user
pgbouncer-logisitics-svc.yaml
pgbouncer-db-10-14-seq-postgres1-svc....
10:18 (47%)
10:18 (47%)
view
9 x 2 k8s-load-simu-setup
k8s-load-simu-setup
cwagent-fluentd-quickstart.yaml
cwagent-fluentd-quickstart.yaml
321:330 (1%)
351:360 (1%)
view
8 x 2 k8s-load-simu-setup
k8s-load-simu-setup
app-insert.yaml
app-update.yaml
21:28 (21%)
21:28 (21%)
view
8 x 2 k8s-load-simu-setup
k8s-load-simu-setup
cwagent-fluentd-quickstart.yaml
cwagent-fluentd-quickstart.yaml
371:378 (1%)
460:467 (1%)
view
8 x 2 k8s-load-simu-setup
k8s-load-simu-setup
cwagent-fluentd-quickstart.yaml
cwagent-fluentd-quickstart.yaml
385:392 (1%)
423:430 (1%)
view
8 x 2 k8s-load-simu-setup
k8s-load-simu-setup
pgbouncer-db-deploy.yaml
pgbouncer-logisitics-deploy.yaml
16:24 (17%)
20:32 (13%)
view
8 x 2 k8s-load-simu-setup
spot-sig-handler
appsimulator.yaml
spot-sig-handler-ds.yaml
18:25 (8%)
16:23 (9%)
view
8 x 2 k8s-load-simu-setup
k8s-load-simu-setup
cwagent-fluentd-quickstart.yaml
cwagent-fluentd-quickstart.yaml
404:411 (1%)
423:430 (1%)
view