microsoft / DirectXMath
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
  • 41% duplication:
    • 27,671 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 11,540 duplicated lines
  • 1,921 duplicates
system41% (11,540 lines)
Duplication per Extension
inl42% (8,050 lines)
h37% (1,814 lines)
cpp41% (1,676 lines)
Duplication per Component (primary)
Inc39% (8,340 lines)
SHMath40% (1,588 lines)
Extensions79% (1,436 lines)
Stereo3D55% (88 lines)
XDSP20% (88 lines)
MatrixStack0% (0 lines)

Duplication Between Components (50+ lines)

G Extensions Extensions Inc Inc Extensions--Inc 741

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 1,921 duplicates...
Size#FoldersFilesLinesCode
120 x 2 Extensions
Extensions
DirectXMathAVX2.h
DirectXMathF16C.h
823:1032 (18%)
257:466 (45%)
view
115 x 2 Extensions
Extensions
DirectXMathAVX2.h
DirectXMathF16C.h
641:819 (18%)
75:253 (43%)
view
86 x 2 SHMath
SHMath
DirectXSHD3D11.cpp
DirectXSHD3D12.cpp
45:185 (39%)
40:180 (44%)
view
51 x 2 Inc
Inc
inl
DirectXMathVector.inl
DirectXMathVector.inl
12433:12508 (<1%)
12519:12594 (<1%)
view
51 x 2 Inc
Inc
inl
DirectXMathVector.inl
DirectXMathVector.inl
11866:11937 (<1%)
11948:12019 (<1%)
view
51 x 2 SHMath
SHMath
DirectXSHD3D11.cpp
DirectXSHD3D12.cpp
299:367 (23%)
257:325 (26%)
view
50 x 2 Extensions
Inc
DirectXMathAVX2.h
DirectXPackedVector.inl
741:811 (7%)
183:252 (1%)
view
50 x 2 Extensions
Inc
DirectXMathF16C.h
DirectXPackedVector.inl
175:245 (19%)
183:252 (1%)
view
47 x 2 Inc
Inc
inl
DirectXMathVector.inl
DirectXMathVector.inl
10900:10971 (<1%)
10982:11053 (<1%)
view
41 x 2 Extensions
Inc
DirectXMathF16C.h
DirectXPackedVector.inl
109:172 (15%)
117:180 (1%)
view
41 x 2 Extensions
Inc
DirectXMathAVX2.h
DirectXPackedVector.inl
675:738 (6%)
117:180 (1%)
view
39 x 2 Inc
Inc
inl
DirectXMathVector.inl
DirectXMathVector.inl
11374:11429 (<1%)
11440:11495 (<1%)
view
39 x 2 Extensions
Extensions
DirectXMathAVX.h
DirectXMathAVX2.h
138:202 (30%)
482:546 (6%)
view
31 x 2 Inc
Inc
inl
DirectXMathMatrix.inl
DirectXMathMatrix.inl
304:341 (1%)
530:567 (1%)
view
31 x 2 SHMath
SHMath
DirectXSH.cpp
DirectXSH.cpp
4591:4634 (<1%)
4705:4748 (<1%)
view
30 x 2 Inc
Inc
inl
DirectXMathVector.inl
DirectXMathVector.inl
4375:4416 (<1%)
5258:5299 (<1%)
view
30 x 2 SHMath
SHMath
DirectXSH.cpp
DirectXSH.cpp
1632:1670 (<1%)
1967:2005 (<1%)
view
29 x 2 Inc
Inc
inl
DirectXMathVector.inl
DirectXMathVector.inl
4769:4809 (<1%)
4868:4908 (<1%)
view
28 x 2 Inc
Inc
inl
DirectXMathVector.inl
DirectXMathVector.inl
3814:3851 (<1%)
3978:4015 (<1%)
view
28 x 2 Inc
Inc
inl
DirectXMathVector.inl
DirectXMathVector.inl
3652:3689 (<1%)
3814:3851 (<1%)
view
Duplicated Units
The list of top 6 duplicated units.
See data for all 6 unit duplicates...
Size#FoldersFilesLinesCode
60 x 2 SHMath
SHMath
DirectXSHD3D11.cpp
DirectXSHD3D12.cpp
101:173 
96:168 
view
23 x 2 Inc
Inc
inl
DirectXCollision.inl
DirectXCollision.inl
3072:3104 
3109:3141 
view
14 x 2 Extensions
Extensions
DirectXMathAVX.h
DirectXMathAVX2.h
90:110 
120:140 
view
14 x 2 Extensions
Extensions
DirectXMathAVX.h
DirectXMathAVX2.h
143:160 
487:504 
view
7 x 2 Extensions
Extensions
DirectXMathAVX.h
DirectXMathAVX2.h
80:88 
110:118 
view
7 x 2 Extensions
Extensions
DirectXMathAVX.h
DirectXMathAVX2.h
232:240 
576:584 
view