facebookresearch / rela
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
  • 6% duplication:
    • 2,881 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 179 duplicated lines
  • 15 duplicates
system6% (179 lines)
Duplication per Extension
py9% (135 lines)
h2% (32 lines)
cc5% (12 lines)
Duplication per Component (primary)
pyrela10% (117 lines)
rela2% (24 lines)
atari7% (20 lines)
pyrela/common_utils5% (18 lines)
Longest Duplicates
The list of 15 longest duplicates.
See data for all 15 duplicates...
Size#FoldersFilesLinesCode
10 x 2 pyrela
pyrela
parse_log.py
parse_log.py
124:133 (6%)
157:166 (6%)
view
9 x 2 pyrela/common_utils
pyrela/common_utils
helper.py
helper.py
146:164 (6%)
183:201 (6%)
view
9 x 2 pyrela
pyrela
net.py
net.py
16:25 (7%)
67:76 (7%)
view
9 x 2 pyrela
pyrela
apex.py
r2d2.py
67:75 (13%)
75:83 (5%)
view
8 x 2 pyrela
pyrela
parse_log.py
parse_log.py
24:33 (4%)
33:42 (4%)
view
8 x 2 pyrela
pyrela
benchmark.py
benchmark.py
76:83 (5%)
97:104 (5%)
view
7 x 2 atari
atari
atari_env.h
atari_env.h
102:108 (4%)
147:153 (4%)
view
6 x 2 rela
rela
r2d2_actor.h
r2d2_actor.h
109:115 (2%)
152:158 (2%)
view
6 x 2 pyrela
pyrela
create_atari.py
eval.py
102:107 (5%)
20:25 (14%)
view
6 x 2 rela
rela
cc
types.cc
types.cc
17:22 (4%)
104:109 (4%)
view
6 x 2 pyrela
pyrela
eval.py
eval.py
10:15 (14%)
20:25 (14%)
view
6 x 2 pyrela
pyrela
create_atari.py
eval.py
102:107 (5%)
10:15 (14%)
view
6 x 2 atari
atari
atari_env.h
atari_env.h
132:137 (4%)
148:153 (4%)
view
6 x 2 pyrela
pyrela
net.py
net.py
32:37 (4%)
92:97 (4%)
view
6 x 2 atari
atari
atari_env.h
atari_env.h
103:108 (4%)
132:137 (4%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
6 x 2 pyrela
pyrela
parse_log.py
parse_log.py
0:0 
0:0 
view