facebookresearch / CausalMotifs
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
  • 34% duplication:
    • 678 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 232 duplicated lines
  • 8 duplicates
system34% (232 lines)
Duplication per Extension
py34% (232 lines)
Duplication per Component (primary)
ROOT34% (232 lines)
Longest Duplicates
The list of 8 longest duplicates.
See data for all 8 duplicates...
Size#FoldersFilesLinesCode
40 x 2 ROOT
ROOT
generate_WS.py
generate_WS.py
16:55 (25%)
146:186 (25%)
view
18 x 2 ROOT
ROOT
causalPartition.py
causalPartition.py
208:225 (3%)
489:506 (3%)
view
18 x 2 ROOT
ROOT
causalPartition.py
causalPartition.py
106:128 (3%)
358:378 (3%)
view
11 x 2 ROOT
ROOT
causalPartition.py
causalPartition.py
142:156 (2%)
392:405 (2%)
view
10 x 2 ROOT
ROOT
causalPartition.py
causalPartition.py
240:249 (2%)
518:527 (2%)
view
7 x 2 ROOT
ROOT
causalPartition.py
causalPartition.py
198:204 (1%)
475:481 (1%)
view
6 x 2 ROOT
ROOT
causalPartition.py
causalPartition.py
228:234 (1%)
507:513 (1%)
view
6 x 2 ROOT
ROOT
causalPartition.py
causalPartition.py
252:257 (1%)
528:533 (1%)
view