NLeSC/ahn-pointcloud-viewer

View on GitHub

Showing 154 of 154 total issues

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

    this.startHeightProfile = function() {
      this.resetState();
      this.heightProfileActive = true;
      this.measuringService.startHeightProfile();
    };
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 93..97

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

Function PointcloudExtractionSelectionService has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

  function PointcloudExtractionSelectionService(THREE, SceneService, ExtractionSelectionService, ExtractionDrawingService, Messagebus, Potree) {
Severity: Minor
Found in app/scripts/extract/pointcloud.extraction.selection.service.js - About 45 mins to fix

    Function roundRect has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    Potree.TextSprite.prototype.roundRect = function(ctx, x, y, w, h, r) {
    Severity: Minor
    Found in app/scripts/utils/TextSprite.js - About 45 mins to fix

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

            var topright = {
              lon: round2Dec(coordinates[0][3][0]),
              lat: round2Dec(coordinates[0][3][1])
            };
      Severity: Minor
      Found in app/scripts/extract/minimap.extraction.selection.service.js and 1 other location - About 45 mins to fix
      app/scripts/extract/minimap.extraction.selection.service.js on lines 80..83

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 50.

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

        function EarthcontrolsService($rootScope, $location, Messagebus, THREE, PathControls, RailService) { // jshint ignore:line
      Severity: Minor
      Found in app/scripts/earthcontrols/earthcontrols.service.js - About 45 mins to fix

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

              var lookatPosition = new THREE.Vector3( 0, 0, -1 * this.lookatDistance ).applyQuaternion( camera.quaternion ).add( camera.position );
        Severity: Minor
        Found in app/scripts/pointcloud/rail.service.js and 1 other location - About 45 mins to fix
        app/scripts/pointcloud/rail.service.js on lines 40..40

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

        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

              var bottomleft = {
                lon: round2Dec(coordinates[0][1][0]),
                lat: round2Dec(coordinates[0][1][1])
              };
        Severity: Minor
        Found in app/scripts/extract/minimap.extraction.selection.service.js and 1 other location - About 45 mins to fix
        app/scripts/extract/minimap.extraction.selection.service.js on lines 76..79

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

        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

              var lookatPosition = new THREE.Vector3( 0, 0, -1 * this.lookatDistance ).applyQuaternion( camera.quaternion ).add( camera.position );
        Severity: Minor
        Found in app/scripts/pointcloud/rail.service.js and 1 other location - About 45 mins to fix
        app/scripts/pointcloud/rail.service.js on lines 51..51

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

        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

            PathControls.prototype.enableDemoMode = function() {
                this.transitionFromFlightMode();
                this.mode = this.modes.DEMO;
            };
        Severity: Minor
        Found in app/scripts/pointcloud/path.controls.js and 1 other location - About 40 mins to fix
        app/scripts/pointcloud/path.controls.js on lines 358..361

        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

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

            PathControls.prototype.enableRailsMode = function() {
                this.transitionFromFlightMode();
                this.mode = this.modes.ONRAILS;
            };
        Severity: Minor
        Found in app/scripts/pointcloud/path.controls.js and 1 other location - About 40 mins to fix
        app/scripts/pointcloud/path.controls.js on lines 363..366

        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

        Function SettingsController has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          function SettingsController(PointcloudService, MeasuringService, Messagebus, PathControls, RailService) {
        Severity: Minor
        Found in app/scripts/settings/settings.controller.js - About 35 mins to fix

          Function BigLegendController has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            function BigLegendController($scope, DecimalAdjust, Messagebus, UserAgent, PointcloudService) {
          Severity: Minor
          Found in app/scripts/biglegend/biglegend.controller.js - About 35 mins to fix

            Function buildSelectionGeometry has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                this.buildSelectionGeometry = function(leftTopLocal, rightTopLocal, rightBottomLocal, leftBottomLocal, color) {
            Severity: Minor
            Found in app/scripts/extract/pointcloud.extraction.drawing.service.js - About 35 mins to fix

              Function init has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  this.init = function(camera, renderer, scenePointCloud, pointcloud, elementRenderArea)  {
              Severity: Minor
              Found in app/scripts/earthcontrols/earthcontrols.service.js - About 35 mins to fix

                Function MinimapController has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  function MinimapController(ol, proj4, CamFrustumService, Messagebus, MinimapExtractionSelectionService) {
                Severity: Minor
                Found in app/scripts/minimap/minimap.controller.js - About 35 mins to fix

                  Function RailService has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    function RailService(CameraService, SceneService, THREE, toastr, $window) {
                  Severity: Minor
                  Found in app/scripts/pointcloud/rail.service.js - About 35 mins to fix

                    Function projectedRadius has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      function projectedRadius(radius, camera, distance, screenWidth, screenHeight){
                    Severity: Minor
                    Found in app/scripts/utils/MeasuringTool.js - About 35 mins to fix

                      Function ExtractionController has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        function ExtractionController(ExtractionSelectionService, pattyConf, Messagebus, $http, toastr) {
                      Severity: Minor
                      Found in app/scripts/extract/extraction.controller.js - About 35 mins to fix

                        Function DrivemapService has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          function DrivemapService($http, $q, $log, proj4, pattyConf) {
                        Severity: Minor
                        Found in app/scripts/core/drivemap.service.js - About 35 mins to fix

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

                                  this.legendText[1] = Math.round10((Math.pow(10, 0.4 * logmin + 0.6 * logmax)), -2);
                          Severity: Major
                          Found in app/scripts/biglegend/biglegend.controller.js and 3 other locations - About 35 mins to fix
                          app/scripts/biglegend/biglegend.controller.js on lines 66..66
                          app/scripts/biglegend/biglegend.controller.js on lines 67..67
                          app/scripts/biglegend/biglegend.controller.js on lines 69..69

                          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