facebookresearch / WyPR
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
  • 18% duplication:
    • 5,143 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 973 duplicated lines
  • 55 duplicates
system18% (973 lines)
Duplication per Extension
py20% (873 lines)
cu14% (66 lines)
cpp10% (34 lines)
Duplication per Component (primary)
wypr/dataset25% (288 lines)
wypr/modeling17% (278 lines)
wypr/utils21% (252 lines)
wypr/evaluation16% (56 lines)
gss11% (55 lines)
shape_det17% (44 lines)
ROOT0% (0 lines)
wypr/tools0% (0 lines)
wypr/config0% (0 lines)
wypr0% (0 lines)

Duplication Between Components (50+ lines)

G shape_det shape_det wypr/dataset wypr/dataset shape_det--wypr/dataset 88 gss gss wypr/utils wypr/utils gss--wypr/utils 68

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 55 duplicates...
Size#FoldersFilesLinesCode
63 x 2 wypr/dataset/s3dis
wypr/dataset/scannet
s3dis.py
scannet.py
194:282 (32%)
184:271 (34%)
view
28 x 2 wypr/dataset/s3dis
wypr/dataset/scannet
s3dis.py
scannet.py
73:120 (14%)
73:120 (15%)
view
21 x 2 gss
wypr/utils
utils.py
nms.py
125:150 (19%)
90:115 (15%)
view
20 x 2 wypr/utils
wypr/utils
eval_det.py
eval_det.py
191:211 (13%)
232:252 (13%)
view
19 x 2 shape_det
wypr/dataset/s3dis
preprocess.py
process.py
36:57 (21%)
140:161 (15%)
view
18 x 2 wypr/utils
wypr/utils
eval_det.py
eval_prop.py
133:155 (12%)
65:87 (21%)
view
17 x 2 gss
gss
selective_search_3d_eval.py
selective_search_3d_run.py
47:63 (26%)
96:112 (17%)
view
16 x 2 wypr/modeling/backbone/pointnet2
wypr/modeling/backbone/pointnet2
pytorch_utils.py
pytorch_utils.py
168:183 (6%)
202:217 (6%)
view
16 x 2 wypr/utils
wypr/utils
pc_util.py
pc_util.py
401:421 (4%)
440:460 (4%)
view
16 x 2 wypr/modeling/backbone/pointnet2
wypr/modeling/backbone/pointnet2
pytorch_utils.py
pytorch_utils.py
134:149 (6%)
202:217 (6%)
view
16 x 2 wypr/modeling/backbone/pointnet2
wypr/modeling/backbone/pointnet2
pytorch_utils.py
pytorch_utils.py
134:149 (6%)
168:183 (6%)
view
14 x 2 wypr/modeling/backbone/pointnet2
wypr/modeling/backbone/pointnet2
pointnet2_modules.py
pointnet2_modules.py
107:121 (4%)
288:302 (4%)
view
13 x 2 wypr/modeling/backbone/pointnet2
wypr/modeling/backbone/pointnet2
pointnet2_modules.py
pointnet2_modules.py
56:71 (4%)
332:346 (4%)
view
13 x 2 wypr/utils
wypr/utils
nms.py
nms.py
87:101 (9%)
126:140 (9%)
view
12 x 2 wypr/evaluation
wypr/evaluation
ap_helper.py
ar_helper.py
172:198 (7%)
16:43 (29%)
view
12 x 2 wypr/dataset/scannet
wypr/dataset/scannet
vis.py
vis.py
59:72 (5%)
82:95 (5%)
view
12 x 2 wypr/utils
wypr/utils
nms.py
nms.py
16:28 (8%)
47:59 (8%)
view
12 x 2 shape_det
wypr/dataset/s3dis
preprocess.py
preprocess_for_gss.py
96:109 (13%)
57:70 (22%)
view
11 x 2 wypr/utils
wypr/utils
box_util.py
pc_util.py
215:229 (4%)
292:306 (3%)
view
11 x 2 gss
wypr/utils
utils.py
nms.py
125:136 (10%)
129:140 (8%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
14 x 2 wypr/dataset/s3dis
wypr/dataset/scannet
s3dis.py
scannet.py
0:0 
0:0 
view
14 x 2 wypr/utils
wypr/utils
pc_util.py
box_util.py
0:0 
0:0 
view
6 x 2 wypr/utils
wypr/utils
pc_util.py
box_util.py
0:0 
0:0 
view
9 x 2 wypr/evaluation
wypr/evaluation
ap_helper.py
ar_helper.py
0:0 
0:0 
view