NLeSC/PattyVis

View on GitHub

Showing 57 of 91 total issues

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

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

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 275..275
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 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 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], 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 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
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], 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 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 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 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 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 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 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 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

Severity
Category
Status
Source
Language