facebookresearch / robust_cvd
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:
    • 15,998 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 773 duplicated lines
  • 49 duplicates
system4% (773 lines)
Duplication per Extension
py5% (460 lines)
cpp4% (275 lines)
h1% (38 lines)
Duplication per Component (primary)
lib4% (267 lines)
raft/core13% (151 lines)
utils3% (106 lines)
optimizer52% (99 lines)
ROOT2% (48 lines)
lib/core2% (46 lines)
loss5% (42 lines)
raft3% (14 lines)
configs0% (0 lines)
loaders0% (0 lines)
monodepth0% (0 lines)
monodepth/midas_v20% (0 lines)

Duplication Between Components (50+ lines)

G raft/core raft/core utils utils raft/core--utils 63

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 49 duplicates...
Size#FoldersFilesLinesCode
28 x 2 lib
lib
DepthMapTransform.cpp
DepthMapTransform.cpp
745:779 (2%)
862:897 (2%)
view
25 x 2 optimizer
optimizer
radam.py
radam.py
31:64 (13%)
119:152 (13%)
view
21 x 2 loss
loss
consistency_loss.py
scene_flow_loss.py
184:237 (15%)
358:411 (9%)
view
20 x 2 raft/core
raft/core
extractor.py
extractor.py
168:197 (10%)
243:271 (10%)
view
15 x 2 lib
lib
DepthMapTransform.cpp
DepthMapTransform.cpp
1254:1271 (1%)
1289:1308 (1%)
view
12 x 2 lib
lib
Processor.cpp
Processor.cpp
476:492 (1%)
502:518 (1%)
view
12 x 2 ROOT
ROOT
pose_optimization.py
pose_optimization.py
197:212 (5%)
221:238 (5%)
view
11 x 2 raft/core/utils
utils
flow_viz.py
flowlib.py
145:164 (6%)
424:443 (4%)
view
11 x 2 lib
lib
Processor.cpp
Processor.cpp
476:489 (1%)
528:541 (1%)
view
11 x 2 optimizer
optimizer
radam.py
radam.py
46:59 (6%)
209:222 (6%)
view
11 x 2 optimizer
optimizer
radam.py
radam.py
134:147 (6%)
209:222 (6%)
view
11 x 2 lib
lib
Processor.cpp
Processor.cpp
502:515 (1%)
528:541 (1%)
view
10 x 2 optimizer
optimizer
radam.py
radam.py
31:43 (5%)
195:206 (5%)
view
10 x 2 optimizer
optimizer
radam.py
radam.py
10:20 (5%)
101:111 (5%)
view
10 x 2 raft/core/utils
raft/core/utils
augmentor.py
augmentor.py
18:31 (5%)
135:148 (5%)
view
10 x 2 lib
lib
FlowConstraints.cpp
FlowConstraints.cpp
414:427 (2%)
483:496 (2%)
view
10 x 2 optimizer
optimizer
radam.py
radam.py
119:131 (5%)
195:206 (5%)
view
10 x 2 utils
utils
load_colmap.py
load_colmap.py
385:394 (2%)
431:440 (2%)
view
9 x 2 raft/core
raft/core
extractor.py
extractor.py
156:165 (4%)
231:240 (4%)
view
9 x 2 utils
utils
load_colmap.py
load_colmap.py
513:521 (1%)
551:559 (1%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
17 x 2 raft/core
raft/core
extractor.py
extractor.py
0:0 
0:0 
view