facebookresearch / privacy_lint
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:
    • 375 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 38 duplicated lines
  • 7 duplicates
system10% (38 lines)
Duplication per Extension
py10% (38 lines)
Duplication per Component (primary)
privacy_lint/attacks12% (24 lines)
privacy_lint12% (14 lines)
privacy_lint/dataset0% (0 lines)
Longest Duplicates
The list of 7 longest duplicates.
See data for all 7 duplicates...
Size#FoldersFilesLinesCode
7 x 2 privacy_lint
privacy_lint
attack_results.py
attack_results.py
48:54 (6%)
68:75 (6%)
view
6 x 2 privacy_lint/attacks
privacy_lint/attacks
grad_norm.py
loss.py
67:72 (14%)
54:59 (18%)
view
6 x 2 privacy_lint/attacks
privacy_lint/attacks
gap.py
loss.py
50:55 (21%)
54:59 (18%)
view
6 x 2 privacy_lint/attacks
privacy_lint/attacks
grad_norm.py
shadow.py
67:72 (14%)
128:133 (6%)
view
6 x 2 privacy_lint/attacks
privacy_lint/attacks
loss.py
shadow.py
54:59 (18%)
128:133 (6%)
view
6 x 2 privacy_lint/attacks
privacy_lint/attacks
gap.py
grad_norm.py
50:55 (21%)
67:72 (14%)
view
6 x 2 privacy_lint/attacks
privacy_lint/attacks
gap.py
shadow.py
50:55 (21%)
128:133 (6%)
view