aws-samples / aurora-and-database-migration-labs
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
  • 7% duplication:
    • 4,952 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 374 duplicated lines
  • 48 duplicates
system7% (374 lines)
Duplication per Extension
py7% (283 lines)
yml10% (91 lines)
Duplication per Component (primary)
Code/PGPerfStatsSnapper38% (162 lines)
cftemplates/Aurora MySQL16% (83 lines)
Code/Aurora-to-Redshift-SnapshotExport-ELT/python46% (78 lines)
Code/AuroraSLDataAPIDemo/aslbootstrap26% (23 lines)
Code/AuroraSLDataAPIDemo/aslbootstrap/pymysql<1% (20 lines)
Code/PGPerfStatsSnapper/templates2% (8 lines)
Code/AuroraSLDataAPIDemo/amazon-rds-data-api-demo-master/src/main0% (0 lines)
Code/AuroraSLDataAPIDemo/aslbootstrap/pymysql/constants0% (0 lines)
Labs/amazon-rds-purpose-built-workshop/src/ddb-stream-processor0% (0 lines)
Labs/amazon-rds-purpose-built-workshop/src/ddb-python-script0% (0 lines)

Duplication Between Components (50+ lines)

G Code/AuroraSLDataAPIDemo/aslbootstrap Code/AuroraSLDataAPIDemo/aslbootstrap Code/PGPerfStatsSnapper Code/PGPerfStatsSnapper Code/AuroraSLDataAPIDemo/aslbootstrap--Code/PGPerfStatsSnapper 69

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 48 duplicates...
Size#FoldersFilesLinesCode
24 x 2 Code/PGPerfStatsSnapper
Code/PGPerfStatsSnapper
pg_perf_stat_loader.py
pg_perf_stat_snapper.py
65:91 (15%)
73:99 (9%)
view
23 x 2 Code/AuroraSLDataAPIDemo/aslbootstrap
Code/PGPerfStatsSnapper
aslbootstrap.py
pg_perf_stat_snapper.py
66:90 (38%)
73:97 (8%)
view
23 x 2 Code/AuroraSLDataAPIDemo/aslbootstrap
Code/PGPerfStatsSnapper
aslbootstrap.py
pg_perf_stat_loader.py
66:90 (38%)
65:89 (14%)
view
17 x 2 Code/Aurora-to-Redshift-SnapshotExport-ELT/python
Code/Aurora-to-Redshift-SnapshotExport-ELT/python
rds_snap_exp_check_task_status.py
rds_snap_exp_start_task.py
22:46 (41%)
20:45 (28%)
view
16 x 2 Code/Aurora-to-Redshift-SnapshotExport-ELT/python
Code/Aurora-to-Redshift-SnapshotExport-ELT/python
rds_snap_exp_check_snapshot.py
rds_snap_exp_start_task.py
25:46 (34%)
20:41 (27%)
view
16 x 2 Code/Aurora-to-Redshift-SnapshotExport-ELT/python
Code/Aurora-to-Redshift-SnapshotExport-ELT/python
rds_snap_exp_check_snapshot.py
rds_snap_exp_check_task_status.py
25:46 (34%)
22:43 (39%)
view
12 x 2 Code/PGPerfStatsSnapper
Code/PGPerfStatsSnapper
pg_perf_stat_loader.py
pg_perf_stat_snapper.py
96:113 (7%)
106:123 (4%)
view
11 x 2 Code/PGPerfStatsSnapper
Code/PGPerfStatsSnapper
pg_perf_stat_loader.py
pg_perf_stat_snapper.py
19:32 (6%)
20:33 (4%)
view
10 x 2 Code/AuroraSLDataAPIDemo/aslbootstrap/pymysql
Code/AuroraSLDataAPIDemo/aslbootstrap/pymysql
connections.py
cursors.py
1039:1048 (1%)
374:383 (2%)
view
10 x 2 Code/Aurora-to-Redshift-SnapshotExport-ELT/python
Code/Aurora-to-Redshift-SnapshotExport-ELT/python
rds_snap_exp_check_task_status.py
rds_snap_exp_start_task.py
4:17 (24%)
4:17 (16%)
view
10 x 2 Code/PGPerfStatsSnapper
Code/PGPerfStatsSnapper
pg_perf_stat_snapper.py
pg_perf_stat_snapper.py
253:262 (3%)
311:320 (3%)
view
9 x 2 Code/PGPerfStatsSnapper
Code/PGPerfStatsSnapper
pg_perf_stat_loader.py
pg_perf_stat_snapper.py
132:149 (5%)
149:167 (3%)
view
8 x 2 cftemplates/Aurora MySQL
cftemplates/Aurora MySQL
AuroraServerlessDataAPIDemo.yml
AuroraServerlessDataAPIDemo.yml
155:162 (1%)
204:211 (1%)
view
8 x 2 cftemplates/Aurora MySQL
cftemplates/Aurora MySQL
AuroraServerlessDataAPIDemo.yml
AuroraServerlessDataAPIDemo.yml
167:174 (1%)
178:185 (1%)
view
8 x 2 cftemplates/Aurora MySQL
cftemplates/Aurora MySQL
AuroraServerlessDataAPIDemo.yml
AuroraServerlessDataAPIDemo.yml
178:185 (1%)
202:209 (1%)
view
8 x 2 cftemplates/Aurora MySQL
cftemplates/Aurora MySQL
AuroraServerlessDataAPIDemo.yml
AuroraServerlessDataAPIDemo.yml
190:197 (1%)
202:209 (1%)
view
8 x 2 cftemplates/Aurora MySQL
cftemplates/Aurora MySQL
AuroraServerlessDataAPIDemo.yml
AuroraServerlessDataAPIDemo.yml
139:146 (1%)
192:199 (1%)
view
8 x 2 Code/PGPerfStatsSnapper/templates
cftemplates/Aurora MySQL
PG_Snapper.yml
AuroraServerlessDataAPIDemo.yml
90:97 (2%)
348:355 (1%)
view
8 x 2 Code/Aurora-to-Redshift-SnapshotExport-ELT/python
Code/Aurora-to-Redshift-SnapshotExport-ELT/python
rds_snap_exp_check_snapshot.py
rds_snap_exp_check_task_status.py
5:17 (17%)
5:16 (19%)
view
8 x 2 cftemplates/Aurora MySQL
cftemplates/Aurora MySQL
AuroraServerlessDataAPIDemo.yml
AuroraServerlessDataAPIDemo.yml
178:185 (1%)
190:197 (1%)
view