freertos / coreMQTT-Agent-Demos
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
  • 14% duplication:
    • 8,314 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,234 duplicated lines
  • 64 duplicates
system14% (1,234 lines)
Duplication per Extension
c20% (1,042 lines)
h6% (96 lines)
ld43% (50 lines)
js11% (32 lines)
vcxproj4% (14 lines)
Duplication per Component (primary)
lib/FreeRTOS/network_transport38% (402 lines)
source/demo-tasks20% (318 lines)
build/Cortex-M3_MPS2_QEMU_GCC/target-specific-source14% (223 lines)
source/defender-tools27% (142 lines)
build/Cortex-M3_MPS2_QEMU_GCC43% (50 lines)
build/VisualStudio/target-specific-source23% (37 lines)
lib/AWS/tools3% (32 lines)
lib/FreeRTOS/utilities1% (16 lines)
build/VisualStudio1% (14 lines)
lib/FreeRTOS/mqtt-agent-interface0% (0 lines)
lib/AWS/ota-pal0% (0 lines)
source/subscription-manager0% (0 lines)
source0% (0 lines)
source/configuration-files0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 64 duplicates...
Size#FoldersFilesLinesCode
70 x 2 lib/FreeRTOS/network_tra..._plus_tcp/using_mbedtls
lib/FreeRTOS/network_tra...cp/using_mbedtls_pkcs11
using_mbedtls.c
using_mbedtls_pkcs11.c
691:827 (18%)
837:973 (16%)
view
54 x 2 build/Cortex-M3_MPS2_QEM.../target-specific-source
build/Cortex-M3_MPS2_QEM.../target-specific-source
startup-pico-libc.c
startup.c
123:210 (48%)
113:200 (50%)
view
36 x 2 source/demo-tasks
source/demo-tasks
shadow_device_task.c
shadow_update_task.c
633:706 (12%)
449:522 (18%)
view
33 x 2 lib/FreeRTOS/network_tra..._plus_tcp/using_mbedtls
lib/FreeRTOS/network_tra...cp/using_mbedtls_pkcs11
using_mbedtls.c
using_mbedtls_pkcs11.c
614:664 (8%)
770:820 (7%)
view
26 x 2 source/demo-tasks
source/demo-tasks
shadow_device_task.c
shadow_update_task.c
521:595 (9%)
356:430 (13%)
view
25 x 2 build/Cortex-M3_MPS2_QEMU_GCC
build/Cortex-M3_MPS2_QEMU_GCC
ld
mps2_m3-pico-libc.ld
mps2_m3.ld
1:25 (80%)
1:25 (29%)
view
23 x 2 lib/FreeRTOS/network_tra..._plus_tcp/using_mbedtls
lib/FreeRTOS/network_tra...cp/using_mbedtls_pkcs11
using_mbedtls.h
using_mbedtls_pkcs11.h
95:173 (50%)
107:185 (46%)
view
21 x 2 source/demo-tasks
source/demo-tasks
ota_over_mqtt_demo.c
ota_over_mqtt_demo.c
795:820 (5%)
927:953 (5%)
view
20 x 2 source/demo-tasks
source/demo-tasks
shadow_device_task.c
shadow_update_task.c
363:395 (7%)
310:342 (10%)
view
20 x 2 build/Cortex-M3_MPS2_QEM.../target-specific-source
build/Cortex-M3_MPS2_QEM.../target-specific-source
startup-pico-libc.c
startup.c
83:102 (17%)
74:93 (18%)
view
19 x 2 build/Cortex-M3_MPS2_QEM.../target-specific-source
build/VisualStudio/target-specific-source
logging_output_qemu.c
logging_output_windows.c
170:196 (25%)
303:329 (12%)
view
15 x 2 source/demo-tasks
source/demo-tasks
shadow_device_task.c
shadow_update_task.c
301:326 (5%)
264:289 (7%)
view
15 x 2 lib/FreeRTOS/network_tra..._plus_tcp/using_mbedtls
lib/FreeRTOS/network_tra...cp/using_mbedtls_pkcs11
using_mbedtls.c
using_mbedtls_pkcs11.c
446:469 (4%)
228:251 (3%)
view
14 x 2 source/demo-tasks
source/demo-tasks
shadow_device_task.c
shadow_update_task.c
639:670 (4%)
365:410 (7%)
view
14 x 2 source/demo-tasks
source/demo-tasks
shadow_device_task.c
shadow_update_task.c
530:575 (4%)
455:486 (7%)
view
14 x 2 lib/FreeRTOS/network_tra..._plus_tcp/using_mbedtls
lib/FreeRTOS/network_tra...cp/using_mbedtls_pkcs11
using_mbedtls.c
using_mbedtls_pkcs11.c
501:528 (3%)
349:377 (3%)
view
14 x 2 source/demo-tasks
source/demo-tasks
shadow_update_task.c
shadow_update_task.c
365:410 (7%)
455:486 (7%)
view
14 x 2 source/demo-tasks
source/demo-tasks
shadow_device_task.c
shadow_device_task.c
530:575 (4%)
639:670 (4%)
view
12 x 2 build/Cortex-M3_MPS2_QEM.../target-specific-source
build/Cortex-M3_MPS2_QEM.../target-specific-source
startup-pico-libc.c
startup.c
42:59 (10%)
42:59 (11%)
view
11 x 2 source/defender-tools
source/defender-tools
report_builder.c
report_builder.c
252:274 (3%)
339:361 (3%)
view
Duplicated Units
The list of top 8 duplicated units.
See data for all 8 unit duplicates...
Size#FoldersFilesLinesCode
28 x 2 lib/FreeRTOS/network_tra..._plus_tcp/using_mbedtls
lib/FreeRTOS/network_tra...cp/using_mbedtls_pkcs11
using_mbedtls.c
using_mbedtls_pkcs11.c
755:790 
900:935 
view
28 x 2 lib/FreeRTOS/network_tra..._plus_tcp/using_mbedtls
lib/FreeRTOS/network_tra...cp/using_mbedtls_pkcs11
using_mbedtls.c
using_mbedtls_pkcs11.c
793:828 
939:974 
view
13 x 2 build/Cortex-M3_MPS2_QEM.../target-specific-source
build/Cortex-M3_MPS2_QEM.../target-specific-source
startup-pico-libc.c
startup.c
168:181 
158:171 
view
13 x 2 build/Cortex-M3_MPS2_QEM...t-specific-source/CMSIS
build/Cortex-M3_MPS2_QEM...t-specific-source/CMSIS
cmsis_gcc.h
cmsis_gcc.h
1969:1984 
1986:2001 
view
12 x 2 build/Cortex-M3_MPS2_QEM.../target-specific-source
build/Cortex-M3_MPS2_QEM.../target-specific-source
startup-pico-libc.c
startup.c
135:151 
125:141 
view
12 x 2 build/Cortex-M3_MPS2_QEM.../target-specific-source
build/Cortex-M3_MPS2_QEM.../target-specific-source
startup-pico-libc.c
startup.c
154:166 
144:156 
view
10 x 2 build/Cortex-M3_MPS2_QEM.../target-specific-source
build/Cortex-M3_MPS2_QEM.../target-specific-source
startup-pico-libc.c
startup.c
199:211 
189:201 
view
6 x 2 build/Cortex-M3_MPS2_QEM.../target-specific-source
build/Cortex-M3_MPS2_QEM.../target-specific-source
startup-pico-libc.c
startup.c
189:196 
179:186 
view