awslabs / amazon-ecs-for-open-application-model
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:
    • 1,882 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 138 duplicated lines
  • 8 duplicates
system7% (138 lines)
Duplication per Extension
go9% (138 lines)
Duplication per Component (primary)
internal/pkg/deploy12% (82 lines)
internal/pkg/cli13% (56 lines)
templates/environment0% (0 lines)
templates0% (0 lines)
templates/core.oam.dev0% (0 lines)
internal/pkg/workload0% (0 lines)
internal/pkg/aws0% (0 lines)
internal/pkg/version0% (0 lines)
internal/pkg/term0% (0 lines)
cmd/oam-ecs0% (0 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
21 x 2 internal/pkg/deploy/cloudformation
internal/pkg/deploy/cloudformation
component.go
env.go
70:102 (29%)
66:98 (30%)
view
8 x 2 internal/pkg/deploy/cloudformation
internal/pkg/deploy/cloudformation/stack
errors.go
errors.go
64:75 (18%)
21:32 (61%)
view
8 x 2 internal/pkg/cli
internal/pkg/cli
app_delete.go
app_show.go
115:125 (11%)
117:127 (11%)
view
7 x 2 internal/pkg/cli
internal/pkg/cli
app_delete.go
app_show.go
47:55 (10%)
47:55 (10%)
view
7 x 2 internal/pkg/cli
internal/pkg/cli
app_delete.go
app_show.go
79:88 (10%)
81:90 (10%)
view
6 x 2 internal/pkg/deploy/cloudformation/types
internal/pkg/deploy/cloudformation/types
component.go
env.go
58:65 (18%)
41:48 (26%)
view
6 x 2 internal/pkg/cli
internal/pkg/cli
env_delete.go
env_show.go
70:77 (14%)
68:75 (13%)
view
6 x 2 internal/pkg/deploy/cloudformation
internal/pkg/deploy/cloudformation
component.go
env.go
125:132 (8%)
121:128 (8%)
view
Duplicated Units
The list of top 2 duplicated units.
See data for all 2 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 internal/pkg/cli
internal/pkg/cli
app_delete.go
app_show.go
46:56 
46:56 
view
7 x 2 internal/pkg/deploy/cloudformation/stack
internal/pkg/deploy/cloudformation
errors.go
errors.go
21:28 
64:71 
view