microsoft / AISchoolTutorials
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
  • 28% duplication:
    • 32,516 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 9,283 duplicated lines
  • 678 duplicates
system28% (9,283 lines)
Duplication per Extension
js64% (5,469 lines)
xaml22% (1,368 lines)
cshtml47% (840 lines)
html86% (583 lines)
cs4% (487 lines)
py18% (436 lines)
css5% (72 lines)
yml45% (28 lines)
Duplication per Component (primary)
sketch2code/Sketch2Code.Web59% (6,980 lines)
snipinsights/windows10% (1,649 lines)
pix2story/source22% (450 lines)
MLNETCrashCourse/00.CompleteExamples28% (117 lines)
sketch2code/Sketch2Code.Core3% (26 lines)
MLNETCrashCourse/06.SupportVectorMachines85% (17 lines)
MLNETCrashCourse/05.LogisticRegression84% (16 lines)
pix2story60% (14 lines)
MLNETCrashCourse/02.LinearRegression63% (7 lines)
MLNETCrashCourse/03.MultipleLinearRegression58% (7 lines)
MLNETCrashCourse/01.IntroductionToMLNET0% (0 lines)
MLNETCrashCourse/04.PolynomialRegression0% (0 lines)
MLNETCrashCourse/Common0% (0 lines)
sketch2code/Import0% (0 lines)
sketch2code/Sketch2Code.AI0% (0 lines)
sketch2code/Sketch2Code.Api0% (0 lines)
sketch2code/model0% (0 lines)
style-transfer/Training0% (0 lines)
style-transfer/WebApp0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 678 duplicates...
Size#FoldersFilesLinesCode
1030 x 2 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
popper.js
popper.js
25:2508 (99%)
31:2514 (99%)
view
520 x 2 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
popper-utils.js
popper-utils.js
32:1103 (99%)
38:1109 (93%)
view
481 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
bootstrap.bundle.js
popper.js
1582:2636 (13%)
194:1245 (46%)
view
481 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper.js
1582:2636 (13%)
200:1251 (46%)
view
278 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts
popper-utils.js
popper.js
32:592 (57%)
94:654 (30%)
view
264 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper.js
2639:3191 (7%)
1254:1806 (25%)
view
264 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
bootstrap.bundle.js
popper.js
2639:3191 (7%)
1248:1800 (25%)
view
203 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper.js
3215:3919 (5%)
1810:2514 (19%)
view
203 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
bootstrap.bundle.js
popper.js
3215:3919 (5%)
1804:2508 (19%)
view
183 x 2 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/esm
popper-utils.js
popper.js
303:629 (35%)
409:734 (17%)
view
183 x 2 sketch2code/Sketch2Code.Web/Scripts/umd
sketch2code/Sketch2Code.Web/Scripts/umd
popper-utils.js
popper.js
309:635 (32%)
415:740 (17%)
view
183 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper-utils.js
1797:2122 (5%)
309:635 (32%)
view
183 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
bootstrap.bundle.js
popper-utils.js
1797:2122 (5%)
303:629 (35%)
view
183 x 2 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
popper-utils.js
popper.js
303:629 (35%)
415:740 (17%)
view
183 x 2 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
popper.js
popper-utils.js
409:734 (17%)
309:635 (32%)
view
120 x 2 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
popper.js
popper-utils.js
94:365 (11%)
38:309 (21%)
view
120 x 2 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/esm
popper-utils.js
popper.js
32:303 (22%)
94:365 (11%)
view
120 x 2 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
popper-utils.js
popper.js
32:303 (22%)
100:371 (11%)
view
120 x 2 sketch2code/Sketch2Code.Web/Scripts/umd
sketch2code/Sketch2Code.Web/Scripts/umd
popper-utils.js
popper.js
38:309 (21%)
100:371 (11%)
view
110 x 2 sketch2code/Sketch2Code.Web/Views/Shared
sketch2code/Sketch2Code.Web/Views/Shared
cshtml
_Layout.cshtml
_LayoutDetails.cshtml
59:215 (72%)
59:215 (73%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 93 unit duplicates...
Size#FoldersFilesLinesCode
56 x 3 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper.js
popper.js
2891:2972 
1500:1581 
1506:1587 
view
56 x 2 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
popper.js
popper.js
1220:1305 
1226:1311 
view
44 x 3 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper.js
popper.js
2733:2806 
1342:1415 
1348:1421 
view
43 x 3 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper.js
popper.js
3067:3132 
1676:1741 
1682:1747 
view
41 x 5 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper-utils.js
popper.js
popper-utils.js
popper.js
2074:2123 
581:630 
686:735 
587:636 
692:741 
view
36 x 5 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper-utils.js
popper.js
popper-utils.js
popper.js
1883:1933 
390:440 
495:545 
396:446 
501:551 
view
36 x 5 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper-utils.js
popper.js
popper-utils.js
popper.js
2006:2056 
513:563 
618:668 
519:569 
624:674 
view
35 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts
popper-utils.js
popper.js
375:423 
437:485 
view
34 x 5 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper-utils.js
popper.js
popper-utils.js
popper.js
1834:1881 
341:388 
446:493 
347:394 
452:499 
view
34 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts
popper-utils.js
popper.js
326:373 
388:435 
view
39 x 3 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/umd
popper.js
bootstrap.bundle.js
popper.js
2366:2430 
3777:3841 
2372:2436 
view
33 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts
popper-utils.js
popper.js
494:539 
556:601 
view
32 x 3 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper.js
popper.js
3015:3054 
1624:1663 
1630:1669 
view
32 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts
popper-utils.js
popper.js
554:593 
616:655 
view
28 x 3 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper.js
popper.js
3143:3175 
1752:1784 
1758:1790 
view
26 x 2 sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
popper-utils.js
popper-utils.js
613:645 
619:651 
view
25 x 3 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper.js
popper.js
2296:2340 
908:951 
914:957 
view
23 x 5 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper-utils.js
popper.js
popper-utils.js
popper.js
1643:1677 
193:227 
255:289 
199:233 
261:295 
view
23 x 2 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts
popper-utils.js
popper.js
183:216 
245:278 
view
22 x 3 sketch2code/Sketch2Code.Web/Scripts
sketch2code/Sketch2Code.Web/Scripts/esm
sketch2code/Sketch2Code.Web/Scripts/umd
bootstrap.bundle.js
popper.js
popper.js
3288:3317 
1877:1906 
1883:1912 
view