facebookresearch / selavi
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
  • 10% duplication:
    • 4,343 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 464 duplicated lines
  • 39 duplicates
system10% (464 lines)
Duplication per Extension
py12% (464 lines)
Duplication per Component (primary)
ROOT10% (221 lines)
src13% (118 lines)
cluster_vis26% (64 lines)
datasets6% (61 lines)
cluster_vis/data0% (0 lines)

Duplication Between Components (50+ lines)

G ROOT ROOT src src ROOT--src 121

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 39 duplicates...
Size#FoldersFilesLinesCode
12 x 2 src
src
retrieval_utils.py
retrieval_utils.py
291:302 (2%)
304:315 (2%)
view
12 x 2 ROOT
ROOT
clustering_metrics.py
get_clusters.py
26:38 (7%)
42:54 (4%)
view
12 x 2 ROOT
ROOT
clustering_metrics.py
utils.py
26:38 (7%)
336:350 (4%)
view
12 x 2 ROOT
ROOT
get_clusters.py
utils.py
42:54 (4%)
336:350 (4%)
view
11 x 2 cluster_vis
cluster_vis
get_clusters_kinetics.py
get_clusters_vggsounds.py
52:67 (21%)
52:67 (21%)
view
10 x 2 ROOT
src
clustering_metrics.py
sk_utils.py
136:145 (6%)
65:74 (2%)
view
9 x 2 ROOT
ROOT
model.py
model.py
140:149 (4%)
157:166 (4%)
view
9 x 2 src
ROOT
retrieval_utils.py
video_retrieval.py
380:388 (2%)
48:56 (21%)
view
9 x 2 ROOT
ROOT
model.py
model.py
172:180 (4%)
256:264 (4%)
view
9 x 2 src
src
sk_utils.py
sk_utils.py
124:133 (2%)
245:254 (2%)
view
9 x 2 ROOT
src
get_clusters.py
retrieval_utils.py
170:178 (3%)
446:454 (2%)
view
9 x 2 ROOT
src
finetune_video.py
retrieval_utils.py
503:511 (1%)
446:454 (2%)
view
9 x 2 ROOT
ROOT
finetune_video.py
get_clusters.py
503:511 (1%)
170:178 (3%)
view
8 x 2 src
src
retrieval_utils.py
retrieval_utils.py
118:125 (1%)
137:144 (1%)
view
8 x 2 ROOT
ROOT
get_clusters.py
opt.py
171:178 (2%)
11:18 (7%)
view
8 x 2 ROOT
ROOT
clustering_metrics.py
opt.py
179:186 (5%)
11:18 (7%)
view
8 x 2 cluster_vis
cluster_vis
get_clusters_kinetics.py
get_clusters_vggsounds.py
69:77 (15%)
69:77 (15%)
view
8 x 2 ROOT
src
clustering_metrics.py
retrieval_utils.py
179:186 (5%)
447:454 (1%)
view
8 x 2 ROOT
ROOT
finetune_video.py
opt.py
504:511 (1%)
11:18 (7%)
view
8 x 2 ROOT
ROOT
clustering_metrics.py
get_clusters.py
179:186 (5%)
171:178 (2%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
12 x 2 ROOT
ROOT
clustering_metrics.py
get_clusters.py
0:0 
0:0 
view