pytorch / elastic
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
  • 9% duplication:
    • 2,203 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 210 duplicated lines
  • 29 duplicates
system9% (210 lines)
Duplication per Extension
yaml23% (94 lines)
go9% (48 lines)
yml14% (38 lines)
py2% (30 lines)
Duplication per Component (primary)
kubernetes/config27% (94 lines)
kubernetes/controllers12% (48 lines)
aws/cfn14% (38 lines)
azure7% (30 lines)
azure/config0% (0 lines)
ROOT0% (0 lines)
aws/auth0% (0 lines)
aws0% (0 lines)
torchelastic/distributed0% (0 lines)
torchelastic0% (0 lines)
kubernetes/api0% (0 lines)
kubernetes0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 29 duplicates...
Size#FoldersFilesLinesCode
20 x 2 kubernetes/config/rbac
kubernetes/config/rbac
elasticjob_editor_role.yaml
role.yaml
7:26 (80%)
45:64 (31%)
view
11 x 2 kubernetes/config/rbac
kubernetes/config/rbac
elasticjob_editor_role.yaml
role.yaml
11:21 (44%)
37:47 (17%)
view
11 x 2 kubernetes/config/rbac
kubernetes/config/rbac
role.yaml
role.yaml
13:23 (17%)
25:35 (17%)
view
11 x 2 kubernetes/config/rbac
kubernetes/config/rbac
role.yaml
role.yaml
37:47 (17%)
49:59 (17%)
view
11 x 2 aws/cfn
aws/cfn
setup.yml
setup.yml
207:217 (4%)
236:246 (4%)
view
9 x 2 kubernetes/config/rbac
kubernetes/config/rbac
elasticjob_editor_role.yaml
role.yaml
11:19 (36%)
25:33 (14%)
view
9 x 2 kubernetes/config/rbac
kubernetes/config/rbac
role.yaml
role.yaml
13:21 (14%)
37:45 (14%)
view
9 x 2 kubernetes/config/rbac
kubernetes/config/rbac
role.yaml
role.yaml
25:33 (14%)
49:57 (14%)
view
9 x 2 kubernetes/config/rbac
kubernetes/config/rbac
elasticjob_editor_role.yaml
role.yaml
11:19 (36%)
13:21 (14%)
view
9 x 2 kubernetes/config/rbac
kubernetes/config/rbac
role.yaml
role.yaml
13:21 (14%)
49:57 (14%)
view
9 x 2 kubernetes/controllers
kubernetes/controllers
expectation.go
expectation.go
65:77 (15%)
111:123 (15%)
view
9 x 2 kubernetes/config/rbac
kubernetes/config/rbac
role.yaml
role.yaml
25:33 (14%)
37:45 (14%)
view
8 x 2 aws/cfn
aws/cfn
setup.yml
setup.yml
165:172 (2%)
178:185 (2%)
view
8 x 2 kubernetes/controllers
kubernetes/controllers
expectation.go
expectation.go
45:61 (13%)
91:107 (13%)
view
7 x 2 kubernetes/config/rbac
kubernetes/config/rbac
elasticjob_editor_role.yaml
elasticjob_viewer_role.yaml
18:24 (28%)
14:20 (36%)
view
7 x 2 kubernetes/controllers
kubernetes/controllers
elasticjob_controller.go
elasticjob_controller.go
111:122 (7%)
128:138 (7%)
view
7 x 2 kubernetes/config/rbac
kubernetes/config/rbac
elasticjob_viewer_role.yaml
role.yaml
14:20 (36%)
56:62 (11%)
view
6 x 2 kubernetes/config/rbac
kubernetes/config/rbac
leader_election_role.yaml
role.yaml
27:32 (19%)
9:14 (9%)
view
6 x 2 azure
azure
util.py
util.py
218:226 (2%)
257:266 (2%)
view
6 x 2 azure
azure
util.py
util.py
207:215 (2%)
282:293 (2%)
view