NLeSC/PattyVis

View on GitHub
app/scripts/pointcloud/site-box.service.js

Summary

Maintainability
D
2 days
Test Coverage

Function SiteBoxService has 211 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  function SiteBoxService(THREE, SitesService, CameraService, SceneService, Messagebus) {
    var me = this;

    var raycaster = new THREE.Raycaster();
    raycaster.params = {
Severity: Major
Found in app/scripts/pointcloud/site-box.service.js - About 1 day to fix

    Function createSiteBox has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        this.createSiteBox = function(site) {
          var bBox;
    
          var siteCenter = SitesService.centerOfSite(site);
          //var boxSize = SitesService.getBoundingBoxSize(site);
    Severity: Major
    Found in app/scripts/pointcloud/site-box.service.js - About 2 hrs to fix

      Function addTextLabel has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          this.addTextLabel = function(siteBox) {
            // parameters
            var canvasSize = 1000; // pt != on-screen pixels
            var fontsize = 40; // pt (same as canvas size)
            var textBoxPadding = fontsize / 2; // pt
      Severity: Minor
      Found in app/scripts/pointcloud/site-box.service.js - About 1 hr to fix

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

          function SiteBoxService(THREE, SitesService, CameraService, SceneService, Messagebus) {
        Severity: Minor
        Found in app/scripts/pointcloud/site-box.service.js - About 35 mins to fix

          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

          There are no issues that match your filters.

          Category
          Status