aws-samples / aws-database-migration-samples
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
  • 15% duplication:
    • 962 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 148 duplicated lines
  • 9 duplicates
system15% (148 lines)
Duplication per Extension
vw87% (112 lines)
rb5% (36 lines)
Duplication per Component (primary)
mysql/sampledb/v1/schema96% (58 lines)
mongodb/sampledb/v1/schema5% (36 lines)
sqlserver/sampledb/v1/schema88% (30 lines)
oracle/sampledb/v1/schema15% (24 lines)
mongodb/sampledb/v1/user0% (0 lines)
mongodb/sampledb/v1/scripts0% (0 lines)

Duplication Between Components (50+ lines)

G mysql/sampledb/v1/schema mysql/sampledb/v1/schema sqlserver/sampledb/v1/schema sqlserver/sampledb/v1/schema mysql/sampledb/v1/schema--sqlserver/sampledb/v1/schema 60

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 9 longest duplicates.
See data for all 9 duplicates...
Size#FoldersFilesLinesCode
18 x 2 mysql/sampledb/v1/schema
sqlserver/sampledb/v1/schema
vw
sporting_event_ticket_info.vw
ticket_info.vw
20:37 (54%)
2:19 (94%)
view
14 x 2 oracle/sampledb/v1/schema
sqlserver/sampledb/v1/schema
vw
ticket_info.vw
ticket_info.vw
18:31 (66%)
3:16 (73%)
view
14 x 2 mysql/sampledb/v1/schema
mysql/sampledb/v1/schema
vw
sporting_event_info.vw
sporting_event_ticket_info.vw
1:14 (51%)
1:14 (42%)
view
14 x 2 mysql/sampledb/v1/schema
oracle/sampledb/v1/schema
vw
sporting_event_ticket_info.vw
ticket_info.vw
21:34 (42%)
18:31 (66%)
view
12 x 2 mysql/sampledb/v1/schema
sqlserver/sampledb/v1/schema
vw
sporting_event_info.vw
sporting_event_info.vw
20:31 (44%)
2:13 (92%)
view
12 x 2 mongodb/sampledb/v1/schema
mongodb/sampledb/v1/schema
generate_sporting_events.rb
generate_sporting_events.rb
54:66 (11%)
100:112 (11%)
view
10 x 2 oracle/sampledb/v1/schema
sqlserver/sampledb/v1/schema
vw
sporting_event_info.vw
sporting_event_info.vw
18:27 (76%)
3:12 (76%)
view
10 x 2 mysql/sampledb/v1/schema
oracle/sampledb/v1/schema
vw
sporting_event_info.vw
sporting_event_info.vw
21:30 (37%)
18:27 (76%)
view
6 x 2 mongodb/sampledb/v1/schema
mongodb/sampledb/v1/schema
load_mlb_data.rb
load_nfl_data.rb
36:44 (18%)
36:44 (16%)
view