apple / ml-uwac
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
  • 23% duplication:
    • 8,719 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,035 duplicated lines
  • 156 duplicates
system23% (2,035 lines)
Duplication per Extension
py22% (1,950 lines)
yml98% (85 lines)
Duplication per Component (primary)
rlkit/torch35% (1,082 lines)
rlkit/samplers72% (550 lines)
rlkit/launchers9% (112 lines)
environment98% (85 lines)
rlkit/core5% (68 lines)
rlkit/util16% (54 lines)
rlkit/envs4% (32 lines)
rlkit/data_management3% (28 lines)
scripts11% (14 lines)
rlkit5% (10 lines)
rlkit/exploration_strategies0% (0 lines)
rlkit/policies0% (0 lines)
ROOT0% (0 lines)

Duplication Between Components (50+ lines)

G rlkit/torch rlkit/torch rlkit/util rlkit/util rlkit/torch--rlkit/util 108 rlkit/envs rlkit/envs rlkit/launchers rlkit/launchers rlkit/envs--rlkit/launchers 64

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 156 duplicates...
Size#FoldersFilesLinesCode
53 x 2 rlkit/torch/sac
rlkit/torch/sac
bear.py
uwac_dropout.py
51:109 (21%)
58:116 (19%)
view
49 x 2 rlkit/torch/sac
rlkit/torch/sac
bear.py
uwac_dropout.py
228:295 (20%)
262:329 (17%)
view
42 x 2 rlkit/samplers/data_collector
rlkit/samplers/data_collector
step_collector.py
step_collector.py
76:120 (19%)
206:250 (19%)
view
39 x 2 rlkit/torch/sac
rlkit/torch/sac
bear.py
uwac_dropout.py
294:337 (15%)
332:375 (14%)
view
33 x 2 rlkit/samplers/data_collector
rlkit/samplers/data_collector
path_collector.py
path_collector.py
135:171 (14%)
221:257 (14%)
view
27 x 2 rlkit/torch/sac
rlkit/torch/sac
bear.py
uwac_dropout.py
111:151 (11%)
126:166 (9%)
view
26 x 2 rlkit/samplers
rlkit/samplers
rollout_functions.py
rollout_functions.py
119:145 (14%)
190:216 (14%)
view
25 x 2 rlkit/torch/sac
rlkit/torch/sac
bear.py
uwac_dropout.py
14:43 (10%)
19:48 (9%)
view
25 x 2 rlkit/samplers/data_collector
rlkit/samplers/data_collector
path_collector.py
path_collector.py
70:98 (11%)
230:258 (11%)
view
24 x 2 rlkit/samplers/data_collector
rlkit/samplers/data_collector
path_collector.py
path_collector.py
70:97 (10%)
144:171 (10%)
view
24 x 2 rlkit/samplers/data_collector
rlkit/samplers/data_collector
step_collector.py
step_collector.py
28:55 (11%)
145:172 (11%)
view
22 x 2 rlkit/samplers
rlkit/samplers
rollout_functions.py
util.py
127:148 (12%)
52:73 (26%)
view
21 x 2 environment
environment
linux-gpu-env.yml
mac-env.yml
1:21 (72%)
1:21 (75%)
view
20 x 2 rlkit/envs/goal_generation
rlkit/launchers
pickup_goal_dataset.py
skewfit_experiments.py
83:105 (20%)
207:229 (3%)
view
19 x 2 rlkit/samplers
rlkit/samplers
rollout_functions.py
util.py
198:216 (10%)
52:70 (22%)
view
19 x 2 environment
environment
linux-cpu-env.yml
linux-gpu-env.yml
1:19 (65%)
1:19 (65%)
view
19 x 2 rlkit/samplers/data_collector
rlkit/samplers/data_collector
path_collector.py
step_collector.py
242:261 (8%)
156:175 (8%)
view
19 x 2 environment
environment
linux-cpu-env.yml
mac-env.yml
1:19 (65%)
1:19 (67%)
view
18 x 2 rlkit/torch/sac
rlkit/torch/td3
sac.py
td3.py
169:186 (10%)
141:158 (12%)
view
18 x 2 rlkit/torch/dqn
rlkit/torch/dqn
double_dqn.py
dqn.py
27:57 (58%)
57:87 (25%)
view
Duplicated Units
The list of top 11 duplicated units.
See data for all 11 unit duplicates...
Size#FoldersFilesLinesCode
11 x 3 rlkit/samplers/data_collector
rlkit/samplers/data_collector
rlkit/samplers/data_collector
path_collector.py
path_collector.py
step_collector.py
0:0 
0:0 
0:0 
view
9 x 2 rlkit/launchers
rlkit
launcher_util.py
pythonplusplus.py
0:0 
0:0 
view
8 x 2 rlkit/samplers/data_collector
rlkit/samplers/data_collector
path_collector.py
step_collector.py
0:0 
0:0 
view
8 x 2 rlkit/torch
rlkit/torch
conv_networks.py
conv_networks.py
0:0 
0:0 
view
9 x 2 rlkit/torch/sac
rlkit/torch/sac
bear.py
uwac_dropout.py
0:0 
0:0 
view
10 x 2 rlkit/torch/sac
rlkit/torch/sac
bear.py
uwac_dropout.py
0:0 
0:0 
view
10 x 2 rlkit/torch/sac
rlkit/torch/sac
bear.py
uwac_dropout.py
0:0 
0:0 
view
8 x 2 rlkit/torch/sac
rlkit/torch/sac
bear.py
uwac_dropout.py
0:0 
0:0 
view
8 x 2 rlkit/torch/sac
rlkit/torch/sac
bear.py
uwac_dropout.py
0:0 
0:0 
view
6 x 2 rlkit/samplers/data_collector
rlkit/samplers/data_collector
path_collector.py
step_collector.py
0:0 
0:0 
view
21 x 2 rlkit/launchers
rlkit
launcher_util.py
pythonplusplus.py
0:0 
0:0 
view