microsoft / MSRSec
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:
    • 5,009 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 1,000 duplicated lines
  • 74 duplicates
system19% (1,000 lines)
Duplication per Extension
c22% (901 lines)
h7% (73 lines)
yml31% (26 lines)
Duplication per Component (primary)
TAs/optee_ta/AuthVars/src15% (271 lines)
TAs/optee_ta/AuthVars/src/ossl50% (248 lines)
TAs/optee_ta/AuthVars/src/wolf44% (191 lines)
TAs/optee_ta/AuthVars/src/include12% (61 lines)
TAs/optee_ta/fTPM35% (57 lines)
TAs/optee_ta/fTPM/platform6% (56 lines)
TAs/optee_ta/AuthVars32% (53 lines)
ROOT31% (26 lines)
TAs/optee_ta/fTPM/reference100% (25 lines)
TAs/optee_ta/fTPM/platform/include4% (12 lines)
TAs/optee_ta/fTPM/include0% (0 lines)
TAs/optee_ta/fTPM/reference/include0% (0 lines)

Duplication Between Components (50+ lines)

G TAs/optee_ta/AuthVars/src/ossl TAs/optee_ta/AuthVars/src/ossl TAs/optee_ta/AuthVars/src/wolf TAs/optee_ta/AuthVars/src/wolf TAs/optee_ta/AuthVars/src/ossl--TAs/optee_ta/AuthVars/src/wolf 330 TAs/optee_ta/fTPM/reference TAs/optee_ta/fTPM/reference TAs/optee_ta/AuthVars/src/wolf--TAs/optee_ta/fTPM/reference 50 TAs/optee_ta/AuthVars/src/include TAs/optee_ta/AuthVars/src/include TAs/optee_ta/AuthVars/src TAs/optee_ta/AuthVars/src TAs/optee_ta/AuthVars/src/include--TAs/optee_ta/AuthVars/src 118

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 74 duplicates...
Size#FoldersFilesLinesCode
56 x 2 TAs/optee_ta/AuthVars/src/ossl
TAs/optee_ta/AuthVars/src/wolf
VarAuthOSSL.c
VarAuthWolf.c
959:1059 (11%)
597:697 (14%)
view
27 x 2 TAs/optee_ta/AuthVars/src/ossl
TAs/optee_ta/AuthVars/src/wolf
VarAuthOSSL.c
VarAuthWolf.c
861:908 (5%)
817:864 (7%)
view
26 x 2 TAs/optee_ta/AuthVars/src/ossl
TAs/optee_ta/AuthVars/src/wolf
VarAuthOSSL.c
VarAuthWolf.c
123:160 (5%)
127:164 (6%)
view
25 x 2 TAs/optee_ta/AuthVars/src/wolf
TAs/optee_ta/fTPM/reference
RuntimeSupport.c
RuntimeSupport.c
34:85 (64%)
44:95 (100%)
view
14 x 2 TAs/optee_ta/AuthVars/src/ossl
TAs/optee_ta/AuthVars/src/wolf
RuntimeSupport.c
RuntimeSupport.c
36:60 (100%)
52:76 (35%)
view
14 x 2 TAs/optee_ta/AuthVars/src/ossl
TAs/optee_ta/fTPM/reference
RuntimeSupport.c
RuntimeSupport.c
36:60 (100%)
62:86 (56%)
view
13 x 2 ROOT
ROOT
azure-pipelines.yml
azure-pipelines.yml
17:32 (15%)
63:78 (15%)
view
13 x 2 TAs/optee_ta/AuthVars
TAs/optee_ta/fTPM
AuthVars.c
fTPM.c
90:124 (8%)
206:248 (8%)
view
12 x 2 TAs/optee_ta/AuthVars/src
TAs/optee_ta/AuthVars/src
varops.c
varops.c
610:626 (2%)
685:701 (2%)
view
12 x 2 TAs/optee_ta/AuthVars/src/ossl
TAs/optee_ta/AuthVars/src/wolf
VarAuthOSSL.c
VarAuthWolf.c
807:828 (2%)
761:782 (3%)
view
11 x 2 TAs/optee_ta/fTPM
TAs/optee_ta/fTPM
fTPM.c
fTPM.c
272:295 (6%)
341:362 (6%)
view
10 x 2 TAs/optee_ta/AuthVars/src
TAs/optee_ta/AuthVars/src
varauth.c
varauth.c
146:155 (1%)
956:965 (1%)
view
9 x 2 TAs/optee_ta/AuthVars/src
TAs/optee_ta/AuthVars/src
varauth.c
varauth.c
112:120 (1%)
491:499 (1%)
view
9 x 2 TAs/optee_ta/AuthVars/src/ossl
TAs/optee_ta/AuthVars/src/wolf
VarAuthOSSL.c
VarAuthWolf.c
1074:1094 (1%)
709:728 (2%)
view
9 x 2 TAs/optee_ta/AuthVars
TAs/optee_ta/AuthVars
AuthVars.c
AuthVars.c
231:243 (5%)
274:286 (5%)
view
9 x 2 TAs/optee_ta/AuthVars/src
TAs/optee_ta/AuthVars/src
varauth.c
varauth.c
135:143 (1%)
883:891 (1%)
view
9 x 2 TAs/optee_ta/AuthVars/src/ossl
TAs/optee_ta/AuthVars/src/ossl
VarAuthOSSL.c
VarAuthOSSL.c
104:112 (1%)
321:329 (1%)
view
8 x 2 TAs/optee_ta/AuthVars/src/wolf
TAs/optee_ta/AuthVars/src/wolf
VarAuthWolf.c
VarAuthWolf.c
94:101 (2%)
189:196 (2%)
view
8 x 2 TAs/optee_ta/AuthVars/src/ossl
TAs/optee_ta/AuthVars/src/ossl
VarAuthOSSL.c
VarAuthOSSL.c
410:422 (1%)
649:661 (1%)
view
8 x 2 TAs/optee_ta/AuthVars/src/wolf
TAs/optee_ta/AuthVars/src/wolf
VarAuthWolf.c
VarAuthWolf.c
112:119 (2%)
562:569 (2%)
view
Duplicated Units
The list of top 4 duplicated units.
See data for all 4 unit duplicates...
Size#FoldersFilesLinesCode
12 x 2 TAs/optee_ta/AuthVars
TAs/optee_ta/fTPM
AuthVars.c
fTPM.c
96:115 
213:239 
view
12 x 3 TAs/optee_ta/AuthVars/src/ossl
TAs/optee_ta/AuthVars/src/wolf
TAs/optee_ta/fTPM/reference
RuntimeSupport.c
RuntimeSupport.c
RuntimeSupport.c
36:48 
52:64 
62:74 
view
7 x 2 TAs/optee_ta/AuthVars/src/wolf
TAs/optee_ta/fTPM/reference
RuntimeSupport.c
RuntimeSupport.c
34:41 
44:51 
view
7 x 2 TAs/optee_ta/AuthVars/src/wolf
TAs/optee_ta/fTPM/reference
RuntimeSupport.c
RuntimeSupport.c
43:50 
53:60 
view