facebookresearch / rlmeta
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
  • 5% duplication:
    • 2,517 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 151 duplicated lines
  • 9 duplicates
system5% (151 lines)
Duplication per Extension
py8% (151 lines)
Duplication per Component (primary)
rlmeta/core9% (83 lines)
rlmeta/agents/dqn21% (43 lines)
rlmeta/agents/ppo13% (25 lines)
ROOT0% (0 lines)
rlmeta0% (0 lines)
rlmeta/agents0% (0 lines)
rlmeta/utils0% (0 lines)
rlmeta/cc0% (0 lines)
rlmeta/envs0% (0 lines)

Duplication Between Components (50+ lines)

G rlmeta/agents/dqn rlmeta/agents/dqn rlmeta/agents/ppo rlmeta/agents/ppo rlmeta/agents/dqn--rlmeta/agents/ppo 50

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 9 longest duplicates.
See data for all 9 duplicates...
Size#FoldersFilesLinesCode
11 x 2 rlmeta/agents/dqn
rlmeta/agents/ppo
apex_dqn_agent.py
ppo_agent.py
125:138 (5%)
138:151 (6%)
view
10 x 2 rlmeta/core
rlmeta/core
loop.py
loop.py
70:82 (4%)
245:257 (4%)
view
9 x 2 rlmeta/core
rlmeta/core
loop.py
loop.py
82:92 (3%)
261:271 (3%)
view
9 x 2 rlmeta/core
rlmeta/core
replay_buffer.py
replay_buffer.py
168:176 (3%)
294:302 (3%)
view
9 x 2 rlmeta/agents/dqn
rlmeta/agents/dqn
apex_dqn_agent.py
apex_dqn_agent.py
30:38 (4%)
198:206 (4%)
view
7 x 2 rlmeta/agents/dqn
rlmeta/agents/ppo
apex_dqn_agent.py
ppo_agent.py
114:120 (3%)
130:136 (4%)
view
7 x 2 rlmeta/agents/dqn
rlmeta/agents/ppo
apex_dqn_agent.py
ppo_agent.py
102:110 (3%)
118:126 (4%)
view
7 x 2 rlmeta/core
rlmeta/core
loop.py
loop.py
47:53 (2%)
212:218 (2%)
view
7 x 2 rlmeta/core
rlmeta/core
loop.py
loop.py
54:61 (2%)
222:229 (2%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
8 x 2 rlmeta/core
rlmeta/core
replay_buffer.py
replay_buffer.py
0:0 
0:0 
view