microsoft / DirectXTex
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
  • 46% duplication:
    • 51,549 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 23,924 duplicated lines
  • 12,130 duplicates
system46% (23,924 lines)
Duplication per Extension
cpp38% (12,451 lines)
vcxproj88% (6,707 lines)
h30% (1,823 lines)
hlsl42% (1,795 lines)
filters100% (1,100 lines)
inl44% (48 lines)
Duplication per Component (primary)
DirectXTex39% (11,043 lines)
DDSTextureLoader64% (2,115 lines)
ScreenGrab76% (1,821 lines)
DirectXTex/Shaders42% (1,795 lines)
Texdiag46% (1,653 lines)
Texconv45% (1,643 lines)
Texassemble61% (1,459 lines)
WICTextureLoader67% (1,117 lines)
DDSView53% (726 lines)
DDSView/shaders58% (552 lines)

Duplication Between Components (50+ lines)

G Texassemble Texassemble Texconv Texconv Texassemble--Texconv 2325 Texdiag Texdiag Texassemble--Texdiag 2180 Texconv--Texdiag 1919 DDSTextureLoader DDSTextureLoader ScreenGrab ScreenGrab DDSTextureLoader--ScreenGrab 1434 DirectXTex DirectXTex DDSTextureLoader--DirectXTex 822 WICTextureLoader WICTextureLoader DDSTextureLoader--WICTextureLoader 268 DDSTextureLoader--Texconv 60 ScreenGrab--WICTextureLoader 135 DirectXTex--Texconv 1175 DirectXTex--ScreenGrab 1112 DirectXTex--Texdiag 1052 DirectXTex--Texassemble 986 DirectXTex--WICTextureLoader 402 DDSView DDSView DDSView--DirectXTex 1074 DDSView--Texdiag 1032 DDSView--Texassemble 1032 DDSView--Texconv 954

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 12,130 duplicates...
Size#FoldersFilesLinesCode
305 x 2 DirectXTex
DirectXTex
vcxproj
DirectXTex_Desktop_2019_Win10.vcxproj
DirectXTex_Desktop_2022_Win10.vcxproj
179:566 (68%)
179:566 (68%)
view
221 x 2 DirectXTex
DirectXTex
vcxproj
DirectXTex_Desktop_2019.vcxproj
DirectXTex_Desktop_2022.vcxproj
124:403 (69%)
124:403 (69%)
view
191 x 2 ScreenGrab
ScreenGrab
ScreenGrab11.cpp
ScreenGrab12.cpp
61:348 (23%)
77:372 (20%)
view
188 x 2 DirectXTex
DirectXTex
vcxproj
DirectXTex_Windows10_2019.vcxproj
DirectXTex_Windows10_2022.vcxproj
222:441 (51%)
222:441 (51%)
view
161 x 2 Texconv
Texconv
vcxproj
Texconv_Desktop_2019.vcxproj
Texconv_Desktop_2022.vcxproj
127:338 (60%)
127:338 (60%)
view
154 x 2 Texassemble
Texassemble
vcxproj
Texassemble_Desktop_2019.vcxproj
Texassemble_Desktop_2022.vcxproj
127:331 (59%)
127:331 (59%)
view
153 x 2 Texdiag
Texdiag
vcxproj
texdiag_Desktop_2019.vcxproj
texdiag_Desktop_2022.vcxproj
127:330 (59%)
127:330 (59%)
view
153 x 2 DDSView
DDSView
vcxproj
DDSView_Desktop_2019.vcxproj
DDSView_Desktop_2022.vcxproj
127:330 (58%)
127:330 (58%)
view
148 x 2 Texassemble
Texdiag
vcxproj
Texassemble_Desktop_2022.vcxproj
texdiag_Desktop_2019.vcxproj
128:324 (56%)
128:324 (57%)
view
148 x 2 Texassemble
Texdiag
vcxproj
Texassemble_Desktop_2019.vcxproj
texdiag_Desktop_2019.vcxproj
128:324 (56%)
128:324 (57%)
view
148 x 2 Texassemble
Texdiag
vcxproj
Texassemble_Desktop_2019.vcxproj
texdiag_Desktop_2022.vcxproj
128:324 (56%)
128:324 (57%)
view
148 x 2 Texassemble
Texdiag
vcxproj
Texassemble_Desktop_2022.vcxproj
texdiag_Desktop_2022.vcxproj
128:324 (56%)
128:324 (57%)
view
142 x 2 Texassemble
Texdiag
vcxproj
Texassemble_Desktop_2017.vcxproj
texdiag_Desktop_2017.vcxproj
128:318 (55%)
128:318 (56%)
view
137 x 2 DDSTextureLoader
DDSTextureLoader
DDSTextureLoader11.cpp
DDSTextureLoader12.cpp
619:937 (11%)
698:1016 (13%)
view
132 x 2 DDSTextureLoader
ScreenGrab
DDSTextureLoader12.cpp
ScreenGrab12.cpp
420:563 (13%)
296:439 (14%)
view
129 x 2 DDSTextureLoader
ScreenGrab
DDSTextureLoader11.cpp
ScreenGrab11.cpp
345:485 (10%)
272:412 (15%)
view
122 x 2 ScreenGrab
ScreenGrab
ScreenGrab11.cpp
ScreenGrab12.cpp
367:517 (15%)
394:544 (13%)
view
101 x 2 DDSTextureLoader
ScreenGrab
DDSTextureLoader12.cpp
ScreenGrab12.cpp
576:714 (10%)
488:626 (11%)
view
100 x 2 DDSTextureLoader
ScreenGrab
DDSTextureLoader11.cpp
ScreenGrab11.cpp
498:635 (8%)
461:598 (12%)
view
96 x 2 DDSTextureLoader
DDSTextureLoader
DDSTextureLoader11.cpp
DDSTextureLoader12.cpp
440:554 (8%)
518:632 (9%)
view
Duplicated Units
The list of top 20 duplicated units.
See data for all 37 unit duplicates...
Size#FoldersFilesLinesCode
198 x 2 DDSTextureLoader
DDSTextureLoader
DDSTextureLoader11.cpp
DDSTextureLoader12.cpp
642:905 
721:984 
view
135 x 2 DDSTextureLoader
ScreenGrab
DDSTextureLoader12.cpp
ScreenGrab12.cpp
420:565 
296:441 
view
132 x 2 DDSTextureLoader
ScreenGrab
DDSTextureLoader11.cpp
ScreenGrab11.cpp
345:487 
272:414 
view
88 x 2 DDSTextureLoader
ScreenGrab
DDSTextureLoader9.cpp
ScreenGrab9.cpp
411:508 
411:508 
view
74 x 2 Texassemble
Texdiag
texassemble.cpp
texdiag.cpp
484:566 
490:572 
view
62 x 2 Texassemble
Texdiag
texassemble.cpp
texdiag.cpp
410:482 
416:488 
view
50 x 2 DDSTextureLoader
WICTextureLoader
DDSTextureLoader11.cpp
WICTextureLoader11.cpp
1680:1732 
771:823 
view
48 x 2 DDSTextureLoader
DDSTextureLoader
DDSTextureLoader11.cpp
DDSTextureLoader12.cpp
150:213 
196:259 
view
48 x 2 DirectXTex
DirectXTex
DirectXTexMipmaps.cpp
DirectXTexResize.cpp
621:688 
176:243 
view
48 x 2 Texassemble
Texconv
texassemble.cpp
texconv.cpp
580:637 
731:788 
view
42 x 2 Texconv
Texconv
ExtendedBMP.cpp
PortablePixMap.cpp
44:99 
81:136 
view
35 x 3 WICTextureLoader
WICTextureLoader
WICTextureLoader
WICTextureLoader11.cpp
WICTextureLoader12.cpp
WICTextureLoader9.cpp
319:357 
297:335 
230:268 
view
34 x 4 ScreenGrab
ScreenGrab
WICTextureLoader
WICTextureLoader
ScreenGrab11.cpp
ScreenGrab9.cpp
WICTextureLoader11.cpp
WICTextureLoader9.cpp
733:769 
514:550 
181:217 
162:198 
view
31 x 3 Texassemble
Texconv
Texdiag
texassemble.cpp
texconv.cpp
texdiag.cpp
659:693 
810:844 
617:651 
view
29 x 3 DirectXTex
ScreenGrab
ScreenGrab
inl
DirectXTex.inl
ScreenGrab11.cpp
ScreenGrab12.cpp
52:82 
420:450 
447:477 
view
25 x 2 DirectXTex
DirectXTex
d3dx12.h
d3dx12.h
2631:2656 
2745:2770 
view
25 x 2 ScreenGrab
ScreenGrab
ScreenGrab11.cpp
ScreenGrab12.cpp
603:629 
631:657 
view
22 x 2 DDSTextureLoader
WICTextureLoader
DDSTextureLoader12.cpp
WICTextureLoader12.cpp
1538:1561 
633:656 
view
21 x 4 DDSTextureLoader
DDSTextureLoader
WICTextureLoader
WICTextureLoader
DDSTextureLoader11.cpp
DDSTextureLoader12.cpp
WICTextureLoader11.cpp
WICTextureLoader12.cpp
911:939 
990:1018 
287:315 
225:253 
view
20 x 2 WICTextureLoader
WICTextureLoader
WICTextureLoader11.cpp
WICTextureLoader12.cpp
257:283 
268:294 
view