NLeSC/PattyVis

View on GitHub

Showing 91 of 91 total issues

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 32..50
app/scripts/measuring/measuring.service.js on lines 44..50

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 === 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 32..50
app/scripts/measuring/measuring.service.js on lines 38..50

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

    this.showClipping = function() {
      var result = false;
      if (this.heightProfileActive || this.clipVolumeActive) {
        result = true;
      }
Severity: Minor
Found in app/scripts/measuring/measuring.controller.js and 1 other location - About 50 mins to fix
app/scripts/measuring/measuring.controller.js on lines 60..66

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

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;
    this.messagebus.publish('pathModeChanged', this.mode);
    };
Severity: Minor
Found in app/scripts/pointcloud/path.controls.js and 1 other location - About 50 mins to fix
app/scripts/pointcloud/path.controls.js on lines 417..421

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

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.showTransform = function() {
      var result = false;
      if (this.volumeActive || this.clipVolumeActive) {
        result = true;
      }
Severity: Minor
Found in app/scripts/measuring/measuring.controller.js and 1 other location - About 50 mins to fix
app/scripts/measuring/measuring.controller.js on lines 68..74

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

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

    } else {
      this.transitionFromFlightMode();
      this.mode = this.modes.DEMO;
      this.messagebus.publish('pathModeChanged', this.mode);
    }
Severity: Minor
Found in app/scripts/pointcloud/path.controls.js and 1 other location - About 50 mins to fix
app/scripts/pointcloud/path.controls.js on lines 408..412

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

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.startVolume = function() {
      if (this.tools.volume) {
        //TODO Fix Rendering.
        this.tools.volume.startInsertion();
      }
Severity: Minor
Found in app/scripts/measuring/measuring.service.js and 1 other location - About 50 mins to fix
app/scripts/measuring/measuring.service.js on lines 108..113

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 4 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 3 other locations - About 50 mins to fix
app/scripts/measuring/measuring.controller.js on lines 84..88
app/scripts/measuring/measuring.controller.js on lines 90..94
app/scripts/measuring/measuring.controller.js on lines 102..106

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 4 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 3 other locations - About 50 mins to fix
app/scripts/measuring/measuring.controller.js on lines 90..94
app/scripts/measuring/measuring.controller.js on lines 96..100
app/scripts/measuring/measuring.controller.js on lines 102..106

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 4 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 3 other locations - About 50 mins to fix
app/scripts/measuring/measuring.controller.js on lines 84..88
app/scripts/measuring/measuring.controller.js on lines 96..100
app/scripts/measuring/measuring.controller.js on lines 102..106

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

    this.startDistance = function() {
      if (this.tools.distance) {
        //TODO Fix Rendering.
        this.tools.distance.startInsertion();
      }
Severity: Minor
Found in app/scripts/measuring/measuring.service.js and 1 other location - About 50 mins to fix
app/scripts/measuring/measuring.service.js on lines 129..134

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 4 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 3 other locations - About 50 mins to fix
app/scripts/measuring/measuring.controller.js on lines 84..88
app/scripts/measuring/measuring.controller.js on lines 90..94
app/scripts/measuring/measuring.controller.js on lines 96..100

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

    beforeEach(function() {
      element(by.model('sp.SitesService.query')).sendKeys('zzzz');
      // wait for search to complete
      browser.sleep(600);
    });
Severity: Minor
Found in e2e/scenario.js and 1 other location - About 45 mins to fix
e2e/scenario.js on lines 32..36

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

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

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

        beforeEach(function() {
          element(by.model('sp.SitesService.query')).sendKeys('site:162');
          // wait for search to complete
          browser.sleep(600);
        });
    Severity: Minor
    Found in e2e/scenario.js and 1 other location - About 45 mins to fix
    e2e/scenario.js on lines 46..50

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

                  geometry.vertices.push(new THREE.Vector3(point0[0]-siteCenter[0], point0[1]-siteCenter[1], 1));
    Severity: Major
    Found in app/scripts/pointcloud/site-box.service.js and 11 other locations - About 40 mins to fix
    app/scripts/pointcloud/site-box.service.js on lines 257..257
    app/scripts/pointcloud/site-box.service.js on lines 258..258
    app/scripts/pointcloud/site-box.service.js on lines 263..263
    app/scripts/pointcloud/site-box.service.js on lines 264..264
    app/scripts/pointcloud/site-box.service.js on lines 265..265
    app/scripts/pointcloud/site-box.service.js on lines 273..273
    app/scripts/pointcloud/site-box.service.js on lines 274..274
    app/scripts/pointcloud/site-box.service.js on lines 275..275
    app/scripts/pointcloud/site-box.service.js on lines 279..279
    app/scripts/pointcloud/site-box.service.js on lines 280..280
    app/scripts/pointcloud/site-box.service.js on lines 281..281

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

                  geometry.vertices.push(new THREE.Vector3(point1[0]-siteCenter[0], point1[1]-siteCenter[1], 0));
    Severity: Major
    Found in app/scripts/pointcloud/site-box.service.js and 11 other locations - About 40 mins to fix
    app/scripts/pointcloud/site-box.service.js on lines 257..257
    app/scripts/pointcloud/site-box.service.js on lines 259..259
    app/scripts/pointcloud/site-box.service.js on lines 263..263
    app/scripts/pointcloud/site-box.service.js on lines 264..264
    app/scripts/pointcloud/site-box.service.js on lines 265..265
    app/scripts/pointcloud/site-box.service.js on lines 273..273
    app/scripts/pointcloud/site-box.service.js on lines 274..274
    app/scripts/pointcloud/site-box.service.js on lines 275..275
    app/scripts/pointcloud/site-box.service.js on lines 279..279
    app/scripts/pointcloud/site-box.service.js on lines 280..280
    app/scripts/pointcloud/site-box.service.js on lines 281..281

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

                geometry.vertices.push(new THREE.Vector3(point1[0]-siteCenter[0], point1[1]-siteCenter[1], 1));
    Severity: Major
    Found in app/scripts/pointcloud/site-box.service.js and 11 other locations - About 40 mins to fix
    app/scripts/pointcloud/site-box.service.js on lines 257..257
    app/scripts/pointcloud/site-box.service.js on lines 258..258
    app/scripts/pointcloud/site-box.service.js on lines 259..259
    app/scripts/pointcloud/site-box.service.js on lines 263..263
    app/scripts/pointcloud/site-box.service.js on lines 264..264
    app/scripts/pointcloud/site-box.service.js on lines 265..265
    app/scripts/pointcloud/site-box.service.js on lines 273..273
    app/scripts/pointcloud/site-box.service.js on lines 274..274
    app/scripts/pointcloud/site-box.service.js on lines 275..275
    app/scripts/pointcloud/site-box.service.js on lines 279..279
    app/scripts/pointcloud/site-box.service.js on lines 280..280

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

                  geometry.vertices.push(new THREE.Vector3(point0[0]-siteCenter[0], point0[1]-siteCenter[1], 1));
    Severity: Major
    Found in app/scripts/pointcloud/site-box.service.js and 11 other locations - About 40 mins to fix
    app/scripts/pointcloud/site-box.service.js on lines 257..257
    app/scripts/pointcloud/site-box.service.js on lines 258..258
    app/scripts/pointcloud/site-box.service.js on lines 259..259
    app/scripts/pointcloud/site-box.service.js on lines 264..264
    app/scripts/pointcloud/site-box.service.js on lines 265..265
    app/scripts/pointcloud/site-box.service.js on lines 273..273
    app/scripts/pointcloud/site-box.service.js on lines 274..274
    app/scripts/pointcloud/site-box.service.js on lines 275..275
    app/scripts/pointcloud/site-box.service.js on lines 279..279
    app/scripts/pointcloud/site-box.service.js on lines 280..280
    app/scripts/pointcloud/site-box.service.js on lines 281..281

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

                geometry.vertices.push(new THREE.Vector3(point0[0]-siteCenter[0], point0[1]-siteCenter[1], 1));
    Severity: Major
    Found in app/scripts/pointcloud/site-box.service.js and 11 other locations - About 40 mins to fix
    app/scripts/pointcloud/site-box.service.js on lines 257..257
    app/scripts/pointcloud/site-box.service.js on lines 258..258
    app/scripts/pointcloud/site-box.service.js on lines 259..259
    app/scripts/pointcloud/site-box.service.js on lines 263..263
    app/scripts/pointcloud/site-box.service.js on lines 264..264
    app/scripts/pointcloud/site-box.service.js on lines 265..265
    app/scripts/pointcloud/site-box.service.js on lines 273..273
    app/scripts/pointcloud/site-box.service.js on lines 274..274
    app/scripts/pointcloud/site-box.service.js on lines 279..279
    app/scripts/pointcloud/site-box.service.js on lines 280..280
    app/scripts/pointcloud/site-box.service.js on lines 281..281

    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

    Severity
    Category
    Status
    Source
    Language