facebookresearch / digit-design
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
  • 21% duplication:
    • 16,726 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 3,624 duplicated lines
  • 119 duplicates
system21% (3,624 lines)
Duplication per Extension
gtl22% (1,280 lines)
gbl25% (1,244 lines)
gts75% (318 lines)
gbs78% (314 lines)
gtp91% (237 lines)
gbp91% (217 lines)
gbo<1% (7 lines)
gto<1% (7 lines)
Duplication per Component (primary)
hardware/fabrication/digit30% (3,101 lines)
hardware/fabrication/digit-flex/2020-16% (265 lines)
hardware/fabrication/digit-flex/2021-212% (258 lines)
firmware/digit-programmer0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 119 duplicates...
Size#FoldersFilesLinesCode
145 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gtl
digit_copper_signal_top.gtl
digit_paste_top.gtp
2886:3030 (3%)
31:175 (82%)
view
129 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_paste_bot.gbp
3499:3627 (3%)
52:180 (72%)
view
103 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbs
digit_soldermask_bot.gbs
digit_soldermask_top.gts
57:159 (35%)
181:283 (36%)
view
100 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_copper_signal_top.gtl
3399:3498 (2%)
3559:3658 (2%)
view
90 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_soldermask_top.gts
3407:3496 (2%)
189:278 (31%)
view
90 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gtl
digit_copper_signal_top.gtl
digit_soldermask_top.gts
3567:3656 (2%)
189:278 (31%)
view
90 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gtl
digit_copper_signal_top.gtl
digit_soldermask_bot.gbs
3567:3656 (2%)
65:154 (31%)
view
90 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_soldermask_bot.gbs
3407:3496 (2%)
65:154 (31%)
view
89 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_copper_signal_top.gtl
33:121 (2%)
40:128 (2%)
view
68 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_copper_signal_top.gtl
2819:2886 (1%)
2584:2651 (1%)
view
50 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_soldermask_bot.gbs
3502:3551 (1%)
163:212 (17%)
view
50 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbp
digit_paste_bot.gbp
digit_soldermask_bot.gbs
55:104 (27%)
163:212 (17%)
view
49 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_soldermask_bot.gbs
3553:3601 (1%)
214:262 (17%)
view
49 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbp
digit_paste_bot.gbp
digit_soldermask_bot.gbs
106:154 (27%)
214:262 (17%)
view
44 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_copper_signal_top.gtl
800:843 (1%)
360:403 (1%)
view
38 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_copper_signal_top.gtl
761:798 (1%)
296:333 (1%)
view
38 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_copper_signal_top.gtl
1680:1717 (1%)
1619:1656 (1%)
view
33 x 2 hardware/fabrication/digit-flex/2020-1
hardware/fabrication/digit-flex/2020-1
gtl
digit_flex.gtl
digit_flex.gtp
1614:1646 (1%)
11:43 (76%)
view
32 x 2 hardware/fabrication/digit-flex/2021-2
hardware/fabrication/digit-flex/2021-2
gtl
gel_flex.gtl
gel_flex.gtp
64:95 (13%)
10:41 (78%)
view
31 x 2 hardware/fabrication/digit
hardware/fabrication/digit
gbl
digit_copper_signal_bot.gbl
digit_copper_signal_top.gtl
1107:1137 (<1%)
874:904 (<1%)
view