microsoft / QuantumKatas
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
  • 12% duplication:
    • 2,818 cleaned lines of cleaned code (without empty lines, comments, and frequently duplicated constructs such as imports)
    • 342 duplicated lines
  • 51 duplicates
system12% (342 lines)
Duplication per Extension
py14% (138 lines)
cs16% (98 lines)
yml32% (36 lines)
tex4% (36 lines)
ps18% (34 lines)
Duplication per Component (primary)
tutorials/ComplexArithmetic38% (131 lines)
utilities/Microsoft.Quantum.Katas45% (98 lines)
ROOT43% (36 lines)
quickref4% (36 lines)
scripts7% (34 lines)
tutorials/LinearAlgebra1% (7 lines)
PhaseEstimation0% (0 lines)
SimonsAlgorithm0% (0 lines)
utilities/Common0% (0 lines)
utilities/DumpUnitary0% (0 lines)
utilities/DumpUnitaryTest0% (0 lines)
Longest Duplicates
The list of 20 longest duplicates.
See data for all 51 duplicates...
Size#FoldersFilesLinesCode
17 x 2 utilities/Microsoft.Quantum.Katas
utilities/Microsoft.Quantum.Katas
CheckKataMagic.cs
KataMagic.cs
73:100 (16%)
85:112 (15%)
view
17 x 2 scripts
scripts
build.ps1
validate-projects.ps1
1:22 (70%)
1:22 (58%)
view
12 x 2 ROOT
ROOT
azure-pipelines.yml
azure-pipelines.yml
37:48 (14%)
79:90 (14%)
view
12 x 2 quickref
quickref
tex
qsharp-quick-reference.tex
qsharp-quick-reference.tex
422:433 (1%)
445:456 (1%)
view
12 x 2 quickref
quickref
tex
qsharp-quick-reference.tex
qsharp-quick-reference.tex
445:456 (1%)
468:479 (1%)
view
12 x 2 utilities/Microsoft.Quantum.Katas
utilities/Microsoft.Quantum.Katas
CheckKataMagic.cs
KataMagic.cs
185:210 (11%)
192:217 (11%)
view
12 x 2 quickref
quickref
tex
qsharp-quick-reference.tex
qsharp-quick-reference.tex
422:433 (1%)
468:479 (1%)
view
12 x 2 ROOT
ROOT
azure-pipelines.yml
azure-pipelines.yml
60:71 (14%)
79:90 (14%)
view
12 x 2 ROOT
ROOT
azure-pipelines.yml
azure-pipelines.yml
37:48 (14%)
60:71 (14%)
view
9 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
131:139 (2%)
191:199 (2%)
view
9 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
241:249 (2%)
273:281 (2%)
view
9 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
102:110 (2%)
131:139 (2%)
view
9 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
102:110 (2%)
397:405 (2%)
view
9 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
131:139 (2%)
397:405 (2%)
view
9 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
191:199 (2%)
397:405 (2%)
view
9 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
102:110 (2%)
191:199 (2%)
view
8 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
192:199 (2%)
274:281 (2%)
view
8 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
192:199 (2%)
242:249 (2%)
view
8 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
132:139 (2%)
274:281 (2%)
view
8 x 2 tutorials/ComplexArithmetic
tutorials/ComplexArithmetic
testing.py
testing.py
274:281 (2%)
398:405 (2%)
view
Duplicated Units
The list of top 1 duplicated units.
See data for all 1 unit duplicate
Size#FoldersFilesLinesCode
22 x 2 utilities/Microsoft.Quantum.Katas
utilities/Microsoft.Quantum.Katas
CheckKataMagic.cs
KataMagic.cs
73:101 
85:113 
view