microsoft / DirectXTK12
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
  • 30% duplication:
    • 38,441 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 11,689 duplicated lines
  • 2,404 duplicates
system30% (11,689 lines)
Duplication per Extension
vcxproj89% (3,694 lines)
cpp17% (3,101 lines)
filters97% (2,231 lines)
h16% (1,521 lines)
fx38% (816 lines)
inl10% (228 lines)
fxh12% (92 lines)
hlsl24% (6 lines)
Duplication per Component (primary)
ROOT92% (5,925 lines)
Src20% (3,895 lines)
Src/Shaders28% (914 lines)
Inc10% (654 lines)
Audio7% (301 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 2,404 duplicates...
Size#FoldersFilesLinesCode
257 x 2 ROOT
ROOT
filters
DirectXTK_GDK_2017.vcxproj.filters
DirectXTK_GDK_2019.vcxproj.filters
1:384 (100%)
1:384 (100%)
view
253 x 2 ROOT
ROOT
filters
DirectXTK_Desktop_2017_Win10.vcxproj....
DirectXTK_Desktop_2022_Win10.vcxproj....
1:378 (100%)
1:378 (100%)
view
253 x 2 ROOT
ROOT
filters
DirectXTK_Windows10_2017.vcxproj.filters
DirectXTK_Windows10_2019.vcxproj.filters
1:378 (100%)
1:378 (100%)
view
253 x 2 ROOT
ROOT
filters
DirectXTK_Windows10_2019.vcxproj.filters
DirectXTK_Windows10_2022.vcxproj.filters
1:378 (100%)
1:378 (100%)
view
253 x 2 ROOT
ROOT
filters
DirectXTK_Windows10_2017.vcxproj.filters
DirectXTK_Windows10_2022.vcxproj.filters
1:378 (100%)
1:378 (100%)
view
253 x 2 ROOT
ROOT
filters
DirectXTK_Desktop_2019_Win10.vcxproj....
DirectXTK_Desktop_2022_Win10.vcxproj....
1:378 (100%)
1:378 (100%)
view
253 x 2 ROOT
ROOT
filters
DirectXTK_Desktop_2017_Win10.vcxproj....
DirectXTK_Desktop_2019_Win10.vcxproj....
1:378 (100%)
1:378 (100%)
view
204 x 2 ROOT
ROOT
vcxproj
DirectXTK_Windows10_2019.vcxproj
DirectXTK_Windows10_2022.vcxproj
338:581 (42%)
338:581 (42%)
view
194 x 2 ROOT
ROOT
vcxproj
DirectXTK_GDK_2017.vcxproj
DirectXTK_GDK_2019.vcxproj
475:702 (32%)
484:711 (32%)
view
183 x 2 ROOT
ROOT
vcxproj
DirectXTK_Windows10_2019.vcxproj
DirectXTK_Windows10_2022.vcxproj
2:216 (37%)
2:216 (37%)
view
183 x 2 ROOT
ROOT
vcxproj
DirectXTK_Windows10_2017.vcxproj
DirectXTK_Windows10_2019.vcxproj
1:215 (38%)
1:215 (37%)
view
182 x 2 ROOT
ROOT
vcxproj
DirectXTK_Windows10_2017.vcxproj
DirectXTK_Windows10_2022.vcxproj
2:215 (38%)
2:215 (37%)
view
176 x 2 ROOT
ROOT
vcxproj
DirectXTK_Desktop_2019_Win10.vcxproj
DirectXTK_Desktop_2022_Win10.vcxproj
1:206 (44%)
1:206 (44%)
view
170 x 2 ROOT
ROOT
vcxproj
DirectXTK_Desktop_2017_Win10.vcxproj
DirectXTK_Desktop_2019_Win10.vcxproj
1:199 (43%)
1:199 (42%)
view
170 x 2 ROOT
ROOT
vcxproj
DirectXTK_Desktop_2017_Win10.vcxproj
DirectXTK_Desktop_2022_Win10.vcxproj
1:199 (43%)
1:199 (42%)
view
157 x 2 ROOT
ROOT
vcxproj
DirectXTK_Desktop_2019_Win10.vcxproj
DirectXTK_Desktop_2022_Win10.vcxproj
290:476 (39%)
290:476 (39%)
view
53 x 2 ROOT
ROOT
vcxproj
DirectXTK_GDK_2019.vcxproj
DirectXTK_XboxOneXDK_2017.vcxproj
537:590 (8%)
50:103 (17%)
view
53 x 2 ROOT
ROOT
vcxproj
DirectXTK_GDK_2017.vcxproj
DirectXTK_XboxOneXDK_2017.vcxproj
528:581 (8%)
50:103 (17%)
view
43 x 2 ROOT
ROOT
vcxproj
DirectXTK_GDK_2017.vcxproj
DirectXTK_GDK_2019.vcxproj
1:55 (7%)
1:55 (7%)
view
43 x 2 Src
Src
d3dx12.h
d3dx12.h
2621:2667 (1%)
2735:2781 (1%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 25 unit duplicates...
Size#FoldersFilesLinesCode
25 x 2 Src
Src
d3dx12.h
d3dx12.h
2631:2656 
2745:2770 
view
22 x 2 Src
Src
DDSTextureLoader.cpp
WICTextureLoader.cpp
553:576 
549:572 
view
21 x 2 Src
Src
LoaderHelpers.h
XboxDDSTextureLoader.cpp
194:222 
182:210 
view
18 x 2 Inc
Inc
Audio.h
Audio.h
489:513 
583:607 
view
17 x 2 Src
Src
Keyboard.cpp
Mouse.cpp
161:179 
239:257 
view
17 x 2 Src
Src
NormalMapEffect.cpp
PBREffect.cpp
843:865 
862:884 
view
15 x 2 Src
Src
ModelLoadCMO.cpp
ModelLoadSDKMESH.cpp
178:194 
39:55 
view
14 x 2 Src
Src
ModelLoadCMO.cpp
ModelLoadSDKMESH.cpp
312:327 
57:72 
view
14 x 2 Src
Src
Mouse.cpp
Mouse.cpp
200:216 
546:562 
view
12 x 2 Src
Src
d3dx12.h
d3dx12.h
3509:3521 
3576:3588 
view
11 x 2 Src
Src
GamePad.cpp
GamePad.cpp
762:774 
776:788 
view
10 x 2 Src
Src
NormalMapEffect.cpp
PBREffect.cpp
868:880 
887:899 
view
9 x 2 Src
Src
EffectFactory.cpp
PBREffectFactory.cpp
529:538 
288:297 
view
9 x 2 Src
Src
d3dx12.h
d3dx12.h
2657:2666 
2771:2780 
view
8 x 2 Src
Src
Mouse.cpp
Mouse.cpp
188:198 
534:544 
view
7 x 2 Src
Src
d3dx12.h
d3dx12.h
1055:1062 
1429:1436 
view
7 x 2 Src
Src
d3dx12.h
d3dx12.h
2974:2982 
3033:3041 
view
6 x 2 Audio
Audio
SoundEffect.cpp
WaveBank.cpp
485:492 
411:418 
view
6 x 2 Inc
Inc
Audio.h
Audio.h
480:487 
574:581 
view
6 x 6 Src
Src
Src
Src
Src
Src
AlphaTestEffect.cpp
BasicEffect.cpp
DualTextureEffect.cpp
EnvironmentMapEffect.cpp
NormalMapEffect.cpp
SkinnedEffect.cpp
439:446 
629:636 
353:360 
597:604 
672:679 
369:376 
view