Showing 665 of 665 total issues

ParsersNifti has 22 functions (exceeds 20 allowed). Consider refactoring.
Open

export default class ParsersNifti extends ParsersVolume {
  constructor(data, id) {
    super();

    /**
Severity: Minor
Found in src/parsers/parsers.nifti.js - About 2 hrs to fix

    Function decode8Planar has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    function decode8Planar(imageFrame, pixelData) {
      const frameData = pixelData;
      const frameSize = imageFrame.rows * imageFrame.columns;
      const outFrame = new ArrayBuffer(frameSize * imageFrame.samplesPerPixel);
      const header = new DataView(frameData.buffer, frameData.byteOffset);
    Severity: Minor
    Found in src/decoders/decoders.rle.js - About 2 hrs 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 helpersLocalizer has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
    Open

    const helpersLocalizer = (three = window.THREE) => {
      if (three === undefined || three.Object3D === undefined) {
        return null;
      }
    
    
    Severity: Minor
    Found in src/helpers/helpers.localizer.js - About 2 hrs 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

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

        set worldPosition(worldPosition) {
          this._handles[0].worldPosition.copy(worldPosition);
          this._handles[1].worldPosition.copy(worldPosition);
          this._worldPosition.copy(worldPosition);
          this.update();
    Severity: Major
    Found in src/widgets/widgets.annotation.js and 4 other locations - About 2 hrs to fix
    src/widgets/widgets.ellipse.js on lines 468..473
    src/widgets/widgets.pressureHalfTime.js on lines 440..445
    src/widgets/widgets.rectangle.js on lines 431..436
    src/widgets/widgets.ruler.js on lines 353..358

    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

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

        set worldPosition(worldPosition) {
          this._handles[0].worldPosition.copy(worldPosition);
          this._handles[1].worldPosition.copy(worldPosition);
          this._worldPosition.copy(worldPosition);
          this.update();
    Severity: Major
    Found in src/widgets/widgets.ellipse.js and 4 other locations - About 2 hrs to fix
    src/widgets/widgets.annotation.js on lines 418..423
    src/widgets/widgets.pressureHalfTime.js on lines 440..445
    src/widgets/widgets.rectangle.js on lines 431..436
    src/widgets/widgets.ruler.js on lines 353..358

    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

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

        set worldPosition(worldPosition) {
          this._handles[0].worldPosition.copy(worldPosition);
          this._handles[1].worldPosition.copy(worldPosition);
          this._worldPosition.copy(worldPosition);
          this.update();
    Severity: Major
    Found in src/widgets/widgets.ruler.js and 4 other locations - About 2 hrs to fix
    src/widgets/widgets.annotation.js on lines 418..423
    src/widgets/widgets.ellipse.js on lines 468..473
    src/widgets/widgets.pressureHalfTime.js on lines 440..445
    src/widgets/widgets.rectangle.js on lines 431..436

    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

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

        set worldPosition(worldPosition) {
          this._handles[0].worldPosition.copy(worldPosition);
          this._handles[1].worldPosition.copy(worldPosition);
          this._worldPosition.copy(worldPosition);
          this.update();
    Severity: Major
    Found in src/widgets/widgets.pressureHalfTime.js and 4 other locations - About 2 hrs to fix
    src/widgets/widgets.annotation.js on lines 418..423
    src/widgets/widgets.ellipse.js on lines 468..473
    src/widgets/widgets.rectangle.js on lines 431..436
    src/widgets/widgets.ruler.js on lines 353..358

    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

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

        set worldPosition(worldPosition) {
          this._handles[0].worldPosition.copy(worldPosition);
          this._handles[1].worldPosition.copy(worldPosition);
          this._worldPosition.copy(worldPosition);
          this.update();
    Severity: Major
    Found in src/widgets/widgets.rectangle.js and 4 other locations - About 2 hrs to fix
    src/widgets/widgets.annotation.js on lines 418..423
    src/widgets/widgets.ellipse.js on lines 468..473
    src/widgets/widgets.pressureHalfTime.js on lines 440..445
    src/widgets/widgets.ruler.js on lines 353..358

    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 2 locations. Consider refactoring.
    Open

          this._hovered =
            this._handles[0].hovered ||
            this._handles[1].hovered ||
            this._handles[2].hovered ||
            this._handles[3].hovered ||
    Severity: Major
    Found in src/widgets/widgets.crossRuler.js and 1 other location - About 2 hrs to fix
    src/widgets/widgets.crossRuler.js on lines 118..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 79.

    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

          const paddingPoint =
            lineData.length > labelPadding * 2
              ? this._handles[1].screenPosition.clone().sub(paddingVector)
              : this._handles[1].screenPosition.clone().add(paddingVector);
    Severity: Major
    Found in src/widgets/widgets.ruler.js and 3 other locations - About 2 hrs to fix
    src/widgets/widgets.biruler.js on lines 336..339
    src/widgets/widgets.biruler.js on lines 354..357
    src/widgets/widgets.pressureHalfTime.js on lines 371..374

    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 79.

    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

          this._active =
            this._handles[0].active ||
            this._handles[1].active ||
            this._handles[2].active ||
            this._handles[3].active ||
    Severity: Major
    Found in src/widgets/widgets.crossRuler.js and 1 other location - About 2 hrs to fix
    src/widgets/widgets.crossRuler.js on lines 96..101

    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 79.

    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

          const paddingPoint =
            lineData.length > labelPadding * 2
              ? this._handles[1].screenPosition.clone().sub(paddingVector)
              : this._handles[1].screenPosition.clone().add(paddingVector);
    Severity: Major
    Found in src/widgets/widgets.pressureHalfTime.js and 3 other locations - About 2 hrs to fix
    src/widgets/widgets.biruler.js on lines 336..339
    src/widgets/widgets.biruler.js on lines 354..357
    src/widgets/widgets.ruler.js on lines 288..291

    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 79.

    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

          const paddingPoint =
            lineData.length > labelPadding * 2
              ? this._handles[1].screenPosition.clone().sub(paddingVector)
              : this._handles[1].screenPosition.clone().add(paddingVector);
    Severity: Major
    Found in src/widgets/widgets.biruler.js and 3 other locations - About 2 hrs to fix
    src/widgets/widgets.biruler.js on lines 354..357
    src/widgets/widgets.pressureHalfTime.js on lines 371..374
    src/widgets/widgets.ruler.js on lines 288..291

    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 79.

    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

          const paddingPoint2 =
            line2Data.length > label2Padding * 2
              ? this._handles[3].screenPosition.clone().sub(paddingVector2)
              : this._handles[3].screenPosition.clone().add(paddingVector2);
    Severity: Major
    Found in src/widgets/widgets.biruler.js and 3 other locations - About 2 hrs to fix
    src/widgets/widgets.biruler.js on lines 336..339
    src/widgets/widgets.pressureHalfTime.js on lines 371..374
    src/widgets/widgets.ruler.js on lines 288..291

    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 79.

    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

    Function main has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      main() {
        // need to pre-call main to fill up the functions list
        this._main = `
    void getIntensity(in vec3 dataCoordinates, out float intensity, out vec3 gradient){
    
    
    Severity: Major
    Found in src/shaders/shaders.vr.secondpass.fragment.js - About 2 hrs to fix

      Function updateValues has 53 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          updateValues() {
            const region = this._regions[
              this.getRegionByXY(
                this._regions,
                CoreUtils.worldToData(this._params.lps2IJK, this._handles[0]._worldPosition)
      Severity: Major
      Found in src/widgets/widgets.velocityTimeIntegral.js - About 2 hrs to fix

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

            updateDOMColor() {
              this._line.style.backgroundColor = this._color;
              this._line2.style.backgroundColor = this._color;
              this._label.style.borderColor = this._color;
            }
        Severity: Major
        Found in src/widgets/widgets.angle.js and 1 other location - About 2 hrs to fix
        src/widgets/widgets.ellipse.js on lines 322..326

        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 77.

        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

            updateDOMColor() {
              this._rectangle.style.borderColor = this._color;
              this._ellipse.style.borderColor = this._color;
              this._label.style.borderColor = this._color;
            }
        Severity: Major
        Found in src/widgets/widgets.ellipse.js and 1 other location - About 2 hrs to fix
        src/widgets/widgets.angle.js on lines 346..350

        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 77.

        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

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

              const labelTransform = this.adjustLabelTransform(
                this._label,
                this._handles[1].screenPosition
                  .clone()
                  .add(rectData.paddingVector.multiplyScalar(15 + this._label.offsetHeight / 2))
        Severity: Major
        Found in src/widgets/widgets.ellipse.js and 1 other location - About 2 hrs to fix
        src/widgets/widgets.rectangle.js on lines 359..364

        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 77.

        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

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

              const labelTransform = this.adjustLabelTransform(
                this._label,
                this._handles[1].screenPosition
                  .clone()
                  .add(rectData.paddingVector.multiplyScalar(15 + this._label.offsetHeight / 2))
        Severity: Major
        Found in src/widgets/widgets.rectangle.js and 1 other location - About 2 hrs to fix
        src/widgets/widgets.ellipse.js on lines 384..389

        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 77.

        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

        Severity
        Category
        Status
        Source
        Language