freertos / FreeRTOS-Kernel
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
  • 71% duplication:
    • 56,269 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 40,278 duplicated lines
  • 8,492 duplicates
system71% (40,278 lines)
Duplication per Extension
c67% (17,932 lines)
h75% (14,033 lines)
s84% (4,236 lines)
S69% (3,625 lines)
asm48% (407 lines)
inc30% (45 lines)
Duplication per Component (primary)
portable/GCC76% (15,438 lines)
portable/IAR90% (14,955 lines)
portable/ARMv8M98% (3,413 lines)
portable/RVDS74% (1,485 lines)
portable/MPLAB46% (1,230 lines)
portable/Renesas78% (794 lines)
portable/CCS64% (702 lines)
ROOT14% (605 lines)
portable/CodeWarrior70% (315 lines)
portable/MemMang58% (291 lines)
portable/BCC88% (199 lines)
portable/oWatcom73% (184 lines)
portable/MikroC50% (143 lines)
portable/Softune33% (131 lines)
portable/Paradigm63% (127 lines)
portable/Rowley64% (124 lines)
portable/Tasking45% (123 lines)
include1% (12 lines)
portable/Common<1% (7 lines)
portable/SDCC0% (0 lines)
portable/MSVC-MingW0% (0 lines)
portable/WizC0% (0 lines)

Duplication Between Components (50+ lines)

G portable/GCC portable/GCC portable/IAR portable/IAR portable/GCC--portable/IAR 20092 portable/RVDS portable/RVDS portable/GCC--portable/RVDS 2123 portable/Renesas portable/Renesas portable/GCC--portable/Renesas 1001 portable/MikroC portable/MikroC portable/GCC--portable/MikroC 826 portable/MPLAB portable/MPLAB portable/GCC--portable/MPLAB 811 portable/Rowley portable/Rowley portable/GCC--portable/Rowley 621 portable/Tasking portable/Tasking portable/GCC--portable/Tasking 284 portable/MemMang portable/MemMang portable/GCC--portable/MemMang 309 ROOT ROOT portable/GCC--ROOT 78 portable/IAR--portable/RVDS 2571 portable/IAR--portable/Renesas 887 portable/IAR--portable/MikroC 743 portable/IAR--portable/MPLAB 715 portable/IAR--portable/Rowley 706 portable/IAR--portable/Tasking 361 portable/IAR--portable/MemMang 309 portable/IAR--ROOT 78 portable/ARMv8M portable/ARMv8M portable/ARMv8M--portable/GCC 6526 portable/ARMv8M--portable/IAR 6102 portable/ARMv8M--portable/RVDS 283 portable/CCS portable/CCS portable/ARMv8M--portable/CCS 171 portable/ARMv8M--portable/Renesas 84 portable/CodeWarrior portable/CodeWarrior portable/ARMv8M--portable/CodeWarrior 276 portable/ARMv8M--portable/MikroC 150 portable/ARMv8M--portable/MPLAB 363 portable/ARMv8M--portable/Rowley 189 portable/ARMv8M--portable/Tasking 66 portable/ARMv8M--portable/MemMang 229 portable/ARMv8M--ROOT 72 portable/RVDS--portable/Renesas 78 portable/RVDS--portable/Tasking 190 portable/CCS--portable/GCC 1236 portable/CCS--portable/IAR 1686 portable/CCS--portable/RVDS 872 portable/CCS--portable/MikroC 258 portable/CCS--portable/Rowley 62 portable/CCS--portable/Tasking 215 portable/CodeWarrior--portable/GCC 938 portable/CodeWarrior--portable/IAR 600 portable/CodeWarrior--portable/RVDS 54 portable/CodeWarrior--portable/MPLAB 219 portable/CodeWarrior--portable/Rowley 81 portable/MikroC--portable/RVDS 475 portable/MPLAB--portable/RVDS 67 portable/MPLAB--portable/Renesas 54 portable/MPLAB--portable/Rowley 162 portable/MemMang--ROOT 78 portable/BCC portable/BCC portable/oWatcom portable/oWatcom portable/BCC--portable/oWatcom 265 portable/Paradigm portable/Paradigm portable/BCC--portable/Paradigm 166 portable/Paradigm--portable/oWatcom 57

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 8,492 duplicates...
Size#FoldersFilesLinesCode
1731 x 2 portable/GCC/ARM7_AT91SAM7S
portable/IAR/AtmelSAM7S64
lib_AT91SAM7X256.h
lib_AT91SAM7X256.h
55:4555 (100%)
55:4555 (100%)
view
1731 x 2 portable/IAR/AtmelSAM7S64
portable/IAR/AtmelSAM7S64
lib_AT91SAM7X128.h
lib_AT91SAM7X256.h
55:4555 (100%)
55:4555 (100%)
view
1731 x 2 portable/GCC/ARM7_AT91SAM7S
portable/IAR/AtmelSAM7S64
lib_AT91SAM7X256.h
lib_AT91SAM7X128.h
55:4555 (100%)
55:4555 (100%)
view
661 x 2 portable/GCC/ARM7_AT91SAM7S
portable/IAR/AtmelSAM7S64
AT91SAM7X256.h
AT91SAM7X128.h
49:1823 (98%)
49:1823 (100%)
view
661 x 2 portable/GCC/ARM7_AT91SAM7S
portable/IAR/AtmelSAM7S64
ioat91sam7x256.h
AT91SAM7X128.h
49:1823 (28%)
49:1823 (100%)
view
661 x 2 portable/GCC/ARM7_AT91SAM7S
portable/GCC/ARM7_AT91SAM7S
AT91SAM7X256.h
ioat91sam7x256.h
49:1823 (98%)
49:1823 (28%)
view
661 x 2 portable/IAR/AtmelSAM7S64
portable/IAR/AtmelSAM7S64
AT91SAM7X128.h
AT91SAM7X256.h
49:1823 (100%)
49:1823 (100%)
view
661 x 2 portable/GCC/ARM7_AT91SAM7S
portable/IAR/AtmelSAM7S64
ioat91sam7x256.h
AT91SAM7X256.h
49:1823 (28%)
49:1823 (100%)
view
661 x 2 portable/GCC/ARM7_AT91SAM7S
portable/IAR/AtmelSAM7S64
AT91SAM7X256.h
AT91SAM7X256.h
49:1823 (98%)
49:1823 (100%)
view
356 x 2 portable/ARMv8M/non_secure/portable/IAR/ARM_CM23
portable/IAR/ARM_CM23/non_secure
s
portasm.s
portasm.s
1:391 (100%)
1:391 (100%)
view
351 x 2 portable/ARMv8M/non_secure/portable/GCC/ARM_CM23
portable/GCC/ARM_CM23/non_secure
portasm.c
portasm.c
47:458 (100%)
47:458 (100%)
view
341 x 2 portable/GCC/ARM_CM33_NTZ/non_secure
portable/IAR/ARM_CM33_NTZ/non_secure
port.c
port.c
290:1195 (100%)
290:1195 (100%)
view
341 x 2 portable/GCC/ARM_CM23/non_secure
portable/IAR/ARM_CM33_NTZ/non_secure
port.c
port.c
290:1195 (100%)
290:1195 (100%)
view
341 x 2 portable/IAR/ARM_CM23/non_secure
portable/IAR/ARM_CM33/non_secure
port.c
port.c
290:1195 (100%)
290:1195 (100%)
view
341 x 2 portable/GCC/ARM_CM23/non_secure
portable/GCC/ARM_CM33/non_secure
port.c
port.c
290:1195 (100%)
290:1195 (100%)
view
341 x 2 portable/GCC/ARM_CM23_NTZ/non_secure
portable/IAR/ARM_CM33_NTZ/non_secure
port.c
port.c
290:1195 (100%)
290:1195 (100%)
view
341 x 2 portable/ARMv8M/non_secure
portable/IAR/ARM_CM23/non_secure
port.c
port.c
290:1195 (100%)
290:1195 (100%)
view
341 x 2 portable/GCC/ARM_CM23_NTZ/non_secure
portable/IAR/ARM_CM23/non_secure
port.c
port.c
290:1195 (100%)
290:1195 (100%)
view
341 x 2 portable/GCC/ARM_CM23_NTZ/non_secure
portable/GCC/ARM_CM33_NTZ/non_secure
port.c
port.c
290:1195 (100%)
290:1195 (100%)
view
341 x 2 portable/GCC/ARM_CM33_NTZ/non_secure
portable/IAR/ARM_CM33/non_secure
port.c
port.c
290:1195 (100%)
290:1195 (100%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 236 unit duplicates...
Size#FoldersFilesLinesCode
181 x 2 portable/GCC/ARM_CM23/non_secure
portable/ARMv8M/non_secure/portable/GCC/ARM_CM23
portasm.c
portasm.c
228:409 
228:409 
view
166 x 2 portable/GCC/ARM_CM33/non_secure
portable/ARMv8M/non_secure/portable/GCC/ARM_CM33
portasm.c
portasm.c
212:378 
212:378 
view
121 x 2 portable/GCC/ARM_CM23_NTZ/non_secure
portable/ARMv8M/non_secu...rtable/GCC/ARM_CM23_NTZ
portasm.c
portasm.c
223:344 
223:344 
view
96 x 2 portable/GCC/ARM_CM33_NTZ/non_secure
portable/ARMv8M/non_secu...rtable/GCC/ARM_CM33_NTZ
portasm.c
portasm.c
207:303 
207:303 
view
86 x 2 portable/GCC/ARM_CM23/non_secure
portable/ARMv8M/non_secure/portable/GCC/ARM_CM23
portasm.c
portasm.c
47:133 
47:133 
view
85 x 2 portable/GCC/MicroBlazeV9
portable/GCC/MicroBlazeV8
port_exceptions.c
port_exceptions.c
103:226 
103:226 
view
81 x 2 portable/GCC/ARM_CM23_NTZ/non_secure
portable/ARMv8M/non_secu...rtable/GCC/ARM_CM23_NTZ
portasm.c
portasm.c
47:128 
47:128 
view
78 x 9 portable/IAR/ARM_CM33_NTZ/non_secure
portable/IAR/ARM_CM23_NTZ/non_secure
portable/IAR/ARM_CM33/non_secure
portable/IAR/ARM_CM23/non_secure
portable/GCC/ARM_CM33_NTZ/non_secure
portable/GCC/ARM_CM23_NTZ/non_secure
portable/GCC/ARM_CM33/non_secure
portable/GCC/ARM_CM23/non_secure
portable/ARMv8M/non_secure
port.c
port.c
port.c
port.c
port.c
port.c
port.c
port.c
port.c
1052:1172 
1052:1172 
1052:1172 
1052:1172 
1052:1172 
1052:1172 
1052:1172 
1052:1172 
1052:1172 
view
73 x 9 portable/IAR/ARM_CM33_NTZ/non_secure
portable/IAR/ARM_CM23_NTZ/non_secure
portable/IAR/ARM_CM33/non_secure
portable/IAR/ARM_CM23/non_secure
portable/GCC/ARM_CM33_NTZ/non_secure
portable/GCC/ARM_CM23_NTZ/non_secure
portable/GCC/ARM_CM33/non_secure
portable/GCC/ARM_CM23/non_secure
portable/ARMv8M/non_secure
port.c
port.c
port.c
port.c
port.c
port.c
port.c
port.c
port.c
765:881 
765:881 
765:881 
765:881 
765:881 
765:881 
765:881 
765:881 
765:881 
view
73 x 2 portable/GCC/ARM_CM33/non_secure
portable/ARMv8M/non_secure/portable/GCC/ARM_CM33
portasm.c
portasm.c
43:116 
43:116 
view
68 x 4 portable/IAR/ARM_CM7/r0p1
portable/IAR/ARM_CM0
portable/IAR/ARM_CM4F
portable/IAR/ARM_CM3
port.c
port.c
port.c
port.c
384:547 
268:431 
396:559 
359:522 
view
68 x 2 portable/GCC/ARM_CM33_NTZ/non_secure
portable/ARMv8M/non_secu...rtable/GCC/ARM_CM33_NTZ
portasm.c
portasm.c
43:111 
43:111 
view
68 x 2 portable/CCS/ARM_CM4F
portable/CCS/ARM_CM3
port.c
port.c
382:545 
357:520 
view
68 x 4 portable/RVDS/ARM_CM7/r0p1
portable/RVDS/ARM_CM0
portable/RVDS/ARM_CM4F
portable/RVDS/ARM_CM3
port.c
port.c
port.c
port.c
529:692 
382:545 
543:706 
451:614 
view
58 x 2 portable/GCC/RX600v2
portable/GCC/RX200
port.c
port.c
275:382 
281:388 
view
57 x 9 portable/IAR/ARM_CM33_NTZ/non_secure
portable/IAR/ARM_CM23_NTZ/non_secure
portable/IAR/ARM_CM33/non_secure
portable/IAR/ARM_CM23/non_secure
portable/GCC/ARM_CM33_NTZ/non_secure
portable/GCC/ARM_CM23_NTZ/non_secure
portable/GCC/ARM_CM33/non_secure
portable/GCC/ARM_CM23/non_secure
portable/ARMv8M/non_secure
port.c
port.c
port.c
port.c
port.c
port.c
port.c
port.c
port.c
602:683 
602:683 
602:683 
602:683 
602:683 
602:683 
602:683 
602:683 
602:683 
view
54 x 5 portable/IAR/ARM_CM33/secure
portable/IAR/ARM_CM23/secure
portable/GCC/ARM_CM33/secure
portable/GCC/ARM_CM23/secure
portable/ARMv8M/secure/context
secure_context.c
secure_context.c
secure_context.c
secure_context.c
secure_context.c
182:275 
182:275 
182:275 
182:275 
182:275 
view
54 x 2 portable/GCC/ARM_CM3_MPU
portable/GCC/ARM_CM4_MPU
port.c
port.c
255:332 
275:351 
view
42 x 7 portable/IAR/ARM_CM33/secure
portable/IAR/ARM_CM23/secure
portable/GCC/ARM_CM33/secure
portable/GCC/ARM_CM23/secure
portable/ARMv8M/secure/heap
portable/MemMang
portable/MemMang
secure_heap.c
secure_heap.c
secure_heap.c
secure_heap.c
secure_heap.c
heap_4.c
heap_5.c
183:243 
183:243 
183:243 
183:243 
183:243 
392:452 
346:406 
view
35 x 2 portable/IAR/RX700v3_DPFPU
portable/GCC/RX700v3_DPFPU
port.c
port.c
311:385 
334:408 
view