Showing 665 of 665 total issues

Function updateDOM has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    updateDOM() {
      this.updateDOMColor();

      // update line
      const lineData = this.getLineData(
Severity: Minor
Found in src/widgets/widgets.annotation.js - About 1 hr to fix

    Function parseUrl has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      static parseUrl(url) {
        const parsedUrl = new URL(url, 'http://fix.me');
        const data = {
          filename: parsedUrl.searchParams.get('filename'),
          extension: '',
    Severity: Minor
    Found in src/core/core.utils.js - About 1 hr to fix

      Function free has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          free() {
            this.removeEventListeners();
      
            this._handles.forEach(h => {
              this.remove(h);
      Severity: Minor
      Found in src/widgets/widgets.polygon.js - About 1 hr to fix

        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._domHovered;
        Severity: Major
        Found in src/widgets/widgets.angle.js and 1 other location - About 1 hr to fix
        src/widgets/widgets.angle.js on lines 117..121

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

        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._domHovered;
        Severity: Major
        Found in src/widgets/widgets.angle.js and 1 other location - About 1 hr to fix
        src/widgets/widgets.angle.js on lines 94..98

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

        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 constructor has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            constructor(
              stack,
              index = 0,
              position = new three.Vector3(0, 0, 0),
              direction = new three.Vector3(0, 0, 1),
        Severity: Minor
        Found in src/helpers/helpers.slice.js - About 1 hr to fix

          Function _decompressUncompressed has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            _decompressUncompressed(frameIndex = 0) {
              let buffer = this._dataSet.buffer;
              const numberOfChannels = this.numberOfChannels();
              const numPixels = this.rows(frameIndex) * this.columns(frameIndex) * numberOfChannels;
              if (!this.rightHanded()) {
          Severity: Minor
          Found in src/parsers/parsers.nrrd.js - About 1 hr to fix

            Function decode8 has 34 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function decode8(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 1 hr to fix

              Function _decompressUncompressed has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                _decompressUncompressed(frameIndex = 0) {
                  // papaya.volume.nifti.NIFTI_TYPE_UINT8           = 2;
                  // papaya.volume.nifti.NIFTI_TYPE_INT16           = 4;
                  // papaya.volume.nifti.NIFTI_TYPE_INT32           = 8;
                  // papaya.volume.nifti.NIFTI_TYPE_FLOAT32        = 16;
              Severity: Minor
              Found in src/parsers/parsers.nifti.js - About 1 hr to fix

                Function decode8Planar has 34 lines of code (exceeds 25 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 1 hr to fix

                  Function constructor has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      constructor(targetMesh, controls, params = {}) {
                        super(targetMesh, controls, params);
                  
                        this._widgetType = 'Annotation';
                  
                  
                  Severity: Minor
                  Found in src/widgets/widgets.annotation.js - About 1 hr to fix

                    Function onEnd has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        onEnd() {
                          this._handles[0].onEnd(); // First Handle
                    
                          if (
                            (this._handles[1].tracking &&
                    Severity: Minor
                    Found in src/widgets/widgets.angle.js - About 1 hr to fix

                      Function constructor has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          constructor(targetMesh, controls, params = {}) {
                            super(targetMesh, controls, params);
                      
                            this._widgetType = 'Rectangle';
                      
                      
                      Severity: Minor
                      Found in src/widgets/widgets.rectangle.js - About 1 hr to fix

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

                              for (let i = 0; i < 4; i++) {
                                handle = new WidgetsHandle(targetMesh, controls, params);
                                this.add(handle);
                                this._handles.push(handle);
                              }
                        Severity: Major
                        Found in src/widgets/widgets.crossRuler.js and 7 other locations - About 1 hr to fix
                        src/widgets/widgets.angle.js on lines 43..47
                        src/widgets/widgets.annotation.js on lines 49..53
                        src/widgets/widgets.biruler.js on lines 44..48
                        src/widgets/widgets.ellipse.js on lines 49..53
                        src/widgets/widgets.pressureHalfTime.js on lines 58..62
                        src/widgets/widgets.rectangle.js on lines 48..52
                        src/widgets/widgets.ruler.js on lines 43..47

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

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

                              for (let i = 0; i < 2; i++) {
                                handle = new WidgetsHandle(targetMesh, controls, params);
                                this.add(handle);
                                this._handles.push(handle);
                              }
                        Severity: Major
                        Found in src/widgets/widgets.ruler.js and 7 other locations - About 1 hr to fix
                        src/widgets/widgets.angle.js on lines 43..47
                        src/widgets/widgets.annotation.js on lines 49..53
                        src/widgets/widgets.biruler.js on lines 44..48
                        src/widgets/widgets.crossRuler.js on lines 50..54
                        src/widgets/widgets.ellipse.js on lines 49..53
                        src/widgets/widgets.pressureHalfTime.js on lines 58..62
                        src/widgets/widgets.rectangle.js on lines 48..52

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

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

                              for (let i = 0; i < 2; i++) {
                                handle = new WidgetsHandle(targetMesh, controls, params);
                                this.add(handle);
                                this._handles.push(handle);
                              }
                        Severity: Major
                        Found in src/widgets/widgets.pressureHalfTime.js and 7 other locations - About 1 hr to fix
                        src/widgets/widgets.angle.js on lines 43..47
                        src/widgets/widgets.annotation.js on lines 49..53
                        src/widgets/widgets.biruler.js on lines 44..48
                        src/widgets/widgets.crossRuler.js on lines 50..54
                        src/widgets/widgets.ellipse.js on lines 49..53
                        src/widgets/widgets.rectangle.js on lines 48..52
                        src/widgets/widgets.ruler.js on lines 43..47

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

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

                              for (let i = 0; i < 2; i++) {
                                handle = new WidgetsHandle(targetMesh, controls, params);
                                this.add(handle);
                                this._handles.push(handle);
                              }
                        Severity: Major
                        Found in src/widgets/widgets.annotation.js and 7 other locations - About 1 hr to fix
                        src/widgets/widgets.angle.js on lines 43..47
                        src/widgets/widgets.biruler.js on lines 44..48
                        src/widgets/widgets.crossRuler.js on lines 50..54
                        src/widgets/widgets.ellipse.js on lines 49..53
                        src/widgets/widgets.pressureHalfTime.js on lines 58..62
                        src/widgets/widgets.rectangle.js on lines 48..52
                        src/widgets/widgets.ruler.js on lines 43..47

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

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

                              for (let i = 0; i < 2; i++) {
                                handle = new WidgetsHandle(targetMesh, controls, params);
                                this.add(handle);
                                this._handles.push(handle);
                              }
                        Severity: Major
                        Found in src/widgets/widgets.rectangle.js and 7 other locations - About 1 hr to fix
                        src/widgets/widgets.angle.js on lines 43..47
                        src/widgets/widgets.annotation.js on lines 49..53
                        src/widgets/widgets.biruler.js on lines 44..48
                        src/widgets/widgets.crossRuler.js on lines 50..54
                        src/widgets/widgets.ellipse.js on lines 49..53
                        src/widgets/widgets.pressureHalfTime.js on lines 58..62
                        src/widgets/widgets.ruler.js on lines 43..47

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

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

                              for (let i = 0; i < 3; i++) {
                                handle = new WidgetsHandle(targetMesh, controls, params);
                                this.add(handle);
                                this._handles.push(handle);
                              }
                        Severity: Major
                        Found in src/widgets/widgets.angle.js and 7 other locations - About 1 hr to fix
                        src/widgets/widgets.annotation.js on lines 49..53
                        src/widgets/widgets.biruler.js on lines 44..48
                        src/widgets/widgets.crossRuler.js on lines 50..54
                        src/widgets/widgets.ellipse.js on lines 49..53
                        src/widgets/widgets.pressureHalfTime.js on lines 58..62
                        src/widgets/widgets.rectangle.js on lines 48..52
                        src/widgets/widgets.ruler.js on lines 43..47

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

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

                              for (let i = 0; i < 2; i++) {
                                handle = new WidgetsHandle(targetMesh, controls, params);
                                this.add(handle);
                                this._handles.push(handle);
                              }
                        Severity: Major
                        Found in src/widgets/widgets.ellipse.js and 7 other locations - About 1 hr to fix
                        src/widgets/widgets.angle.js on lines 43..47
                        src/widgets/widgets.annotation.js on lines 49..53
                        src/widgets/widgets.biruler.js on lines 44..48
                        src/widgets/widgets.crossRuler.js on lines 50..54
                        src/widgets/widgets.pressureHalfTime.js on lines 58..62
                        src/widgets/widgets.rectangle.js on lines 48..52
                        src/widgets/widgets.ruler.js on lines 43..47

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

                        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