microsoft / SEAL
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:
    • 22,525 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 4,327 duplicated lines
  • 739 duplicates
system19% (4,327 lines)
Duplication per Extension
cpp20% (1,944 lines)
h20% (1,638 lines)
cs12% (381 lines)
yml34% (282 lines)
in16% (50 lines)
c4% (32 lines)
Duplication per Component (primary)
native/src/seal/util25% (2,197 lines)
native/src/seal11% (636 lines)
native/src/seal/c19% (608 lines)
dotnet/src12% (381 lines)
pipelines34% (282 lines)
native/bench26% (173 lines)
dotnet/nuget37% (38 lines)
pkgconfig35% (12 lines)
cmake0% (0 lines)
dotnet/src/tools0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 739 duplicates...
Size#FoldersFilesLinesCode
61 x 2 native/src/seal/util
native/src/seal/util
iterator.h
iterator.h
977:1096 (6%)
1156:1275 (6%)
view
57 x 2 native/src/seal/util
native/src/seal/util
iterator.h
iterator.h
1330:1443 (5%)
1513:1626 (5%)
view
30 x 2 native/src/seal/util
native/src/seal/util
pointer.h
pointer.h
382:432 (4%)
1070:1120 (4%)
view
26 x 2 native/src/seal/util
native/src/seal/util
mempool.cpp
mempool.cpp
109:153 (11%)
236:280 (11%)
view
26 x 2 pipelines
pipelines
windows.yml
windows.yml
198:224 (8%)
229:255 (8%)
view
25 x 2 pipelines
pipelines
windows.yml
windows.yml
198:222 (8%)
260:284 (8%)
view
25 x 2 pipelines
pipelines
windows.yml
windows.yml
229:253 (8%)
260:284 (8%)
view
23 x 2 pipelines
pipelines
pipeline-CI-Debug-iOS.yml
pipeline-CI-Debug-macOS.yml
3:26 (95%)
3:26 (95%)
view
23 x 2 native/src/seal
native/src/seal
evaluator.cpp
evaluator.cpp
1363:1408 (2%)
1437:1482 (2%)
view
23 x 2 pipelines
pipelines
pipeline-CI-Debug-Linux.yml
pipeline-CI-Debug-iOS.yml
3:26 (95%)
3:26 (95%)
view
23 x 2 native/src/seal/util
native/src/seal/util
scalingvariant.cpp
scalingvariant.cpp
16:52 (41%)
59:95 (41%)
view
23 x 2 pipelines
pipelines
pipeline-CI-Debug-Linux.yml
pipeline-CI-Debug-macOS.yml
3:26 (95%)
3:26 (95%)
view
23 x 2 pipelines
pipelines
pipeline-CI-Debug-Windows.yml
pipeline-CI-Debug-iOS.yml
3:26 (95%)
3:26 (95%)
view
23 x 2 pipelines
pipelines
pipeline-CI-Debug-Android.yml
pipeline-CI-Debug-macOS.yml
3:26 (95%)
3:26 (95%)
view
23 x 2 pipelines
pipelines
pipeline-CI-Debug-Linux.yml
pipeline-CI-Debug-Windows.yml
3:26 (95%)
3:26 (95%)
view
23 x 2 pipelines
pipelines
pipeline-CI-Debug-Android.yml
pipeline-CI-Debug-Windows.yml
3:26 (95%)
3:26 (95%)
view
23 x 2 pipelines
pipelines
pipeline-CI-Debug-Android.yml
pipeline-CI-Debug-iOS.yml
3:26 (95%)
3:26 (95%)
view
23 x 2 pipelines
pipelines
pipeline-CI-Debug-Android.yml
pipeline-CI-Debug-Linux.yml
3:26 (95%)
3:26 (95%)
view
23 x 2 pipelines
pipelines
pipeline-CI-Debug-Windows.yml
pipeline-CI-Debug-macOS.yml
3:26 (95%)
3:26 (95%)
view
21 x 2 native/src/seal/util
native/src/seal/util
ztools.cpp
ztools.cpp
188:232 (5%)
562:606 (5%)
view
Duplicated Units
The list of top 10 duplicated units.
See data for all 10 unit duplicates...
Size#FoldersFilesLinesCode
26 x 2 native/src/seal/util
native/src/seal/util
pointer.h
pointer.h
399:428 
1032:1061 
view
24 x 2 native/src/seal/c
native/src/seal/c
batchencoder.cpp
batchencoder.cpp
95:124 
126:155 
view
22 x 2 native/src/seal/util
native/src/seal/util
pointer.h
pointer.h
346:373 
979:1006 
view
21 x 2 native/src/seal/c
native/src/seal/c
batchencoder.cpp
batchencoder.cpp
45:68 
70:93 
view
18 x 2 native/src/seal/util
native/src/seal/util
streambuf.cpp
streambuf.cpp
283:304 
355:376 
view
15 x 2 native/src/seal/util
native/src/seal/util
pointer.h
pointer.h
116:133 
375:392 
view
14 x 2 native/src/seal/util
native/src/seal/util
pointer.h
pointer.h
97:114 
617:634 
view
12 x 2 native/src/seal
native/src/seal
memorymanager.h
memorymanager.h
664:676 
710:722 
view
11 x 2 native/src/seal/util
native/src/seal/util
pointer.h
pointer.h
636:648 
1068:1080 
view
8 x 2 native/src/seal
native/src/seal
memorymanager.h
memorymanager.h
690:698 
736:744 
view