facebookresearch / dino
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:
    • 2,565 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 128 duplicated lines
  • 8 duplicates
system4% (128 lines)
Duplication per Extension
py4% (128 lines)
Duplication per Component (primary)
ROOT4% (128 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
13 x 2 ROOT
ROOT
eval_linear.py
eval_linear.py
160:176 (6%)
202:216 (6%)
view
11 x 2 ROOT
ROOT
eval_copy_detection.py
eval_image_retrieval.py
221:232 (5%)
92:103 (8%)
view
9 x 2 ROOT
ROOT
eval_image_retrieval.py
visualize_attention.py
146:156 (6%)
121:131 (6%)
view
7 x 2 ROOT
ROOT
eval_image_retrieval.py
eval_knn.py
131:137 (5%)
59:65 (3%)
view
6 x 2 ROOT
ROOT
eval_copy_detection.py
eval_image_retrieval.py
238:243 (3%)
138:143 (4%)
view
6 x 2 ROOT
ROOT
utils.py
visualize_attention.py
104:109 (1%)
143:148 (4%)
view
6 x 2 ROOT
ROOT
utils.py
utils.py
358:363 (1%)
368:373 (1%)
view
6 x 2 ROOT
ROOT
video_generation.py
video_generation.py
210:215 (2%)
221:226 (2%)
view