facebookresearch / PointContrast
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
  • 35% duplication:
    • 13,048 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,656 duplicated lines
  • 720 duplicates
system35% (4,656 lines)
Duplication per Extension
py37% (4,495 lines)
cu14% (66 lines)
m25% (42 lines)
cpp16% (34 lines)
yaml6% (19 lines)
Duplication per Component (primary)
downstream/votenet_det_new/models43% (1,770 lines)
downstream/semseg/models95% (1,153 lines)
pretrain/pointcontrast/model92% (564 lines)
downstream/votenet_det_new/lib19% (524 lines)
downstream/semseg/lib21% (453 lines)
pretrain/pointcontrast/lib17% (160 lines)
downstream/semseg/config8% (13 lines)
downstream/votenet_det_new6% (7 lines)
pretrain/data_preprocess/scannet_pair<1% (6 lines)
downstream/votenet_det_new/config9% (6 lines)
downstream/semseg0% (0 lines)
pretrain/pointcontrast/config0% (0 lines)
pretrain/pointcontrast0% (0 lines)

Duplication Between Components (50+ lines)

G downstream/semseg/models downstream/semseg/models downstream/votenet_det_new/models downstream/votenet_det_new/models downstream/semseg/models--downstream/votenet_det_new/models 2314 pretrain/pointcontrast/model pretrain/pointcontrast/model downstream/semseg/models--pretrain/pointcontrast/model 1314 downstream/votenet_det_new/models--pretrain/pointcontrast/model 1347 downstream/semseg/lib downstream/semseg/lib downstream/semseg/lib--downstream/votenet_det_new/models 264 downstream/votenet_det_new/lib downstream/votenet_det_new/lib downstream/semseg/lib--downstream/votenet_det_new/lib 260 pretrain/pointcontrast/lib pretrain/pointcontrast/lib downstream/semseg/lib--pretrain/pointcontrast/lib 144

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 720 duplicates...
Size#FoldersFilesLinesCode
411 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
resunet.py
resunet.py
17:542 (100%)
17:542 (100%)
view
247 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
res16unet.py
res16unet.py
48:381 (90%)
47:380 (91%)
view
166 x 2 downstream/semseg/models
pretrain/pointcontrast/model
res16unet.py
res16unet.py
44:225 (61%)
47:228 (73%)
view
164 x 2 downstream/semseg/models/modules
downstream/votenet_det_n...arseconv/models/modules
common.py
common.py
13:218 (100%)
13:218 (100%)
view
162 x 2 downstream/votenet_det_n...kbone/sparseconv/models
pretrain/pointcontrast/model
res16unet.py
res16unet.py
47:224 (59%)
51:228 (72%)
view
155 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
resnet.py
resnet.py
15:221 (100%)
15:221 (100%)
view
151 x 2 downstream/semseg/models/modules
pretrain/pointcontrast/model/modules
common.py
common.py
28:218 (92%)
24:214 (93%)
view
151 x 2 downstream/votenet_det_n...arseconv/models/modules
pretrain/pointcontrast/model/modules
common.py
common.py
28:218 (92%)
24:214 (93%)
view
130 x 2 downstream/semseg/lib
downstream/votenet_det_new/lib/utils
distributed_utils.py
distributed_utils.py
18:190 (100%)
18:190 (100%)
view
93 x 2 downstream/votenet_det_n...kbone/sparseconv/models
pretrain/pointcontrast/model
resnet.py
resnet.py
43:144 (60%)
53:154 (76%)
view
93 x 2 downstream/semseg/models
pretrain/pointcontrast/model
resnet.py
resnet.py
43:144 (60%)
53:154 (76%)
view
89 x 2 downstream/semseg/models/modules
downstream/votenet_det_n...arseconv/models/modules
resnet_block.py
resnet_block.py
13:134 (100%)
13:134 (100%)
view
83 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
resunet.py
resunet.py
18:113 (20%)
276:371 (20%)
view
83 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
resunet.py
resunet.py
276:371 (20%)
18:113 (20%)
view
83 x 2 downstream/semseg/models
downstream/semseg/models
resunet.py
resunet.py
18:113 (20%)
276:371 (20%)
view
83 x 2 downstream/votenet_det_n...kbone/sparseconv/models
downstream/votenet_det_n...kbone/sparseconv/models
resunet.py
resunet.py
18:113 (20%)
276:371 (20%)
view
55 x 2 downstream/semseg/lib
downstream/votenet_det_n...els/backbone/sparseconv
voxelizer.py
voxelizer.py
14:95 (51%)
14:95 (37%)
view
42 x 2 downstream/semseg/models/modules
pretrain/pointcontrast/model/modules
resnet_block.py
resnet_block.py
13:64 (47%)
13:63 (51%)
view
42 x 2 downstream/votenet_det_n...arseconv/models/modules
pretrain/pointcontrast/model/modules
resnet_block.py
resnet_block.py
13:64 (47%)
13:63 (51%)
view
40 x 2 downstream/semseg/lib
downstream/votenet_det_n...backbone/sparseconv/lib
math_functions.py
math_functions.py
10:75 (100%)
10:75 (100%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 39 unit duplicates...
Size#FoldersFilesLinesCode
134 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
resunet.py
resunet.py
0:0 
0:0 
view
130 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
resunet.py
resunet.py
0:0 
0:0 
view
42 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
resnet.py
resnet.py
0:0 
0:0 
view
44 x 2 downstream/semseg/lib
downstream/votenet_det_new/lib/utils
distributed_utils.py
distributed_utils.py
0:0 
0:0 
view
45 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
res16unet.py
res16unet.py
0:0 
0:0 
view
40 x 3 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
pretrain/pointcontrast/model
resnet.py
resnet.py
resnet.py
0:0 
0:0 
0:0 
view
47 x 2 downstream/semseg/lib
downstream/votenet_det_new/lib/utils
distributed_utils.py
distributed_utils.py
0:0 
0:0 
view
42 x 3 downstream/semseg/models/modules
downstream/votenet_det_n...arseconv/models/modules
pretrain/pointcontrast/model/modules
common.py
common.py
common.py
0:0 
0:0 
0:0 
view
34 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
resunet.py
resunet.py
0:0 
0:0 
view
32 x 2 downstream/semseg/models
downstream/votenet_det_n...kbone/sparseconv/models
resunet.py
resunet.py
0:0 
0:0 
view
25 x 3 downstream/semseg/models/modules
downstream/votenet_det_n...arseconv/models/modules
pretrain/pointcontrast/model/modules
common.py
common.py
common.py
0:0 
0:0 
0:0 
view
24 x 3 downstream/semseg/models/modules
downstream/votenet_det_n...arseconv/models/modules
pretrain/pointcontrast/model/modules
resnet_block.py
resnet_block.py
resnet_block.py
0:0 
0:0 
0:0 
view
23 x 2 downstream/semseg/lib
downstream/votenet_det_new/lib/utils
distributed_utils.py
distributed_utils.py
0:0 
0:0 
view
29 x 2 downstream/semseg/lib
downstream/votenet_det_n...els/backbone/sparseconv
voxelizer.py
voxelizer.py
0:0 
0:0 
view
20 x 3 downstream/semseg/models/modules
downstream/votenet_det_n...arseconv/models/modules
pretrain/pointcontrast/model/modules
common.py
common.py
common.py
0:0 
0:0 
0:0 
view
18 x 3 downstream/semseg/models/modules
downstream/votenet_det_n...arseconv/models/modules
pretrain/pointcontrast/model/modules
resnet_block.py
resnet_block.py
resnet_block.py
0:0 
0:0 
0:0 
view
17 x 2 downstream/semseg/lib
pretrain/pointcontrast/lib
dataloader.py
data_sampler.py
0:0 
0:0 
view
15 x 3 downstream/semseg/models/modules
downstream/votenet_det_n...arseconv/models/modules
pretrain/pointcontrast/model/modules
common.py
common.py
common.py
0:0 
0:0 
0:0 
view
14 x 3 downstream/semseg/models/modules
downstream/votenet_det_n...arseconv/models/modules
pretrain/pointcontrast/model/modules
resnet_block.py
resnet_block.py
resnet_block.py
0:0 
0:0 
0:0 
view
26 x 2 downstream/semseg/lib
downstream/votenet_det_n...els/backbone/sparseconv
voxelizer.py
voxelizer.py
0:0 
0:0 
view