microsoft / RIoT
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
  • 83% duplication:
    • 26,031 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 21,823 duplicated lines
  • 490 duplicates
system83% (21,823 lines)
Duplication per Extension
c96% (17,327 lines)
h98% (3,986 lines)
vcxproj48% (234 lines)
cs5% (131 lines)
cpp15% (89 lines)
java12% (38 lines)
filters9% (18 lines)
Duplication per Component (primary)
Simulation/RIoT96% (10,717 lines)
Reference/RIoT96% (10,607 lines)
Simulation/DICE23% (106 lines)
Tools/RIoT7% (105 lines)
Reference29% (79 lines)
Tools/TlsClient21% (79 lines)
Simulation/FW39% (66 lines)
Pkgs/Maven12% (38 lines)
Tools/RIoTDemo7% (26 lines)
Pkgs/NuGet0% (0 lines)
Tools/DICETest0% (0 lines)

Duplication Between Components (50+ lines)

G Reference/RIoT Reference/RIoT Simulation/RIoT Simulation/RIoT Reference/RIoT--Simulation/RIoT 21214 Simulation/DICE Simulation/DICE Tools/TlsClient Tools/TlsClient Simulation/DICE--Tools/TlsClient 138 Simulation/FW Simulation/FW Simulation/FW--Simulation/RIoT 132 Reference Reference Reference--Simulation/RIoT 74

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 490 duplicates...
Size#FoldersFilesLinesCode
1411 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecp.c
ecp.c
91:3134 (100%)
91:3134 (100%)
view
1286 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
aes.c
aes.c
61:2204 (100%)
61:2204 (100%)
view
752 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
bignum.c
bignum.c
1436:2836 (53%)
1436:2836 (53%)
view
684 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecp_curves.c
ecp_curves.c
249:1464 (82%)
249:1464 (82%)
view
661 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
bignum.c
bignum.c
63:1439 (46%)
63:1439 (46%)
view
630 x 2 Reference/RIoT/RIoTCrypt/include/mbedtls
Simulation/RIoT/Core/RIoTCrypt/include/mbedtls
bn_mul.h
bn_mul.h
57:932 (100%)
57:932 (100%)
view
486 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecdsa.c
ecdsa.c
60:1006 (100%)
60:1006 (100%)
view
476 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
x509bldr.c
x509bldr.c
18:628 (100%)
18:628 (100%)
view
470 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
md.c
md.c
61:872 (100%)
61:872 (100%)
view
369 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecdh.c
ecdh.c
44:729 (100%)
44:729 (100%)
view
351 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
derenc.c
derenc.c
47:600 (100%)
47:600 (100%)
view
302 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
sha1.c
sha1.c
50:568 (100%)
50:568 (100%)
view
299 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
sha256.c
sha256.c
53:581 (100%)
53:581 (100%)
view
296 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
hmac_drbg.c
hmac_drbg.c
57:620 (100%)
57:620 (100%)
view
204 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
RiotCrypt.c
RiotCrypt.c
14:390 (58%)
14:390 (58%)
view
175 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
base64.c
base64.c
11:311 (100%)
11:311 (100%)
view
157 x 2 Reference/RIoT/RIoTCrypt/include/mbedtls
Simulation/RIoT/Core/RIoTCrypt/include/mbedtls
ecp.h
ecp.h
65:1177 (100%)
65:1177 (100%)
view
152 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecp_curves.c
ecp_curves.c
39:251 (18%)
39:251 (18%)
view
144 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
RiotCrypt.c
RiotCrypt.c
395:674 (41%)
395:674 (41%)
view
136 x 2 Reference/RIoT/RIoTCrypt/include
Simulation/RIoT/Core/RIoTCrypt/include
RiotCrypt.h
RiotCrypt.h
14:263 (100%)
14:263 (100%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 249 unit duplicates...
Size#FoldersFilesLinesCode
314 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
aes.c
aes.c
1786:2205 
1786:2205 
view
142 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
sha1.c
sha1.c
130:292 
130:292 
view
128 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
bignum.c
bignum.c
1926:2138 
1926:2138 
view
116 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
bignum.c
bignum.c
2681:2837 
2681:2837 
view
96 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecp.c
ecp.c
3013:3135 
3013:3135 
view
93 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
bignum.c
bignum.c
1629:1742 
1629:1742 
view
90 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
aes.c
aes.c
556:665 
556:665 
view
90 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecp.c
ecp.c
1691:1821 
1691:1821 
view
89 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecdsa.c
ecdsa.c
256:387 
256:387 
view
84 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecp.c
ecp.c
2080:2199 
2080:2199 
view
80 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecdsa.c
ecdsa.c
427:551 
427:551 
view
78 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
hkdf.c
hkdf.c
84:190 
84:190 
view
75 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
bignum.c
bignum.c
2545:2663 
2545:2663 
view
74 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
bignum.c
bignum.c
2236:2329 
2236:2329 
view
73 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecp.c
ecp.c
2566:2657 
2566:2657 
view
73 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecp_curves.c
ecp_curves.c
754:842 
754:842 
view
65 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
aes.c
aes.c
1171:1275 
1171:1275 
view
62 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecdsa.c
ecdsa.c
599:702 
599:702 
view
60 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
bignum.c
bignum.c
571:653 
571:653 
view
59 x 2 Reference/RIoT/RIoTCrypt
Simulation/RIoT/Core/RIoTCrypt
ecp.c
ecp.c
1433:1512 
1433:1512 
view