zxing-js/library

View on GitHub
src/core/qrcode/decoder/Version.ts

Summary

Maintainability
F
1 wk
Test Coverage
A
97%

File Version.ts has 429 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Copyright 2007 ZXing authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
Severity: Minor
Found in src/core/qrcode/decoder/Version.ts - About 6 hrs to fix

    Function buildFunctionPattern has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

        public buildFunctionPattern(): BitMatrix {
            const dimension = this.getDimensionForVersion();
            const bitMatrix = new BitMatrix(dimension);
    
            // Top left finder pattern + separator + format
    Severity: Minor
    Found in src/core/qrcode/decoder/Version.ts - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function decodeVersionInformation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

        public static decodeVersionInformation(versionBits: number /*int*/): Version {
            let bestDifference = Number.MAX_SAFE_INTEGER;
            let bestVersion = 0;
            for (let i = 0; i < Version.VERSION_DECODE_INFO.length; i++) {
                const targetVersion = Version.VERSION_DECODE_INFO[i];
    Severity: Minor
    Found in src/core/qrcode/decoder/Version.ts - About 25 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(39, Int32Array.from([6, 26, 54, 82, 110, 138, 166]),
                new ECBlocks(30, new ECB(20, 117),
                    new ECB(4, 118)),
                new ECBlocks(28, new ECB(40, 47),
                    new ECB(7, 48)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 326..334
    src/core/qrcode/decoder/Version.ts on lines 335..343
    src/core/qrcode/decoder/Version.ts on lines 344..352
    src/core/qrcode/decoder/Version.ts on lines 353..361
    src/core/qrcode/decoder/Version.ts on lines 371..379

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(37, Int32Array.from([6, 28, 54, 80, 106, 132, 158]),
                new ECBlocks(30, new ECB(17, 122),
                    new ECB(4, 123)),
                new ECBlocks(28, new ECB(29, 46),
                    new ECB(14, 47)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 326..334
    src/core/qrcode/decoder/Version.ts on lines 335..343
    src/core/qrcode/decoder/Version.ts on lines 353..361
    src/core/qrcode/decoder/Version.ts on lines 362..370
    src/core/qrcode/decoder/Version.ts on lines 371..379

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(40, Int32Array.from([6, 30, 58, 86, 114, 142, 170]),
                new ECBlocks(30, new ECB(19, 118),
                    new ECB(6, 119)),
                new ECBlocks(28, new ECB(18, 47),
                    new ECB(31, 48)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 326..334
    src/core/qrcode/decoder/Version.ts on lines 335..343
    src/core/qrcode/decoder/Version.ts on lines 344..352
    src/core/qrcode/decoder/Version.ts on lines 353..361
    src/core/qrcode/decoder/Version.ts on lines 362..370

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(38, Int32Array.from([6, 32, 58, 84, 110, 136, 162]),
                new ECBlocks(30, new ECB(4, 122),
                    new ECB(18, 123)),
                new ECBlocks(28, new ECB(13, 46),
                    new ECB(32, 47)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 326..334
    src/core/qrcode/decoder/Version.ts on lines 335..343
    src/core/qrcode/decoder/Version.ts on lines 344..352
    src/core/qrcode/decoder/Version.ts on lines 362..370
    src/core/qrcode/decoder/Version.ts on lines 371..379

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(35, Int32Array.from([6, 30, 54, 78, 102, 126, 150]),
                new ECBlocks(30, new ECB(12, 121),
                    new ECB(7, 122)),
                new ECBlocks(28, new ECB(12, 47),
                    new ECB(26, 48)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 335..343
    src/core/qrcode/decoder/Version.ts on lines 344..352
    src/core/qrcode/decoder/Version.ts on lines 353..361
    src/core/qrcode/decoder/Version.ts on lines 362..370
    src/core/qrcode/decoder/Version.ts on lines 371..379

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(36, Int32Array.from([6, 24, 50, 76, 102, 128, 154]),
                new ECBlocks(30, new ECB(6, 121),
                    new ECB(14, 122)),
                new ECBlocks(28, new ECB(6, 47),
                    new ECB(34, 48)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 326..334
    src/core/qrcode/decoder/Version.ts on lines 344..352
    src/core/qrcode/decoder/Version.ts on lines 353..361
    src/core/qrcode/decoder/Version.ts on lines 362..370
    src/core/qrcode/decoder/Version.ts on lines 371..379

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 90.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(29, Int32Array.from([6, 30, 54, 78, 102, 126]),
                new ECBlocks(30, new ECB(7, 116),
                    new ECB(7, 117)),
                new ECBlocks(28, new ECB(21, 45),
                    new ECB(7, 46)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 264..272
    src/core/qrcode/decoder/Version.ts on lines 282..290
    src/core/qrcode/decoder/Version.ts on lines 291..299
    src/core/qrcode/decoder/Version.ts on lines 308..316
    src/core/qrcode/decoder/Version.ts on lines 317..325

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 89.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(34, Int32Array.from([6, 34, 62, 90, 118, 146]),
                new ECBlocks(30, new ECB(13, 115),
                    new ECB(6, 116)),
                new ECBlocks(28, new ECB(14, 46),
                    new ECB(23, 47)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 264..272
    src/core/qrcode/decoder/Version.ts on lines 273..281
    src/core/qrcode/decoder/Version.ts on lines 282..290
    src/core/qrcode/decoder/Version.ts on lines 291..299
    src/core/qrcode/decoder/Version.ts on lines 308..316

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 89.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(30, Int32Array.from([6, 26, 52, 78, 104, 130]),
                new ECBlocks(30, new ECB(5, 115),
                    new ECB(10, 116)),
                new ECBlocks(28, new ECB(19, 47),
                    new ECB(10, 48)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 264..272
    src/core/qrcode/decoder/Version.ts on lines 273..281
    src/core/qrcode/decoder/Version.ts on lines 291..299
    src/core/qrcode/decoder/Version.ts on lines 308..316
    src/core/qrcode/decoder/Version.ts on lines 317..325

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 89.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(31, Int32Array.from([6, 30, 56, 82, 108, 134]),
                new ECBlocks(30, new ECB(13, 115),
                    new ECB(3, 116)),
                new ECBlocks(28, new ECB(2, 46),
                    new ECB(29, 47)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 264..272
    src/core/qrcode/decoder/Version.ts on lines 273..281
    src/core/qrcode/decoder/Version.ts on lines 282..290
    src/core/qrcode/decoder/Version.ts on lines 308..316
    src/core/qrcode/decoder/Version.ts on lines 317..325

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 89.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(33, Int32Array.from([6, 30, 58, 86, 114, 142]),
                new ECBlocks(30, new ECB(17, 115),
                    new ECB(1, 116)),
                new ECBlocks(28, new ECB(14, 46),
                    new ECB(21, 47)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 264..272
    src/core/qrcode/decoder/Version.ts on lines 273..281
    src/core/qrcode/decoder/Version.ts on lines 282..290
    src/core/qrcode/decoder/Version.ts on lines 291..299
    src/core/qrcode/decoder/Version.ts on lines 317..325

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 89.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            new Version(28, Int32Array.from([6, 26, 50, 74, 98, 122]),
                new ECBlocks(30, new ECB(3, 117),
                    new ECB(10, 118)),
                new ECBlocks(28, new ECB(3, 45),
                    new ECB(23, 46)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 5 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 273..281
    src/core/qrcode/decoder/Version.ts on lines 282..290
    src/core/qrcode/decoder/Version.ts on lines 291..299
    src/core/qrcode/decoder/Version.ts on lines 308..316
    src/core/qrcode/decoder/Version.ts on lines 317..325

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 89.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

            new Version(24, Int32Array.from([6, 28, 54, 80, 106]),
                new ECBlocks(30, new ECB(6, 117),
                    new ECB(4, 118)),
                new ECBlocks(28, new ECB(6, 45),
                    new ECB(14, 46)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 4 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 219..227
    src/core/qrcode/decoder/Version.ts on lines 237..245
    src/core/qrcode/decoder/Version.ts on lines 246..254
    src/core/qrcode/decoder/Version.ts on lines 255..263

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

            new Version(25, Int32Array.from([6, 32, 58, 84, 110]),
                new ECBlocks(26, new ECB(8, 106),
                    new ECB(4, 107)),
                new ECBlocks(28, new ECB(8, 47),
                    new ECB(13, 48)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 4 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 219..227
    src/core/qrcode/decoder/Version.ts on lines 228..236
    src/core/qrcode/decoder/Version.ts on lines 246..254
    src/core/qrcode/decoder/Version.ts on lines 255..263

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

            new Version(26, Int32Array.from([6, 30, 58, 86, 114]),
                new ECBlocks(28, new ECB(10, 114),
                    new ECB(2, 115)),
                new ECBlocks(28, new ECB(19, 46),
                    new ECB(4, 47)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 4 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 219..227
    src/core/qrcode/decoder/Version.ts on lines 228..236
    src/core/qrcode/decoder/Version.ts on lines 237..245
    src/core/qrcode/decoder/Version.ts on lines 255..263

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

            new Version(23, Int32Array.from([6, 30, 54, 78, 102]),
                new ECBlocks(30, new ECB(4, 121),
                    new ECB(5, 122)),
                new ECBlocks(28, new ECB(4, 47),
                    new ECB(14, 48)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 4 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 228..236
    src/core/qrcode/decoder/Version.ts on lines 237..245
    src/core/qrcode/decoder/Version.ts on lines 246..254
    src/core/qrcode/decoder/Version.ts on lines 255..263

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

            new Version(27, Int32Array.from([6, 34, 62, 90, 118]),
                new ECBlocks(30, new ECB(8, 122),
                    new ECB(4, 123)),
                new ECBlocks(28, new ECB(22, 45),
                    new ECB(3, 46)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 4 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 219..227
    src/core/qrcode/decoder/Version.ts on lines 228..236
    src/core/qrcode/decoder/Version.ts on lines 237..245
    src/core/qrcode/decoder/Version.ts on lines 246..254

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

            new Version(17, Int32Array.from([6, 30, 54, 78]),
                new ECBlocks(28, new ECB(1, 107),
                    new ECB(5, 108)),
                new ECBlocks(28, new ECB(10, 46),
                    new ECB(1, 47)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 141..149
    src/core/qrcode/decoder/Version.ts on lines 150..158
    src/core/qrcode/decoder/Version.ts on lines 159..167
    src/core/qrcode/decoder/Version.ts on lines 177..185
    src/core/qrcode/decoder/Version.ts on lines 186..194
    src/core/qrcode/decoder/Version.ts on lines 195..203

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 87.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

            new Version(20, Int32Array.from([6, 34, 62, 90]),
                new ECBlocks(28, new ECB(3, 107),
                    new ECB(5, 108)),
                new ECBlocks(26, new ECB(3, 41),
                    new ECB(13, 42)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 141..149
    src/core/qrcode/decoder/Version.ts on lines 150..158
    src/core/qrcode/decoder/Version.ts on lines 159..167
    src/core/qrcode/decoder/Version.ts on lines 168..176
    src/core/qrcode/decoder/Version.ts on lines 177..185
    src/core/qrcode/decoder/Version.ts on lines 186..194

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 87.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

            new Version(19, Int32Array.from([6, 30, 58, 86]),
                new ECBlocks(28, new ECB(3, 113),
                    new ECB(4, 114)),
                new ECBlocks(26, new ECB(3, 44),
                    new ECB(11, 45)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 141..149
    src/core/qrcode/decoder/Version.ts on lines 150..158
    src/core/qrcode/decoder/Version.ts on lines 159..167
    src/core/qrcode/decoder/Version.ts on lines 168..176
    src/core/qrcode/decoder/Version.ts on lines 177..185
    src/core/qrcode/decoder/Version.ts on lines 195..203

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 87.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

            new Version(18, Int32Array.from([6, 30, 56, 82]),
                new ECBlocks(30, new ECB(5, 120),
                    new ECB(1, 121)),
                new ECBlocks(26, new ECB(9, 43),
                    new ECB(4, 44)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 141..149
    src/core/qrcode/decoder/Version.ts on lines 150..158
    src/core/qrcode/decoder/Version.ts on lines 159..167
    src/core/qrcode/decoder/Version.ts on lines 168..176
    src/core/qrcode/decoder/Version.ts on lines 186..194
    src/core/qrcode/decoder/Version.ts on lines 195..203

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 87.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

            new Version(15, Int32Array.from([6, 26, 48, 70]),
                new ECBlocks(22, new ECB(5, 87),
                    new ECB(1, 88)),
                new ECBlocks(24, new ECB(5, 41),
                    new ECB(5, 42)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 141..149
    src/core/qrcode/decoder/Version.ts on lines 159..167
    src/core/qrcode/decoder/Version.ts on lines 168..176
    src/core/qrcode/decoder/Version.ts on lines 177..185
    src/core/qrcode/decoder/Version.ts on lines 186..194
    src/core/qrcode/decoder/Version.ts on lines 195..203

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 87.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

            new Version(16, Int32Array.from([6, 26, 50, 74]),
                new ECBlocks(24, new ECB(5, 98),
                    new ECB(1, 99)),
                new ECBlocks(28, new ECB(7, 45),
                    new ECB(3, 46)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 141..149
    src/core/qrcode/decoder/Version.ts on lines 150..158
    src/core/qrcode/decoder/Version.ts on lines 168..176
    src/core/qrcode/decoder/Version.ts on lines 177..185
    src/core/qrcode/decoder/Version.ts on lines 186..194
    src/core/qrcode/decoder/Version.ts on lines 195..203

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 87.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

            new Version(14, Int32Array.from([6, 26, 46, 66]),
                new ECBlocks(30, new ECB(3, 115),
                    new ECB(1, 116)),
                new ECBlocks(24, new ECB(4, 40),
                    new ECB(5, 41)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 6 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 150..158
    src/core/qrcode/decoder/Version.ts on lines 159..167
    src/core/qrcode/decoder/Version.ts on lines 168..176
    src/core/qrcode/decoder/Version.ts on lines 177..185
    src/core/qrcode/decoder/Version.ts on lines 186..194
    src/core/qrcode/decoder/Version.ts on lines 195..203

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 87.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            new Version(10, Int32Array.from([6, 28, 50]),
                new ECBlocks(18, new ECB(2, 68),
                    new ECB(2, 69)),
                new ECBlocks(26, new ECB(4, 43),
                    new ECB(1, 44)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 1 other location - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 124..132

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 86.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            new Version(12, Int32Array.from([6, 32, 58]),
                new ECBlocks(24, new ECB(2, 92),
                    new ECB(2, 93)),
                new ECBlocks(22, new ECB(6, 36),
                    new ECB(2, 37)),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 1 other location - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 107..115

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 86.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            new Version(11, Int32Array.from([6, 30, 54]),
                new ECBlocks(20, new ECB(4, 81)),
                new ECBlocks(30, new ECB(1, 50),
                    new ECB(4, 51)),
                new ECBlocks(28, new ECB(4, 22),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 3 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 91..98
    src/core/qrcode/decoder/Version.ts on lines 99..106
    src/core/qrcode/decoder/Version.ts on lines 133..140

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 80.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            new Version(13, Int32Array.from([6, 34, 62]),
                new ECBlocks(26, new ECB(4, 107)),
                new ECBlocks(22, new ECB(8, 37),
                    new ECB(1, 38)),
                new ECBlocks(24, new ECB(8, 20),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 3 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 91..98
    src/core/qrcode/decoder/Version.ts on lines 99..106
    src/core/qrcode/decoder/Version.ts on lines 116..123

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 80.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            new Version(9, Int32Array.from([6, 26, 46]),
                new ECBlocks(30, new ECB(2, 116)),
                new ECBlocks(22, new ECB(3, 36),
                    new ECB(2, 37)),
                new ECBlocks(20, new ECB(4, 16),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 3 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 91..98
    src/core/qrcode/decoder/Version.ts on lines 116..123
    src/core/qrcode/decoder/Version.ts on lines 133..140

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 80.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            new Version(8, Int32Array.from([6, 24, 42]),
                new ECBlocks(24, new ECB(2, 97)),
                new ECBlocks(22, new ECB(2, 38),
                    new ECB(2, 39)),
                new ECBlocks(22, new ECB(4, 18),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 3 other locations - About 2 hrs to fix
    src/core/qrcode/decoder/Version.ts on lines 99..106
    src/core/qrcode/decoder/Version.ts on lines 116..123
    src/core/qrcode/decoder/Version.ts on lines 133..140

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 80.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            new Version(4, Int32Array.from([6, 26]),
                new ECBlocks(20, new ECB(1, 80)),
                new ECBlocks(18, new ECB(2, 32)),
                new ECBlocks(26, new ECB(2, 24)),
                new ECBlocks(16, new ECB(4, 9))),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 3 other locations - About 1 hr to fix
    src/core/qrcode/decoder/Version.ts on lines 57..61
    src/core/qrcode/decoder/Version.ts on lines 62..66
    src/core/qrcode/decoder/Version.ts on lines 79..83

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            new Version(6, Int32Array.from([6, 34]),
                new ECBlocks(18, new ECB(2, 68)),
                new ECBlocks(16, new ECB(4, 27)),
                new ECBlocks(24, new ECB(4, 19)),
                new ECBlocks(28, new ECB(4, 15))),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 3 other locations - About 1 hr to fix
    src/core/qrcode/decoder/Version.ts on lines 57..61
    src/core/qrcode/decoder/Version.ts on lines 62..66
    src/core/qrcode/decoder/Version.ts on lines 67..71

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            new Version(3, Int32Array.from([6, 22]),
                new ECBlocks(15, new ECB(1, 55)),
                new ECBlocks(26, new ECB(1, 44)),
                new ECBlocks(18, new ECB(2, 17)),
                new ECBlocks(22, new ECB(2, 13))),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 3 other locations - About 1 hr to fix
    src/core/qrcode/decoder/Version.ts on lines 57..61
    src/core/qrcode/decoder/Version.ts on lines 67..71
    src/core/qrcode/decoder/Version.ts on lines 79..83

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            new Version(2, Int32Array.from([6, 18]),
                new ECBlocks(10, new ECB(1, 34)),
                new ECBlocks(16, new ECB(1, 28)),
                new ECBlocks(22, new ECB(1, 22)),
                new ECBlocks(28, new ECB(1, 16))),
    Severity: Major
    Found in src/core/qrcode/decoder/Version.ts and 3 other locations - About 1 hr to fix
    src/core/qrcode/decoder/Version.ts on lines 62..66
    src/core/qrcode/decoder/Version.ts on lines 67..71
    src/core/qrcode/decoder/Version.ts on lines 79..83

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 61.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    There are no issues that match your filters.

    Category
    Status