microsoft / ms-tpm-20-ref
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
  • 10% duplication:
    • 44,731 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,534 duplicated lines
  • 768 duplicates
system10% (4,534 lines)
Duplication per Extension
c9% (2,372 lines)
h7% (1,285 lines)
vcxproj45% (877 lines)
Duplication per Component (primary)
tpm/src/support13% (908 lines)
tpm/src/crypt11% (876 lines)
tpm/include/prototypes14% (820 lines)
tpm/include3% (371 lines)
tpm/src/command6% (319 lines)
Simulator76% (311 lines)
Platform67% (301 lines)
tpm12% (235 lines)
tpm/src/subsystem6% (169 lines)
tpm/src/main5% (70 lines)
Simulator/src6% (48 lines)
tpm/include/Ossl32% (27 lines)
tpm/include/Wolf52% (27 lines)
Platform/include35% (16 lines)
tpm/include/Ltc21% (12 lines)
Platform/include/prototypes2% (6 lines)
Platform/src<1% (6 lines)
Simulator/include/prototypes4% (6 lines)
tpm/src/X5091% (6 lines)
Simulator/include0% (0 lines)
tpm/src/events0% (0 lines)

Duplication Between Components (50+ lines)

G tpm/include/prototypes tpm/include/prototypes tpm/src/crypt tpm/src/crypt tpm/include/prototypes--tpm/src/crypt 870 tpm/src/command tpm/src/command tpm/include/prototypes--tpm/src/command 262 tpm/src/subsystem tpm/src/subsystem tpm/include/prototypes--tpm/src/subsystem 138 tpm/src/support tpm/src/support tpm/include/prototypes--tpm/src/support 122 Platform Platform Simulator Simulator Platform--Simulator 258 tpm tpm Platform--tpm 138 Simulator--tpm 156 tpm/include/Ossl tpm/include/Ossl tpm/include/Wolf tpm/include/Wolf tpm/include/Ossl--tpm/include/Wolf 54

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 768 duplicates...
Size#FoldersFilesLinesCode
44 x 2 TPMCmd/tpm/include/prototypes
TPMCmd/tpm/include/prototypes
TpmToOsslMath_fp.h
TpmToWolfMath_fp.h
67:154 (51%)
69:139 (48%)
view
39 x 2 TPMCmd/tpm/include/prototypes
TPMCmd/tpm/include/prototypes
TpmToLtcMath_fp.h
TpmToOsslMath_fp.h
47:102 (62%)
83:154 (45%)
view
39 x 2 TPMCmd/tpm/include/prototypes
TPMCmd/tpm/include/prototypes
TpmToLtcMath_fp.h
TpmToWolfMath_fp.h
47:102 (62%)
83:139 (43%)
view
34 x 2 TPMCmd/Simulator
TPMCmd/tpm
vcxproj
simulator.vcxproj
Tpm.vcxproj
1:45 (8%)
1:45 (3%)
view
33 x 2 TPMCmd/Platform
TPMCmd/Simulator
vcxproj
platform.vcxproj
simulator.vcxproj
1:42 (8%)
1:42 (8%)
view
33 x 2 TPMCmd/Platform
TPMCmd/Simulator
vcxproj
platform.vcxproj
simulator.vcxproj
124:168 (8%)
104:148 (8%)
view
33 x 2 TPMCmd/Platform
TPMCmd/tpm
vcxproj
platform.vcxproj
Tpm.vcxproj
1:42 (8%)
1:42 (3%)
view
30 x 2 TPMCmd/Platform
TPMCmd/Simulator
vcxproj
platform.vcxproj
simulator.vcxproj
173:202 (7%)
163:192 (7%)
view
28 x 2 TPMCmd/Platform
TPMCmd/Platform
vcxproj
platform.vcxproj
platform.vcxproj
248:280 (6%)
285:317 (6%)
view
26 x 2 TPMCmd/Simulator
TPMCmd/Simulator
vcxproj
simulator.vcxproj
simulator.vcxproj
221:248 (6%)
252:279 (6%)
view
24 x 2 TPMCmd/tpm/include/prototypes
TPMCmd/tpm/include/prototypes
TpmToOsslMath_fp.h
TpmToWolfMath_fp.h
178:219 (28%)
157:195 (26%)
view
24 x 2 TPMCmd/tpm/include/prototypes
TPMCmd/tpm/include/prototypes
TpmToLtcMath_fp.h
TpmToWolfMath_fp.h
102:145 (38%)
157:195 (26%)
view
24 x 2 TPMCmd/tpm/include/prototypes
TPMCmd/tpm/include/prototypes
TpmToLtcMath_fp.h
TpmToOsslMath_fp.h
102:145 (38%)
178:219 (28%)
view
22 x 2 TPMCmd/Simulator
TPMCmd/Simulator
vcxproj
simulator.vcxproj
simulator.vcxproj
373:395 (5%)
399:421 (5%)
view
20 x 2 TPMCmd/tpm/include/Ossl
TPMCmd/tpm/include/Wolf
TpmToOsslHash.h
TpmToWolfHash.h
136:166 (52%)
130:160 (68%)
view
19 x 2 TPMCmd/Simulator
TPMCmd/Simulator
vcxproj
simulator.vcxproj
simulator.vcxproj
425:445 (4%)
453:473 (4%)
view
18 x 2 TPMCmd/Platform
TPMCmd/Platform
vcxproj
platform.vcxproj
platform.vcxproj
350:371 (4%)
398:419 (4%)
view
17 x 2 TPMCmd/Simulator
TPMCmd/Simulator
vcxproj
simulator.vcxproj
simulator.vcxproj
307:325 (4%)
329:347 (4%)
view
16 x 2 TPMCmd/Platform
TPMCmd/Platform
vcxproj
platform.vcxproj
platform.vcxproj
423:440 (3%)
444:461 (3%)
view
16 x 2 TPMCmd/Platform/include
TPMCmd/tpm/include
PlatformACT.h
ACT.h
164:179 (69%)
205:220 (76%)
view