microsoft / pxt-adafruit
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
  • 6% duplication:
    • 38,448 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 2,543 duplicated lines
  • 105 duplicates
system6% (2,543 lines)
Duplication per Extension
sch20% (1,715 lines)
brd2% (763 lines)
ts3% (51 lines)
tsx18% (14 lines)
Duplication per Component (primary)
schematics6% (2,478 lines)
sim/visuals4% (39 lines)
editor18% (14 lines)
sim6% (12 lines)
fieldeditors0% (0 lines)
libs/accelerometer0% (0 lines)
libs/blocksprj0% (0 lines)
libs/circuit-playground0% (0 lines)
libs/cptest0% (0 lines)
libs/light0% (0 lines)
libs/servo0% (0 lines)
pxtwapp/pxtwapp0% (0 lines)
sim/public0% (0 lines)
theme0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 105 duplicates...
Size#FoldersFilesLinesCode
154 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
218:371 (<1%)
1355:1508 (1%)
view
138 x 2 schematics
schematics
sch
circuitplay rev G.sch
circuitplay rev G.sch
1383:1522 (1%)
2526:2665 (1%)
view
126 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
246:371 (<1%)
2526:2651 (1%)
view
120 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
744:863 (<1%)
2283:2402 (1%)
view
81 x 2 schematics
schematics
sch
circuitplay rev G.sch
circuitplay rev G.sch
380:460 (<1%)
557:637 (<1%)
view
67 x 2 schematics
schematics
sch
circuitplay rev G.sch
circuitplay rev G.sch
471:537 (<1%)
557:623 (<1%)
view
67 x 2 schematics
schematics
sch
circuitplay rev G.sch
circuitplay rev G.sch
380:446 (<1%)
471:537 (<1%)
view
41 x 2 schematics
schematics
sch
circuitplay rev G.sch
circuitplay rev G.sch
6507:6566 (<1%)
6647:6706 (<1%)
view
32 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
513:544 (<1%)
1825:1856 (<1%)
view
30 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
866:895 (<1%)
2405:2434 (<1%)
view
28 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
387:414 (<1%)
646:673 (<1%)
view
25 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
718:742 (<1%)
2213:2237 (<1%)
view
24 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
693:716 (<1%)
2475:2498 (<1%)
view
24 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
635:658 (<1%)
1878:1901 (<1%)
view
24 x 2 schematics
schematics
sch
circuitplay rev G.sch
circuitplay rev G.sch
1905:1931 (<1%)
1982:2008 (<1%)
view
23 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
488:510 (<1%)
1800:1822 (<1%)
view
23 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
946:968 (<1%)
2720:2742 (<1%)
view
21 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
428:448 (<1%)
1211:1231 (<1%)
view
21 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
660:680 (<1%)
2133:2153 (<1%)
view
20 x 2 schematics
schematics
brd
circuitplay rev G.brd
circuitplay rev G.sch
914:933 (<1%)
2699:2718 (<1%)
view