microsoft / SymCrypt
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
  • 26% duplication:
    • 72,353 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 19,328 duplicated lines
  • 3,328 duplicates
system26% (19,328 lines)
Duplication per Extension
c30% (9,253 lines)
cpp22% (6,169 lines)
h28% (3,206 lines)
asm24% (443 lines)
yml42% (158 lines)
inc33% (57 lines)
py5% (42 lines)
Duplication per Component (primary)
lib32% (11,063 lines)
unittest22% (6,590 lines)
inc33% (1,435 lines)
ROOT30% (158 lines)
scripts5% (42 lines)
module<1% (26 lines)
gen4% (14 lines)
build0% (0 lines)
cmake-toolchain0% (0 lines)
publics0% (0 lines)
scbuild0% (0 lines)

Duplication Between Components (50+ lines)

G inc inc lib lib inc--lib 3085 unittest unittest lib--unittest 286

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 3,328 duplicates...
Size#FoldersFilesLinesCode
94 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
573:666 (11%)
673:766 (11%)
view
94 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
178:271 (11%)
279:372 (11%)
view
85 x 2 unittest/lib
unittest/lib
testDh.cpp
testDl.cpp
499:597 (10%)
297:395 (16%)
view
69 x 2 unittest/lib
unittest/lib
old-testRsa.cpp
testRsaSign.cpp
296:381 (9%)
56:141 (10%)
view
62 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
505:566 (7%)
673:734 (7%)
view
62 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
110:171 (7%)
178:239 (7%)
view
62 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
505:566 (7%)
573:634 (7%)
view
62 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
110:171 (7%)
279:340 (7%)
view
54 x 2 lib
lib
md4.c
md5.c
242:304 (26%)
303:365 (18%)
view
50 x 2 unittest/lib
unittest/lib
old-testRsa.cpp
testRsaEnc.cpp
1019:1095 (6%)
810:886 (8%)
view
46 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
58:103 (5%)
279:324 (5%)
view
46 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
453:498 (5%)
673:718 (5%)
view
46 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
58:103 (5%)
178:223 (5%)
view
46 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
453:498 (5%)
573:618 (5%)
view
46 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
453:498 (5%)
505:550 (5%)
view
46 x 2 lib
lib
dl_internal_groups.c
dl_internal_groups.c
58:103 (5%)
110:155 (5%)
view
45 x 2 lib
lib
aes-neon.c
aes-neon.c
1105:1168 (3%)
1233:1296 (3%)
view
38 x 2 unittest/lib
unittest/lib
testDh.cpp
testDl.cpp
367:422 (4%)
188:240 (7%)
view
37 x 2 unittest/lib
unittest/lib
cng_implementations.cpp
cng_implementations.cpp
1492:1546 (1%)
1725:1779 (1%)
view
37 x 2 lib
lib
aes-xmm.c
aes-xmm.c
1199:1237 (3%)
1275:1313 (3%)
view
Duplicated Units
The list of top 9 duplicated units.
See data for all 9 unit duplicates...
Size#FoldersFilesLinesCode
23 x 2 unittest/lib
unittest/lib
testDh.cpp
testDl.cpp
367:392 
188:213 
view
22 x 2 unittest/lib
unittest/lib
msbignum_implementations.cpp
testInterop.cpp
372:396 
75:99 
view
9 x 2 unittest/lib
unittest/lib
rsa32_implementations.cpp
sc_implementations.cpp
3062:3073 
1673:1684 
view
8 x 3 unittest/lib
unittest/lib
unittest/lib
cng_imp_hashpattern.cpp
cng_imp_macpattern.cpp
cng_imp_parallelhashpattern.cpp
29:37 
41:49 
57:65 
view
8 x 3 unittest/lib
unittest/lib
unittest/lib
cng_imp_hashpattern.cpp
cng_imp_macpattern.cpp
cng_imp_parallelhashpattern.cpp
39:47 
51:59 
47:55 
view
7 x 2 lib
lib
env_Win10Sgx.c
env_windowsUserModeWin7.c
12:19 
14:36 
view
7 x 3 unittest/lib
unittest/lib
unittest/lib
capi_imp_hashpattern.cpp
cng_imp_hashpattern.cpp
rsa32_imp_hashpattern.cpp
67:74 
106:113 
41:48 
view
6 x 3 unittest/lib
unittest/lib
unittest/lib
capi_imp_hashpattern.cpp
cng_imp_hashpattern.cpp
rsa32_imp_hashpattern.cpp
76:83 
97:104 
32:39 
view
6 x 2 unittest/lib
unittest/lib
cng_imp_hashpattern.cpp
cng_imp_macpattern.cpp
69:75 
83:89 
view