Showing 665 of 665 total issues

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

      const usPosition1 = this.getUsPoint(
        this._regions,
        CoreUtils.worldToData(this._params.lps2IJK, this._handles[1].worldPosition)
      );
Severity: Minor
Found in src/widgets/widgets.pressureHalfTime.js and 1 other location - About 40 mins to fix
src/widgets/widgets.pressureHalfTime.js on lines 292..295

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

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

Consider simplifying this complex logical expression.
Open

    if (
      index.x >= 0 &&
      index.y >= 0 &&
      index.z >= 0 &&
      index.x < dimensions.x &&
Severity: Major
Found in src/models/models.stack.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

          if (
            (vMaxIndex === 2 && verticalDirection.getComponent(vMaxIndex) < 0) ||
            (vMaxIndex === 1 && verticalDirection.getComponent(vMaxIndex) > 0) ||
            (vMaxIndex === 0 && verticalDirection.getComponent(vMaxIndex) > 0)
          ) {
    Severity: Major
    Found in src/cameras/cameras.orthographic.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

          } else if (
            this._frame[0].imagePosition &&
            this._frame[0].imageOrientation &&
            this._frame[1] &&
            this._frame[1].imagePosition &&
      Severity: Major
      Found in src/models/models.stack.js - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

            if (
              !(
                objectToTest !== null &&
                typeof objectToTest !== 'undefined' &&
                objectToTest.hasOwnProperty('x') &&
        Severity: Major
        Found in src/core/core.validators.js - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

              if (
                !(
                  objectToTest !== null &&
                  typeof objectToTest !== 'undefined' &&
                  objectToTest.hasOwnProperty('position') &&
          Severity: Major
          Found in src/core/core.validators.js - About 40 mins to fix

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

                  this._line2.style.transform = `translate3D(${line2Data.transformX}px, ${
                    line2Data.transformY
                  }px, 0)
                            rotate(${line2Data.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.biruler.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 302..305
            src/widgets/widgets.angle.js on lines 314..317
            src/widgets/widgets.annotation.js on lines 304..307
            src/widgets/widgets.annotation.js on lines 338..341
            src/widgets/widgets.biruler.js on lines 245..248
            src/widgets/widgets.biruler.js on lines 277..280
            src/widgets/widgets.crossRuler.js on lines 299..302
            src/widgets/widgets.crossRuler.js on lines 311..314
            src/widgets/widgets.pressureHalfTime.js on lines 346..349
            src/widgets/widgets.ruler.js on lines 262..265

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

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

                  this._line2.style.transform = `translate3D(${line2Data.transformX}px, ${
                    line2Data.transformY
                  }px, 0)
                        rotate(${line2Data.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.crossRuler.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 302..305
            src/widgets/widgets.angle.js on lines 314..317
            src/widgets/widgets.annotation.js on lines 304..307
            src/widgets/widgets.annotation.js on lines 338..341
            src/widgets/widgets.biruler.js on lines 245..248
            src/widgets/widgets.biruler.js on lines 257..260
            src/widgets/widgets.biruler.js on lines 277..280
            src/widgets/widgets.crossRuler.js on lines 299..302
            src/widgets/widgets.pressureHalfTime.js on lines 346..349
            src/widgets/widgets.ruler.js on lines 262..265

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

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

                  this._line.style.transform = `translate3D(${lineData.transformX}px, ${
                    lineData.transformY
                  }px, 0)
                  rotate(${lineData.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.ruler.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 302..305
            src/widgets/widgets.angle.js on lines 314..317
            src/widgets/widgets.annotation.js on lines 304..307
            src/widgets/widgets.annotation.js on lines 338..341
            src/widgets/widgets.biruler.js on lines 245..248
            src/widgets/widgets.biruler.js on lines 257..260
            src/widgets/widgets.biruler.js on lines 277..280
            src/widgets/widgets.crossRuler.js on lines 299..302
            src/widgets/widgets.crossRuler.js on lines 311..314
            src/widgets/widgets.pressureHalfTime.js on lines 346..349

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

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

                  this._dashline.style.transform = `translate3D(${dashLineData.transformX}px, ${
                    dashLineData.transformY
                  }px, 0)
                            rotate(${dashLineData.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.biruler.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 302..305
            src/widgets/widgets.angle.js on lines 314..317
            src/widgets/widgets.annotation.js on lines 304..307
            src/widgets/widgets.annotation.js on lines 338..341
            src/widgets/widgets.biruler.js on lines 245..248
            src/widgets/widgets.biruler.js on lines 257..260
            src/widgets/widgets.crossRuler.js on lines 299..302
            src/widgets/widgets.crossRuler.js on lines 311..314
            src/widgets/widgets.pressureHalfTime.js on lines 346..349
            src/widgets/widgets.ruler.js on lines 262..265

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

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

                  this._line.style.transform = `translate3D(${lineData.transformX}px, ${
                    lineData.transformY
                  }px, 0)
                    rotate(${lineData.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.annotation.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 302..305
            src/widgets/widgets.angle.js on lines 314..317
            src/widgets/widgets.annotation.js on lines 338..341
            src/widgets/widgets.biruler.js on lines 245..248
            src/widgets/widgets.biruler.js on lines 257..260
            src/widgets/widgets.biruler.js on lines 277..280
            src/widgets/widgets.crossRuler.js on lines 299..302
            src/widgets/widgets.crossRuler.js on lines 311..314
            src/widgets/widgets.pressureHalfTime.js on lines 346..349
            src/widgets/widgets.ruler.js on lines 262..265

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

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

                  this._dashline.style.transform = `translate3D(${minLine.transformX}px, ${
                    minLine.transformY
                  }px, 0)
                    rotate(${minLine.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.annotation.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 302..305
            src/widgets/widgets.angle.js on lines 314..317
            src/widgets/widgets.annotation.js on lines 304..307
            src/widgets/widgets.biruler.js on lines 245..248
            src/widgets/widgets.biruler.js on lines 257..260
            src/widgets/widgets.biruler.js on lines 277..280
            src/widgets/widgets.crossRuler.js on lines 299..302
            src/widgets/widgets.crossRuler.js on lines 311..314
            src/widgets/widgets.pressureHalfTime.js on lines 346..349
            src/widgets/widgets.ruler.js on lines 262..265

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

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

                  this._line.style.transform = `translate3D(${lineData.transformX}px, ${
                    lineData.transformY
                  }px, 0)
                        rotate(${lineData.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.crossRuler.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 302..305
            src/widgets/widgets.angle.js on lines 314..317
            src/widgets/widgets.annotation.js on lines 304..307
            src/widgets/widgets.annotation.js on lines 338..341
            src/widgets/widgets.biruler.js on lines 245..248
            src/widgets/widgets.biruler.js on lines 257..260
            src/widgets/widgets.biruler.js on lines 277..280
            src/widgets/widgets.crossRuler.js on lines 311..314
            src/widgets/widgets.pressureHalfTime.js on lines 346..349
            src/widgets/widgets.ruler.js on lines 262..265

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

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

                  this._line.style.transform = `translate3D(${lineData.transformX}px, ${
                    lineData.transformY
                  }px, 0)
                        rotate(${lineData.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.angle.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 314..317
            src/widgets/widgets.annotation.js on lines 304..307
            src/widgets/widgets.annotation.js on lines 338..341
            src/widgets/widgets.biruler.js on lines 245..248
            src/widgets/widgets.biruler.js on lines 257..260
            src/widgets/widgets.biruler.js on lines 277..280
            src/widgets/widgets.crossRuler.js on lines 299..302
            src/widgets/widgets.crossRuler.js on lines 311..314
            src/widgets/widgets.pressureHalfTime.js on lines 346..349
            src/widgets/widgets.ruler.js on lines 262..265

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

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

                  this._line.style.transform = `translate3D(${lineData.transformX}px, ${
                    lineData.transformY
                  }px, 0)
                            rotate(${lineData.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.pressureHalfTime.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 302..305
            src/widgets/widgets.angle.js on lines 314..317
            src/widgets/widgets.annotation.js on lines 304..307
            src/widgets/widgets.annotation.js on lines 338..341
            src/widgets/widgets.biruler.js on lines 245..248
            src/widgets/widgets.biruler.js on lines 257..260
            src/widgets/widgets.biruler.js on lines 277..280
            src/widgets/widgets.crossRuler.js on lines 299..302
            src/widgets/widgets.crossRuler.js on lines 311..314
            src/widgets/widgets.ruler.js on lines 262..265

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

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

                  this._line.style.transform = `translate3D(${lineData.transformX}px, ${
                    lineData.transformY
                  }px, 0)
                            rotate(${lineData.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.biruler.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 302..305
            src/widgets/widgets.angle.js on lines 314..317
            src/widgets/widgets.annotation.js on lines 304..307
            src/widgets/widgets.annotation.js on lines 338..341
            src/widgets/widgets.biruler.js on lines 257..260
            src/widgets/widgets.biruler.js on lines 277..280
            src/widgets/widgets.crossRuler.js on lines 299..302
            src/widgets/widgets.crossRuler.js on lines 311..314
            src/widgets/widgets.pressureHalfTime.js on lines 346..349
            src/widgets/widgets.ruler.js on lines 262..265

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

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

                  this._line2.style.transform = `translate3D(${line2Data.transformX}px, ${
                    line2Data.transformY
                  }px, 0)
                        rotate(${line2Data.transformAngle}rad)`;
            Severity: Major
            Found in src/widgets/widgets.angle.js and 10 other locations - About 40 mins to fix
            src/widgets/widgets.angle.js on lines 302..305
            src/widgets/widgets.annotation.js on lines 304..307
            src/widgets/widgets.annotation.js on lines 338..341
            src/widgets/widgets.biruler.js on lines 245..248
            src/widgets/widgets.biruler.js on lines 257..260
            src/widgets/widgets.biruler.js on lines 277..280
            src/widgets/widgets.crossRuler.js on lines 299..302
            src/widgets/widgets.crossRuler.js on lines 311..314
            src/widgets/widgets.pressureHalfTime.js on lines 346..349
            src/widgets/widgets.ruler.js on lines 262..265

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

            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

                xhr.addEventListener(
                  'error',
                  function() {
                    scope.dispatchEvent({
                      type: 'error',
            Severity: Minor
            Found in src/loaders/loaders.freesurfer.js and 1 other location - About 40 mins to fix
            src/loaders/loaders.trk.js on lines 47..56

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

            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

                xhr.addEventListener(
                  'error',
                  function() {
                    scope.dispatchEvent({
                      type: 'error',
            Severity: Minor
            Found in src/loaders/loaders.trk.js and 1 other location - About 40 mins to fix
            src/loaders/loaders.freesurfer.js on lines 44..53

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

            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

                  this._handles.forEach(elem => {
                    elem.onStart(evt);
                    active = active || elem.active;
                  });
            Severity: Major
            Found in src/widgets/widgets.polygon.js and 4 other locations - About 35 mins to fix
            src/widgets/widgets.freehand.js on lines 105..108
            src/widgets/widgets.freehand.js on lines 157..160
            src/widgets/widgets.polygon.js on lines 166..169
            src/widgets/widgets.velocityTimeIntegral.js on lines 117..120

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

            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