facebookresearch / habitat-sim
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
  • 4% duplication:
    • 45,071 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,897 duplicated lines
  • 226 duplicates
system4% (1,897 lines)
Duplication per Extension
cpp3% (749 lines)
h3% (408 lines)
cmake10% (358 lines)
py4% (226 lines)
frag12% (90 lines)
yaml20% (28 lines)
html19% (14 lines)
cu7% (12 lines)
cuh41% (12 lines)
Duplication per Component (primary)
src/esp3% (1,177 lines)
src/cmake10% (358 lines)
src_python/habitat_sim5% (226 lines)
src/shaders8% (90 lines)
conda-build/habitat-sim30% (28 lines)
src/utils1% (18 lines)
ROOT0% (0 lines)
conda-build/withbullet0% (0 lines)
conda-build/habitat-sim-mutex0% (0 lines)
conda-build0% (0 lines)
conda-build/common0% (0 lines)
conda-build/headless0% (0 lines)
tools0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 226 duplicates...
Size#FoldersFilesLinesCode
32 x 2 src/cmake
src/cmake
cmake
FindMagnum.cmake
FindMagnum.cmake
653:685 (2%)
692:724 (2%)
view
25 x 2 src/cmake
src/cmake
cmake
FindEGL.cmake
FindMagnumBindings.cmake
14:39 (32%)
32:57 (22%)
view
25 x 2 src/cmake
src/cmake
cmake
FindBullet.cmake
FindMagnumBindings.cmake
24:49 (11%)
32:57 (22%)
view
25 x 2 src/cmake
src/cmake
cmake
FindBullet.cmake
FindMagnum.cmake
24:49 (11%)
193:218 (2%)
view
25 x 2 src/cmake
src/cmake
cmake
FindMagnum.cmake
FindMagnumBindings.cmake
193:218 (2%)
32:57 (22%)
view
25 x 2 src/esp/gfx
src/esp/gfx
DoubleSphereCameraShader.cpp
EquirectangularShader.cpp
31:71 (35%)
36:76 (42%)
view
25 x 2 src/cmake
src/cmake
cmake
FindBullet.cmake
FindEGL.cmake
24:49 (11%)
14:39 (32%)
view
25 x 2 src/cmake
src/cmake
cmake
FindEGL.cmake
FindMagnum.cmake
14:39 (32%)
193:218 (2%)
view
23 x 2 src_python/habitat_sim/utils/data
src_python/habitat_sim/utils/data
pose_extractor.py
pose_extractor.py
123:153 (11%)
217:247 (11%)
view
20 x 2 src/cmake
src/cmake
cmake
FindMagnumIntegration.cmake
FindMagnumPlugins.cmake
53:73 (7%)
80:100 (4%)
view
19 x 2 src/cmake
src/cmake
cmake
FindCorrade.cmake
FindMagnumPlugins.cmake
276:294 (3%)
80:98 (4%)
view
19 x 2 src/cmake
src/cmake
cmake
FindEGL.cmake
FindMagnumIntegration.cmake
21:39 (25%)
53:71 (7%)
view
19 x 2 src/cmake
src/cmake
cmake
FindAssimp.cmake
FindImGui.cmake
22:40 (18%)
41:59 (10%)
view
19 x 2 src/cmake
src/cmake
cmake
FindMagnumBindings.cmake
FindMagnumPlugins.cmake
39:57 (16%)
80:98 (4%)
view
19 x 2 src/cmake
src/cmake
cmake
FindAssimp.cmake
FindBullet.cmake
22:40 (18%)
31:49 (8%)
view
19 x 2 src/cmake
src/cmake
cmake
FindGLFW.cmake
FindMagnumIntegration.cmake
26:44 (15%)
53:71 (7%)
view
19 x 2 src/cmake
src/cmake
cmake
FindAssimp.cmake
FindMagnumBindings.cmake
22:40 (18%)
39:57 (16%)
view
19 x 2 src/shaders
src/shaders
frag
doubleSphereCamera.frag
equirectangular.frag
12:36 (39%)
11:36 (51%)
view
19 x 2 src/cmake
src/cmake
cmake
FindGLFW.cmake
FindImGui.cmake
26:44 (15%)
41:59 (10%)
view
19 x 2 src/cmake
src/cmake
cmake
FindEGL.cmake
FindMagnumPlugins.cmake
21:39 (25%)
80:98 (4%)
view
Duplicated Units
The list of top 9 duplicated units.
See data for all 9 unit duplicates...
Size#FoldersFilesLinesCode
14 x 2 src/esp/io
src/esp/io
JsonEspTypes.h
JsonMagnumTypes.h
27:41 
39:53 
view
12 x 2 src/esp/metadata/attributes
src/esp/metadata/attributes
SceneInstanceAttributes.h
SceneInstanceAttributes.h
59:73 
356:370 
view
10 x 2 src/esp/metadata/managers
src/esp/metadata/managers
AssetAttributesManager.h
AssetAttributesManager.h
210:220 
243:253 
view
9 x 2 src/esp/io
src/esp/io
Json.h
Json.h
70:79 
96:105 
view
8 x 2 src/esp/metadata/attributes
src/esp/metadata/attributes
ObjectAttributes.h
SceneInstanceAttributes.h
209:219 
152:161 
view
8 x 2 src/esp/metadata/attributes
src/esp/metadata/attributes
SceneInstanceAttributes.h
SceneInstanceAttributes.h
81:90 
378:387 
view
7 x 2 src/esp/io
src/esp/io
JsonBuiltinTypes.h
JsonBuiltinTypes.h
132:139 
149:156 
view
7 x 3 src/esp/scene
src/esp/scene
src/esp/scene
GibsonSemanticScene.h
HM3DSemanticScene.h
ReplicaSemanticScene.h
19:26 
19:26 
19:26 
view
7 x 2 src/esp/metadata/managers
src/esp/metadata/managers
AssetAttributesManager.h
AssetAttributesManager.h
229:236 
262:269 
view