freertos / Lab-Project-FreeRTOS-LoRaWAN
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
  • 19% duplication:
    • 43,795 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 8,739 duplicated lines
  • 1,227 duplicates
system19% (8,739 lines)
Duplication per Extension
c22% (4,745 lines)
h17% (3,994 lines)
Duplication per Component (primary)
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver19% (4,907 lines)
boards/STM32L475_Discovery/CMSIS34% (2,207 lines)
boards/STM32L475_Discovery/BSP6% (542 lines)
boards/STM32L475_Discovery/common_io44% (485 lines)
boards/STM32L475_Discovery36% (191 lines)
boards/Nordic_NRF5257% (191 lines)
boards/Nordic_NRF52/common_io20% (182 lines)
boards22% (34 lines)
common_io/include0% (0 lines)
logging0% (0 lines)
logging/include0% (0 lines)
freertos_osal0% (0 lines)

Duplication Between Components (50+ lines)

G boards/Nordic_NRF52 boards/Nordic_NRF52 boards/STM32L475_Discovery boards/STM32L475_Discovery boards/Nordic_NRF52--boards/STM32L475_Discovery 382 boards/Nordic_NRF52/common_io boards/Nordic_NRF52/common_io boards/STM32L475_Discovery/common_io boards/STM32L475_Discovery/common_io boards/Nordic_NRF52/common_io--boards/STM32L475_Discovery/common_io 128

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 1,227 duplicates...
Size#FoldersFilesLinesCode
199 x 2 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm3.h
core_sc300.h
651:1748 (70%)
645:1730 (69%)
view
191 x 2 boards/Nordic_NRF52
boards/STM32L475_Discovery
rtc-board.c
rtc-board.c
90:701 (100%)
90:701 (100%)
view
105 x 2 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm3.h
core_cm4.h
653:1235 (36%)
709:1297 (35%)
view
105 x 2 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm4.h
core_sc300.h
709:1297 (35%)
646:1217 (36%)
view
94 x 2 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm4.h
core_sc300.h
1404:1922 (31%)
1217:1730 (32%)
view
94 x 2 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm3.h
core_cm4.h
1235:1748 (33%)
1404:1922 (31%)
view
93 x 2 boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
stm32l4xx_hal_uart_ex.h
stm32l4xx_hal_uart_ex.h
356:450 (20%)
511:605 (20%)
view
85 x 2 boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
stm32l4xx_hal_irda_ex.h
stm32l4xx_hal_irda_ex.h
75:159 (27%)
297:381 (27%)
view
85 x 2 boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
stm32l4xx_hal_uart_ex.h
stm32l4xx_hal_uart_ex.h
257:341 (18%)
542:626 (18%)
view
78 x 2 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm3.h
core_sc300.h
178:439 (27%)
178:439 (27%)
view
72 x 2 boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
stm32l4xx_hal_irda_ex.h
stm32l4xx_hal_irda_ex.h
174:247 (23%)
287:360 (23%)
view
72 x 2 boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
stm32l4xx_hal_uart_ex.h
stm32l4xx_hal_uart_ex.h
444:517 (15%)
511:584 (15%)
view
72 x 2 boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
stm32l4xx_hal_uart_ex.h
stm32l4xx_hal_uart_ex.h
356:429 (15%)
444:517 (15%)
view
69 x 2 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm4.h
core_cm7.h
508:923 (23%)
552:1125 (14%)
view
68 x 2 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm4.h
core_cm7.h
226:492 (22%)
226:507 (14%)
view
64 x 2 boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
stm32l4xx_hal_irda_ex.h
stm32l4xx_hal_irda_ex.h
75:138 (20%)
184:247 (20%)
view
64 x 2 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm3.h
core_cm7.h
653:862 (22%)
911:1125 (13%)
view
64 x 2 boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
boards/STM32L475_Discove...TM32L4xx_HAL_Driver/Inc
stm32l4xx_hal_uart_ex.h
stm32l4xx_hal_uart_ex.h
257:320 (13%)
387:450 (13%)
view
64 x 2 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm7.h
core_sc300.h
911:1125 (13%)
646:844 (22%)
view
57 x 2 boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
stm32l4xx_hal_rtc.c
stm32l4xx_hal_rtc.c
765:860 (11%)
949:1041 (11%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 44 unit duplicates...
Size#FoldersFilesLinesCode
80 x 2 boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
stm32l4xx_hal_tim.c
stm32l4xx_hal_tim.c
914:1036 
1477:1598 
view
79 x 2 boards/STM32L475_Discovery
boards/Nordic_NRF52
rtc-board.c
rtc-board.c
373:474 
373:474 
view
66 x 2 boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
stm32l4xx_hal_tim_ex.c
stm32l4xx_hal_tim_ex.c
705:804 
1098:1196 
view
38 x 2 boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
stm32l4xx_hal_tim.c
stm32l4xx_hal_tim.c
777:833 
1340:1396 
view
36 x 2 boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
stm32l4xx_hal_tim.c
stm32l4xx_hal_tim.c
1049:1105 
1611:1667 
view
35 x 2 boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
stm32l4xx_hal_tim.c
stm32l4xx_hal_tim.c
846:899 
1409:1462 
view
33 x 2 boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
stm32l4xx_hal_tim_ex.c
stm32l4xx_hal_tim_ex.c
639:690 
1031:1083 
view
31 x 2 boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
stm32l4xx_hal_tim_ex.c
stm32l4xx_hal_tim_ex.c
576:626 
969:1018 
view
28 x 2 boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
stm32l4xx_hal_tim_ex.c
stm32l4xx_hal_tim_ex.c
817:863 
1209:1255 
view
26 x 2 boards/STM32L475_Discovery
boards/Nordic_NRF52
rtc-board.c
rtc-board.c
669:702 
669:702 
view
22 x 2 boards/STM32L475_Discovery
boards/Nordic_NRF52
rtc-board.c
rtc-board.c
535:569 
535:569 
view
20 x 2 boards/STM32L475_Discovery
boards/Nordic_NRF52
rtc-board.c
rtc-board.c
500:528 
500:528 
view
14 x 2 boards/STM32L475_Discovery/common_io
boards/STM32L475_Discovery/common_io
iot_spi.c
iot_spi.c
627:641 
644:658 
view
13 x 2 boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
boards/STM32L475_Discovery/STM32L4xx_HAL_Driver
stm32l4xx_hal_tim.c
stm32l4xx_hal_tim.c
708:730 
1268:1290 
view
13 x 2 boards/STM32L475_Discovery
boards/Nordic_NRF52
rtc-board.c
rtc-board.c
603:625 
603:625 
view
13 x 7 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_sc300.h
core_cm0plus.h
core_cm3.h
core_cm4.h
core_sc000.h
core_cm7.h
core_cm0.h
1638:1652 
885:899 
1656:1670 
1830:1844 
897:911 
2405:2419 
769:783 
view
12 x 4 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_sc300.h
core_cm3.h
core_cm4.h
core_cm7.h
1680:1692 
1698:1710 
1872:1884 
2447:2459 
view
12 x 3 boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
boards/STM32L475_Discovery/CMSIS/Include
core_cm0plus.h
core_sc000.h
core_cm0.h
804:816 
816:828 
688:700 
view
11 x 2 boards/STM32L475_Discovery
boards/Nordic_NRF52
rtc-board.c
rtc-board.c
152:215 
152:215 
view
11 x 2 boards/STM32L475_Discovery
boards/Nordic_NRF52
rtc-board.c
rtc-board.c
223:242 
223:242 
view