aws-ia / terraform-aws-globalnetwork
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
  • 52% duplication:
    • 5,412 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,863 duplicated lines
  • 1,793 duplicates
system52% (2,863 lines)
Duplication per Extension
tf55% (2,693 lines)
tfvars30% (170 lines)
Duplication per Component (primary)
ROOT53% (1,748 lines)
deploy69% (915 lines)
create_transit_gateway19% (135 lines)
peer_transit_gateways72% (65 lines)
setup_workspace0% (0 lines)

Duplication Between Components (50+ lines)

G deploy deploy ROOT ROOT deploy--ROOT 2318 create_transit_gateway create_transit_gateway create_transit_gateway--deploy 158 create_transit_gateway--ROOT 578 peer_transit_gateways peer_transit_gateways create_transit_gateway--peer_transit_gateways 130

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 1,793 duplicates...
Size#FoldersFilesLinesCode
708 x 2 deploy
ROOT
variables.tf
variables.tf
4:928 (100%)
4:928 (100%)
view
39 x 2 create_transit_gateway
peer_transit_gateways
variables.tf
variables.tf
598:642 (8%)
43:87 (59%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
200:230 (1%)
844:874 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
443:473 (1%)
844:874 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
765:795 (1%)
1160:1190 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
524:554 (1%)
1318:1348 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
200:230 (1%)
923:953 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
120:150 (1%)
765:795 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
443:473 (1%)
923:953 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
844:874 (1%)
1002:1032 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
200:230 (1%)
765:795 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
443:473 (1%)
1002:1032 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
765:795 (1%)
1318:1348 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
120:150 (1%)
923:953 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
765:795 (1%)
1239:1269 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
120:150 (1%)
844:874 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
684:714 (1%)
1081:1111 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
524:554 (1%)
1081:1111 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
844:874 (1%)
1081:1111 (1%)
view
31 x 2 ROOT
ROOT
main.tf
main.tf
200:230 (1%)
1081:1111 (1%)
view