freertos / Lab-Project-FreeRTOS-FAT
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
  • 48% duplication:
    • 17,726 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 8,616 duplicated lines
  • 795 duplicates
system48% (8,616 lines)
Duplication per Extension
c50% (7,950 lines)
h39% (666 lines)
Duplication per Component (primary)
portable/STM32F4xx94% (1,967 lines)
portable/STM32F7xx93% (1,921 lines)
portable/Zynq.2019.368% (1,839 lines)
portable/Zynq82% (1,613 lines)
ROOT8% (570 lines)
portable/ATSAM4E75% (446 lines)
portable/lpc18xx62% (152 lines)
portable/common23% (44 lines)
portable/avr32_uc320% (34 lines)
include3% (30 lines)
tools0% (0 lines)

Duplication Between Components (50+ lines)

G portable/STM32F4xx portable/STM32F4xx portable/STM32F7xx portable/STM32F7xx portable/STM32F4xx--portable/STM32F7xx 3843 portable/Zynq.2019.3 portable/Zynq.2019.3 portable/STM32F4xx--portable/Zynq.2019.3 142 portable/Zynq portable/Zynq portable/STM32F4xx--portable/Zynq 154 portable/lpc18xx portable/lpc18xx portable/STM32F4xx--portable/lpc18xx 254 portable/STM32F7xx--portable/Zynq.2019.3 130 portable/STM32F7xx--portable/Zynq 142 portable/STM32F7xx--portable/lpc18xx 254 portable/Zynq.2019.3--portable/Zynq 3296 portable/Zynq.2019.3--portable/lpc18xx 130 portable/Zynq--portable/lpc18xx 138 portable/ATSAM4E portable/ATSAM4E portable/ATSAM4E--portable/STM32F4xx 511 portable/ATSAM4E--portable/STM32F7xx 484 portable/ATSAM4E--portable/Zynq.2019.3 224 portable/ATSAM4E--portable/Zynq 244 portable/ATSAM4E--portable/lpc18xx 411 portable/common portable/common portable/ATSAM4E--portable/common 72 ROOT ROOT portable/avr32_uc3 portable/avr32_uc3 ROOT--portable/avr32_uc3 68 include include ROOT--include 60

Download: SVG DOT (open online Graphviz editor)

Open 3D force graph...

Show more details on duplication between components...
Longest Duplicates
The list of 20 longest duplicates.
See data for all 795 duplicates...
Size#FoldersFilesLinesCode
211 x 2 portable/STM32F4xx
portable/STM32F7xx
ff_sddisk.c
ff_sddisk.c
421:869 (43%)
506:954 (42%)
view
196 x 2 portable/STM32F4xx
portable/STM32F7xx
stm32f4xx_hal_sd.c
stm32f7xx_hal_sd.c
1552:2010 (14%)
1614:2072 (14%)
view
183 x 2 portable/Zynq.2019.3
portable/Zynq
xsdps_info.c
xsdps_info.c
20:314 (100%)
20:314 (100%)
view
122 x 2 portable/STM32F4xx
portable/STM32F7xx
stm32f4xx_hal_sd.h
stm32f7xx_hal_sd.h
43:259 (58%)
43:260 (58%)
view
116 x 2 portable/Zynq.2019.3
portable/Zynq
ff_sddisk.c
ff_sddisk.c
771:1033 (26%)
674:936 (28%)
view
109 x 2 portable/STM32F4xx
portable/STM32F7xx
stm32f4xx_hal_sd.c
stm32f7xx_hal_sd.c
1105:1394 (7%)
1175:1464 (8%)
view
101 x 2 portable/STM32F4xx
portable/STM32F7xx
ff_sddisk.c
ff_sddisk.c
872:1029 (20%)
956:1113 (20%)
view
94 x 2 portable/STM32F4xx
portable/STM32F7xx
stm32f4xx_hal_sd.c
stm32f7xx_hal_sd.c
2222:2500 (6%)
2268:2546 (6%)
view
92 x 2 portable/ATSAM4E
portable/STM32F7xx
ff_sddisk_r.c
ff_sddisk.c
291:468 (37%)
628:805 (18%)
view
92 x 2 portable/ATSAM4E
portable/STM32F4xx
ff_sddisk_r.c
ff_sddisk.c
291:468 (37%)
543:720 (18%)
view
82 x 2 portable/STM32F4xx
portable/STM32F7xx
stm32f4xx_hal_sd.h
stm32f7xx_hal_sd.h
268:751 (39%)
269:736 (39%)
view
80 x 2 portable/STM32F4xx
portable/STM32F7xx
stm32f4xx_hal_sd.c
stm32f7xx_hal_sd.c
2938:3150 (5%)
2983:3195 (5%)
view
71 x 2 portable/Zynq.2019.3
portable/Zynq
xsdps_options.c
xsdps_options.c
802:962 (10%)
673:833 (15%)
view
70 x 2 portable/ATSAM4E
portable/lpc18xx
ff_sddisk.c
ff_sddisk.c
498:624 (20%)
323:449 (28%)
view
69 x 2 portable/Zynq.2019.3
portable/Zynq
xsdps.c
xsdps.c
1364:1525 (5%)
1028:1189 (9%)
view
67 x 2 portable/STM32F4xx
portable/STM32F7xx
stm32f4xx_hal_sd.c
stm32f7xx_hal_sd.c
737:887 (4%)
822:972 (4%)
view
66 x 2 portable/STM32F4xx
portable/STM32F7xx
stm32f4xx_hal_sd.c
stm32f7xx_hal_sd.c
367:559 (4%)
457:651 (4%)
view
62 x 2 portable/ATSAM4E
portable/ATSAM4E
ff_sddisk.c
ff_sddisk_r.c
516:631 (18%)
360:475 (25%)
view
60 x 2 portable/STM32F4xx
portable/STM32F7xx
stm32f4xx_hal_sd.c
stm32f7xx_hal_sd.c
3273:3392 (4%)
3318:3437 (4%)
view
59 x 2 portable/ATSAM4E
portable/lpc18xx
ff_sddisk_r.c
ff_sddisk.c
360:468 (23%)
341:449 (24%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 55 unit duplicates...
Size#FoldersFilesLinesCode
124 x 2 portable/STM32F7xx
portable/STM32F4xx
stm32f7xx_hal_sd.c
stm32f4xx_hal_sd.c
1711:1915 
1649:1853 
view
121 x 2 portable/Zynq
portable/Zynq.2019.3
xsdps_info.c
xsdps_info.c
147:315 
147:315 
view
65 x 2 portable/STM32F7xx
portable/STM32F4xx
stm32f7xx_hal_sd.c
stm32f4xx_hal_sd.c
1349:1435 
1279:1365 
view
59 x 2 portable/STM32F7xx
portable/STM32F4xx
stm32f7xx_hal_sd.c
stm32f4xx_hal_sd.c
1260:1338 
1190:1268 
view
57 x 2 portable/Zynq
portable/Zynq.2019.3
xsdps_info.c
xsdps_info.c
42:109 
42:109 
view
47 x 5 portable/lpc18xx
portable/ATSAM4E
portable/ATSAM4E
portable/STM32F7xx
portable/STM32F4xx
ff_sddisk.c
ff_sddisk.c
ff_sddisk_r.c
ff_sddisk.c
ff_sddisk.c
390:450 
565:625 
409:469 
746:806 
661:721 
view
44 x 2 portable/Zynq
portable/Zynq.2019.3
xsdps.c
xsdps.c
1043:1107 
1378:1442 
view
43 x 2 portable/STM32F7xx
portable/STM32F4xx
ff_sddisk.c
ff_sddisk.c
1040:1114 
956:1030 
view
42 x 2 portable/Zynq
portable/Zynq.2019.3
ff_sddisk.c
ff_sddisk.c
883:937 
980:1034 
view
42 x 2 portable/STM32F7xx
portable/STM32F4xx
stm32f7xx_hal_sd.c
stm32f4xx_hal_sd.c
2324:2399 
2278:2353 
view
41 x 2 portable/STM32F7xx
portable/STM32F4xx
stm32f7xx_hal_sd.c
stm32f4xx_hal_sd.c
1928:1976 
1866:1914 
view
36 x 2 portable/Zynq
portable/Zynq.2019.3
ff_sddisk.c
ff_sddisk.c
710:766 
807:863 
view
32 x 2 portable/ATSAM4E
portable/ATSAM4E
ff_sddisk.c
ff_sddisk_r.c
660:699 
505:544 
view
31 x 2 portable/STM32F7xx
portable/STM32F4xx
stm32f7xx_hal_sd.c
stm32f4xx_hal_sd.c
2883:2928 
2837:2882 
view
31 x 2 portable/STM32F7xx
portable/STM32F4xx
ff_sddisk.c
ff_sddisk.c
603:640 
518:555 
view
30 x 2 portable/lpc18xx
portable/ATSAM4E
ff_sddisk.c
ff_sddisk.c
283:319 
422:458 
view
30 x 2 portable/STM32F7xx
portable/STM32F4xx
ff_sddisk.c
ff_sddisk.c
842:880 
757:795 
view
27 x 2 portable/Zynq
portable/Zynq.2019.3
ff_sddisk.c
ff_sddisk.c
484:515 
581:612 
view
24 x 2 portable/Zynq
portable/Zynq.2019.3
ff_sddisk.c
ff_sddisk.c
769:800 
866:897 
view
24 x 2 portable/STM32F7xx
portable/STM32F4xx
stm32f7xx_hal_sd.c
stm32f4xx_hal_sd.c
2842:2876 
2796:2830 
view