facebookresearch / label_dp_antipodes
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
  • 5% duplication:
    • 2,248 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 118 duplicated lines
  • 9 duplicates
system5% (118 lines)
Duplication per Extension
py5% (118 lines)
Duplication per Component (primary)
ROOT8% (56 lines)
lib/models14% (42 lines)
lib/dataset6% (20 lines)
memorization_attack0% (0 lines)
lib0% (0 lines)
lib/pate0% (0 lines)
Longest Duplicates
The list of 9 longest duplicates.
See data for all 9 duplicates...
Size#FoldersFilesLinesCode
20 x 2 ROOT
ROOT
train_student.py
train_teacher.py
63:86 (17%)
82:105 (14%)
view
14 x 2 lib/models
lib/models
resnet.py
resnet.py
50:64 (15%)
87:101 (15%)
view
10 x 2 lib/dataset
lib/dataset
cifar.py
cifar.py
99:109 (9%)
125:135 (9%)
view
8 x 2 ROOT
ROOT
train_student.py
train_teacher.py
124:131 (7%)
138:146 (5%)
view
7 x 2 lib/models
lib/models
wide_resnet.py
wide_resnet.py
125:131 (4%)
136:142 (4%)
view
6 x 2 ROOT
ROOT
train_student.py
train_student.py
65:71 (5%)
76:82 (5%)
view
6 x 2 ROOT
ROOT
train_teacher.py
train_teacher.py
84:90 (4%)
95:101 (4%)
view
6 x 2 ROOT
ROOT
train_student.py
train_teacher.py
65:71 (5%)
95:101 (4%)
view
6 x 2 ROOT
ROOT
train_student.py
train_teacher.py
76:82 (5%)
84:90 (4%)
view