NLeSC/ahn-pointcloud-viewer

View on GitHub

Showing 154 of 154 total issues

Function SearchPanelController has 8 arguments (exceeds 4 allowed). Consider refactoring.
Open

  function SearchPanelController(BingGeoCoderService, SceneService, PathControls, Messagebus, $window, toastr, THREE, proj4) {
Severity: Major
Found in app/scripts/searchbox/searchbox.controller.js - About 1 hr to fix

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

                    angleLabel.visible = this.showAngles && (index < lastIndex || this.closed) && this.points.length >= 3 && angle > 0;
    Severity: Major
    Found in app/scripts/utils/MeasuringTool.js and 1 other location - About 1 hr to fix
    app/scripts/utils/MeasuringTool.js on lines 243..243

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

    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

            rtNormalize = new THREE.WebGLRenderTarget(1024, 1024, {
              minFilter: THREE.LinearFilter,
              magFilter: THREE.NearestFilter,
              format: THREE.RGBAFormat,
              type: THREE.FloatType
    Severity: Minor
    Found in app/scripts/pointcloud/pointcloud.service.js and 1 other location - About 55 mins to fix
    app/scripts/pointcloud/pointcloud.service.js on lines 604..609

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

    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

            if (me.settings.showSkybox) {
              skybox.camera.rotation.copy(camera.rotation);
              me.renderer.render(skybox.scene, skybox.camera);
            // } else {
            //   me.renderer.render(sceneBG, cameraBG);
    Severity: Minor
    Found in app/scripts/pointcloud/pointcloud.service.js and 1 other location - About 55 mins to fix
    app/scripts/pointcloud/pointcloud.service.js on lines 535..540

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

    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

        Object.defineProperty(this, 'right', {
          get: function() { return this._right; },
          set: function(newValue) {
            this.updateValue('_right', newValue);
          }
    Severity: Major
    Found in app/scripts/extract/extraction.selection.service.js and 3 other locations - About 55 mins to fix
    app/scripts/extract/extraction.selection.service.js on lines 36..41
    app/scripts/extract/extraction.selection.service.js on lines 43..48
    app/scripts/extract/extraction.selection.service.js on lines 57..62

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

    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

        Object.defineProperty(this, 'top', {
          get: function() { return this._top; },
          set: function(newValue) {
            this.updateValue('_top', newValue);
          }
    Severity: Major
    Found in app/scripts/extract/extraction.selection.service.js and 3 other locations - About 55 mins to fix
    app/scripts/extract/extraction.selection.service.js on lines 36..41
    app/scripts/extract/extraction.selection.service.js on lines 50..55
    app/scripts/extract/extraction.selection.service.js on lines 57..62

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

    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

        Object.defineProperty(this, 'left', {
          get: function() { return this._left; },
          set: function(newValue) {
            this.updateValue('_left', newValue);
          }
    Severity: Major
    Found in app/scripts/extract/extraction.selection.service.js and 3 other locations - About 55 mins to fix
    app/scripts/extract/extraction.selection.service.js on lines 43..48
    app/scripts/extract/extraction.selection.service.js on lines 50..55
    app/scripts/extract/extraction.selection.service.js on lines 57..62

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

    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

            rtDepth = new THREE.WebGLRenderTarget(1024, 1024, {
              minFilter: THREE.NearestFilter,
              magFilter: THREE.NearestFilter,
              format: THREE.RGBAFormat,
              type: THREE.FloatType
    Severity: Minor
    Found in app/scripts/pointcloud/pointcloud.service.js and 1 other location - About 55 mins to fix
    app/scripts/pointcloud/pointcloud.service.js on lines 611..616

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

    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

        Object.defineProperty(this, 'bottom', {
          get: function() { return this._bottom; },
          set: function(newValue) {
            this.updateValue('_bottom', newValue);
          } 
    Severity: Major
    Found in app/scripts/extract/extraction.selection.service.js and 3 other locations - About 55 mins to fix
    app/scripts/extract/extraction.selection.service.js on lines 36..41
    app/scripts/extract/extraction.selection.service.js on lines 43..48
    app/scripts/extract/extraction.selection.service.js on lines 50..55

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

    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

            if (me.settings.showSkybox) {
              skybox.camera.rotation.copy(camera.rotation);
              me.renderer.render(skybox.scene, skybox.camera);
            // } else {
            //   me.renderer.render(sceneBG, cameraBG);
    Severity: Minor
    Found in app/scripts/pointcloud/pointcloud.service.js and 1 other location - About 55 mins to fix
    app/scripts/pointcloud/pointcloud.service.js on lines 851..856

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

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

          } else if (event.keyCode === 84) {
            // t pressed
            this.activeTransformationTool = this.transformationTools.TRANSLATE;
            $rootScope.$digest();
    
    
    Severity: Major
    Found in app/scripts/measuring/measuring.service.js and 2 other locations - About 55 mins to fix
    app/scripts/measuring/measuring.service.js on lines 30..48
    app/scripts/measuring/measuring.service.js on lines 36..48

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

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

          } else if (event.keyCode === 82) {
            // r pressed
            this.activeTransformationTool = this.transformationTools.ROTATE;
            $rootScope.$digest();
    
    
    Severity: Major
    Found in app/scripts/measuring/measuring.service.js and 2 other locations - About 55 mins to fix
    app/scripts/measuring/measuring.service.js on lines 30..48
    app/scripts/measuring/measuring.service.js on lines 42..48

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

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

          if (event.keyCode === 69) {
            // e pressed
            this.activeTransformationTool = this.transformationTools.SCALE;
            $rootScope.$digest();
    
    
    Severity: Major
    Found in app/scripts/measuring/measuring.service.js and 2 other locations - About 55 mins to fix
    app/scripts/measuring/measuring.service.js on lines 36..48
    app/scripts/measuring/measuring.service.js on lines 42..48

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

    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 CameraService has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      function CameraService($rootScope, $window, $log, $location, THREE, Messagebus, SceneService) {
    Severity: Major
    Found in app/scripts/pointcloud/camera.service.js - About 50 mins to fix

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

            if (!this.showToolboxTray) {
              Messagebus.publish('closeOtherPanels', 'toolbox');
      
              this.showToolboxTray = true;
            } else {
      Severity: Minor
      Found in app/scripts/measuring/measuring.controller.js and 1 other location - About 50 mins to fix
      app/scripts/settings/settings.controller.js on lines 19..25

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

      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.startAngle = function() {
            this.resetState();
            this.angleActive = true;
            this.measuringService.startAngle();
          };
      Severity: Major
      Found in app/scripts/measuring/measuring.controller.js and 4 other locations - About 50 mins to fix
      app/scripts/measuring/measuring.controller.js on lines 75..79
      app/scripts/measuring/measuring.controller.js on lines 87..91
      app/scripts/measuring/measuring.controller.js on lines 93..97
      app/scripts/measuring/measuring.controller.js on lines 107..111

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

      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.startDistance = function() {
            this.resetState();
            this.distanceActive = true;
            this.measuringService.startDistance();
          };
      Severity: Major
      Found in app/scripts/measuring/measuring.controller.js and 4 other locations - About 50 mins to fix
      app/scripts/measuring/measuring.controller.js on lines 81..85
      app/scripts/measuring/measuring.controller.js on lines 87..91
      app/scripts/measuring/measuring.controller.js on lines 93..97
      app/scripts/measuring/measuring.controller.js on lines 107..111

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

      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

            if (!this.showSettings) {
              Messagebus.publish('closeOtherPanels', 'settings');
      
              this.showSettings = true;
            } else {
      Severity: Minor
      Found in app/scripts/settings/settings.controller.js and 1 other location - About 50 mins to fix
      app/scripts/measuring/measuring.controller.js on lines 20..26

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

      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.startArea = function() {
            this.resetState();
            this.areaActive = true;
            this.measuringService.startArea();
          };
      Severity: Major
      Found in app/scripts/measuring/measuring.controller.js and 4 other locations - About 50 mins to fix
      app/scripts/measuring/measuring.controller.js on lines 75..79
      app/scripts/measuring/measuring.controller.js on lines 81..85
      app/scripts/measuring/measuring.controller.js on lines 93..97
      app/scripts/measuring/measuring.controller.js on lines 107..111

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

      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.startAngle = function() {
            this.resetState();
            this.angleActive = true;
            this.measuringService.startAngle();
          };
      Severity: Major
      Found in app/scripts/measuring/measuring.controller.js and 4 other locations - About 50 mins to fix
      app/scripts/measuring/measuring.controller.js on lines 75..79
      app/scripts/measuring/measuring.controller.js on lines 81..85
      app/scripts/measuring/measuring.controller.js on lines 87..91
      app/scripts/measuring/measuring.controller.js on lines 107..111

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

      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