facebookresearch / pytorch3d
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:
    • 34,145 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 6,159 duplicated lines
  • 1,462 duplicates
system18% (6,159 lines)
Duplication per Extension
cu30% (1,579 lines)
py9% (1,576 lines)
h26% (1,467 lines)
cpp31% (1,065 lines)
cuh12% (284 lines)
yaml51% (164 lines)
js2% (12 lines)
bash4% (12 lines)
Duplication per Component (primary)
pytorch3d/csrc26% (4,395 lines)
pytorch3d/renderer15% (854 lines)
pytorch3d/io10% (230 lines)
pytorch3d/ops6% (165 lines)
projects/nerf7% (100 lines)
pytorch3d/structures4% (79 lines)
pytorch3d/loss16% (62 lines)
pytorch3d/datasets8% (60 lines)
packaging/vs201985% (52 lines)
packaging/vs201785% (52 lines)
pytorch3d/transforms6% (48 lines)
pytorch3d/vis5% (32 lines)
website/core5% (12 lines)
packaging4% (12 lines)
pytorch3d/utils4% (6 lines)
packaging/pytorch3d0% (0 lines)
packaging/cub_conda0% (0 lines)
packaging/linux_wheels0% (0 lines)
website0% (0 lines)
website/static0% (0 lines)
website/pages0% (0 lines)
ROOT0% (0 lines)
scripts0% (0 lines)
pytorch3d0% (0 lines)
pytorch3d/common0% (0 lines)

Duplication Between Components (50+ lines)

G packaging/vs2017 packaging/vs2017 packaging/vs2019 packaging/vs2019 packaging/vs2017--packaging/vs2019 104 pytorch3d/csrc pytorch3d/csrc pytorch3d/renderer pytorch3d/renderer pytorch3d/csrc--pytorch3d/renderer 93 projects/nerf projects/nerf projects/nerf--pytorch3d/renderer 62

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 1,462 duplicates...
Size#FoldersFilesLinesCode
53 x 2 pytorch3d/csrc/pulsar/include
pytorch3d/csrc/pulsar/include
renderer.render.device.h
renderer.render.device.h
210:270 (17%)
302:362 (17%)
view
52 x 2 pytorch3d/renderer
pytorch3d/renderer
cameras.py
cameras.py
997:1101 (6%)
1235:1338 (6%)
view
38 x 2 packaging/vs2017
packaging/vs2019
meta.yaml
meta.yaml
4:45 (92%)
4:45 (92%)
view
28 x 2 pytorch3d/csrc/pulsar/include
pytorch3d/csrc/pulsar/include
renderer.calc_gradients.device.h
renderer.h
21:51 (19%)
359:389 (11%)
view
28 x 2 pytorch3d/csrc/pulsar/pytorch
pytorch3d/csrc/pulsar/pytorch
renderer.cpp
renderer.cpp
703:731 (2%)
1061:1089 (2%)
view
28 x 2 pytorch3d/csrc/pulsar/include
pytorch3d/csrc/pulsar/include
renderer.backward.device.h
renderer.forward.device.h
69:99 (18%)
63:93 (10%)
view
27 x 2 pytorch3d/csrc/pulsar/include
pytorch3d/csrc/pulsar/include
renderer.calc_gradients.device.h
renderer.calc_gradients.instantiate.h
23:52 (18%)
15:44 (87%)
view
26 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
114:143 (10%)
249:278 (10%)
view
26 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
114:143 (10%)
337:366 (10%)
view
26 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
51:80 (10%)
249:278 (10%)
view
26 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
182:211 (10%)
337:366 (10%)
view
26 x 2 pytorch3d/csrc/pulsar/include
pytorch3d/csrc/pulsar/include
renderer.calc_gradients.instantiate.h
renderer.h
15:43 (83%)
361:389 (10%)
view
26 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
114:143 (10%)
182:211 (10%)
view
26 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
51:80 (10%)
182:211 (10%)
view
26 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
249:278 (10%)
337:366 (10%)
view
26 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
51:80 (10%)
114:143 (10%)
view
26 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
51:80 (10%)
337:366 (10%)
view
26 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
182:211 (10%)
249:278 (10%)
view
25 x 2 pytorch3d/csrc/pulsar/pytorch
pytorch3d/csrc/pulsar/pytorch
renderer.cpp
renderer.h
900:924 (1%)
63:87 (21%)
view
24 x 2 pytorch3d/csrc/pulsar/pytorch
pytorch3d/csrc/pulsar/pytorch
renderer.cpp
renderer.cpp
677:700 (1%)
926:949 (1%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
9 x 2 pytorch3d/renderer
pytorch3d/renderer
cameras.py
cameras.py
0:0 
0:0 
view
7 x 2 pytorch3d/io
pytorch3d/io
obj_io.py
off_io.py
0:0 
0:0 
view
6 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
0:0 
0:0 
view
7 x 2 pytorch3d/renderer/mesh
pytorch3d/renderer/mesh
shader.py
shader.py
0:0 
0:0 
view
6 x 2 pytorch3d/io
pytorch3d/io
pluggable_formats.py
experimental_gltf_io.py
0:0 
0:0 
view
6 x 3 pytorch3d/io
pytorch3d/io
pytorch3d/io
off_io.py
ply_io.py
experimental_gltf_io.py
0:0 
0:0 
0:0 
view
6 x 2 pytorch3d/transforms
pytorch3d/transforms
transform3d.py
transform3d.py
0:0 
0:0 
view
6 x 2 pytorch3d/ops
pytorch3d/ops
points_to_volumes.py
points_to_volumes.py
0:0 
0:0 
view