facebookresearch / deep_bisim4control
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
  • 32% duplication:
    • 5,761 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,874 duplicated lines
  • 80 duplicates
system32% (1,874 lines)
Duplication per Extension
py32% (1,874 lines)
Duplication per Component (primary)
agent70% (531 lines)
CARLA_0.9.8/PythonAPI82% (447 lines)
CARLA_0.9.6/PythonAPI82% (447 lines)
local_dm_control_suite14% (263 lines)
ROOT11% (150 lines)
dmc2gym5% (18 lines)
local_dm_control_suite/utils9% (18 lines)
distractors0% (0 lines)
local_dm_control_suite/wrappers0% (0 lines)
local_dm_control_suite/common0% (0 lines)

Duplication Between Components (50+ lines)

G CARLA_0.9.6/PythonAPI CARLA_0.9.6/PythonAPI CARLA_0.9.8/PythonAPI CARLA_0.9.8/PythonAPI CARLA_0.9.6/PythonAPI--CARLA_0.9.8/PythonAPI 894

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 80 duplicates...
Size#FoldersFilesLinesCode
84 x 2 CARLA_0.9.6/PythonAPI/carla/agents/navigation
CARLA_0.9.8/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
19:147 (15%)
19:146 (15%)
view
61 x 2 CARLA_0.9.6/PythonAPI/carla/agents/navigation
CARLA_0.9.8/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
150:223 (11%)
149:222 (11%)
view
59 x 2 agent
agent
baseline_agent.py
deepmdp_agent.py
183:258 (21%)
141:216 (24%)
view
54 x 2 CARLA_0.9.6/PythonAPI/carla/agents/navigation
CARLA_0.9.8/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
634:730 (9%)
629:725 (9%)
view
53 x 2 agent
agent
baseline_agent.py
bisim_agent.py
190:258 (19%)
133:201 (22%)
view
53 x 2 agent
agent
bisim_agent.py
deepmdp_agent.py
133:201 (22%)
148:216 (22%)
view
50 x 2 CARLA_0.9.6/PythonAPI/carla/agents/navigation
CARLA_0.9.8/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
486:542 (9%)
483:539 (9%)
view
42 x 2 CARLA_0.9.6/PythonAPI/carla/agents/navigation
CARLA_0.9.8/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
290:341 (7%)
285:336 (7%)
view
34 x 2 CARLA_0.9.6/PythonAPI/carla/agents/navigation
CARLA_0.9.8/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
574:627 (6%)
571:623 (6%)
view
28 x 2 ROOT
ROOT
train.py
train.py
166:193 (7%)
198:225 (7%)
view
28 x 2 CARLA_0.9.6/PythonAPI/carla/agents/navigation
CARLA_0.9.8/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
241:278 (5%)
238:273 (5%)
view
24 x 2 local_dm_control_suite
local_dm_control_suite
manipulator.py
stacker.py
126:160 (13%)
83:117 (20%)
view
23 x 2 agent
agent
baseline_agent.py
deepmdp_agent.py
340:363 (8%)
291:314 (9%)
view
22 x 2 agent
agent
bisim_agent.py
deepmdp_agent.py
25:46 (9%)
26:47 (9%)
view
19 x 2 local_dm_control_suite
local_dm_control_suite
humanoid.py
humanoid_CMU.py
193:211 (16%)
161:179 (20%)
view
18 x 2 agent
agent
bisim_agent.py
deepmdp_agent.py
64:86 (7%)
66:88 (7%)
view
18 x 2 CARLA_0.9.6/PythonAPI/carla/agents/navigation
CARLA_0.9.8/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
407:428 (3%)
399:419 (3%)
view
17 x 2 agent
agent
baseline_agent.py
bisim_agent.py
63:83 (6%)
64:84 (7%)
view
17 x 2 agent
agent
baseline_agent.py
deepmdp_agent.py
122:144 (6%)
116:139 (7%)
view
17 x 2 agent
agent
baseline_agent.py
deepmdp_agent.py
63:83 (6%)
66:86 (7%)
view
Duplicated Units
The list of top 19 duplicated units.
See data for all 19 unit duplicates...
Size#FoldersFilesLinesCode
32 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
22 x 3 agent
agent
agent
bisim_agent.py
deepmdp_agent.py
baseline_agent.py
0:0 
0:0 
0:0 
view
16 x 3 agent
agent
agent
bisim_agent.py
deepmdp_agent.py
baseline_agent.py
0:0 
0:0 
0:0 
view
12 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
11 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
15 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
11 x 2 agent
agent
deepmdp_agent.py
baseline_agent.py
0:0 
0:0 
view
10 x 2 agent
agent
deepmdp_agent.py
baseline_agent.py
0:0 
0:0 
view
9 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
9 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
8 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
8 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
8 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
9 x 2 local_dm_control_suite
local_dm_control_suite
manipulator.py
stacker.py
0:0 
0:0 
view
7 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
7 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
7 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view
7 x 3 agent
agent
agent
bisim_agent.py
deepmdp_agent.py
baseline_agent.py
0:0 
0:0 
0:0 
view
6 x 2 CARLA_0.9.8/PythonAPI/carla/agents/navigation
CARLA_0.9.6/PythonAPI/carla/agents/navigation
carla_env.py
carla_env.py
0:0 
0:0 
view