NLeSC/Cesium-NcWMS

View on GitHub

Showing 81 of 81 total issues

Function DecimalAdjust has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function DecimalAdjust() {
        /**
         * Decimal adjustment of a number.
         * 
         * @param {String}
Severity: Minor
Found in app/scripts/util/decimaladjust.service.js - About 1 hr to fix

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

    (function() {
      'use strict';
    
      function cesiumFlyToDropdownDirective() {
        return {
    Severity: Major
    Found in app/scripts/flyto/flyto.directive.js and 9 other locations - About 1 hr to fix
    app/scripts/biglegend/biglegend.directive.js on lines 1..14
    app/scripts/cesiumncwmslayer/cesium.ncwms.layer.directive.js on lines 1..14
    app/scripts/dataset/dataset.directive.js on lines 1..14
    app/scripts/help/help.directive.js on lines 1..14
    app/scripts/logarithmic/logarithmic.directive.js on lines 1..14
    app/scripts/outlines/outlines.directive.js on lines 1..14
    app/scripts/palette/palette.directive.js on lines 1..14
    app/scripts/terrain/terrain.directive.js on lines 1..14
    app/scripts/viewmodel/viewmodel.directive.js on lines 1..14

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

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

    (function() {
      'use strict';
    
      function cesiumNcwmsLayerDirective() {
        return {
    app/scripts/biglegend/biglegend.directive.js on lines 1..14
    app/scripts/dataset/dataset.directive.js on lines 1..14
    app/scripts/flyto/flyto.directive.js on lines 1..14
    app/scripts/help/help.directive.js on lines 1..14
    app/scripts/logarithmic/logarithmic.directive.js on lines 1..14
    app/scripts/outlines/outlines.directive.js on lines 1..14
    app/scripts/palette/palette.directive.js on lines 1..14
    app/scripts/terrain/terrain.directive.js on lines 1..14
    app/scripts/viewmodel/viewmodel.directive.js on lines 1..14

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

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

    (function() {
      'use strict';
    
      function terrainToggleDirective() {
        return {
    Severity: Major
    Found in app/scripts/terrain/terrain.directive.js and 9 other locations - About 1 hr to fix
    app/scripts/biglegend/biglegend.directive.js on lines 1..14
    app/scripts/cesiumncwmslayer/cesium.ncwms.layer.directive.js on lines 1..14
    app/scripts/dataset/dataset.directive.js on lines 1..14
    app/scripts/flyto/flyto.directive.js on lines 1..14
    app/scripts/help/help.directive.js on lines 1..14
    app/scripts/logarithmic/logarithmic.directive.js on lines 1..14
    app/scripts/outlines/outlines.directive.js on lines 1..14
    app/scripts/palette/palette.directive.js on lines 1..14
    app/scripts/viewmodel/viewmodel.directive.js on lines 1..14

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

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

    (function() {
      'use strict';
    
      function logarithmicToggleDirective() {
        return {
    Severity: Major
    Found in app/scripts/logarithmic/logarithmic.directive.js and 9 other locations - About 1 hr to fix
    app/scripts/biglegend/biglegend.directive.js on lines 1..14
    app/scripts/cesiumncwmslayer/cesium.ncwms.layer.directive.js on lines 1..14
    app/scripts/dataset/dataset.directive.js on lines 1..14
    app/scripts/flyto/flyto.directive.js on lines 1..14
    app/scripts/help/help.directive.js on lines 1..14
    app/scripts/outlines/outlines.directive.js on lines 1..14
    app/scripts/palette/palette.directive.js on lines 1..14
    app/scripts/terrain/terrain.directive.js on lines 1..14
    app/scripts/viewmodel/viewmodel.directive.js on lines 1..14

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

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

    (function() {
      'use strict';
    
      function paletteDropdownDirective() {
        return {
    Severity: Major
    Found in app/scripts/palette/palette.directive.js and 9 other locations - About 1 hr to fix
    app/scripts/biglegend/biglegend.directive.js on lines 1..14
    app/scripts/cesiumncwmslayer/cesium.ncwms.layer.directive.js on lines 1..14
    app/scripts/dataset/dataset.directive.js on lines 1..14
    app/scripts/flyto/flyto.directive.js on lines 1..14
    app/scripts/help/help.directive.js on lines 1..14
    app/scripts/logarithmic/logarithmic.directive.js on lines 1..14
    app/scripts/outlines/outlines.directive.js on lines 1..14
    app/scripts/terrain/terrain.directive.js on lines 1..14
    app/scripts/viewmodel/viewmodel.directive.js on lines 1..14

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

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

    (function() {
      'use strict';
    
      function bigLegendDirective() {
        return {
    Severity: Major
    Found in app/scripts/biglegend/biglegend.directive.js and 9 other locations - About 1 hr to fix
    app/scripts/cesiumncwmslayer/cesium.ncwms.layer.directive.js on lines 1..14
    app/scripts/dataset/dataset.directive.js on lines 1..14
    app/scripts/flyto/flyto.directive.js on lines 1..14
    app/scripts/help/help.directive.js on lines 1..14
    app/scripts/logarithmic/logarithmic.directive.js on lines 1..14
    app/scripts/outlines/outlines.directive.js on lines 1..14
    app/scripts/palette/palette.directive.js on lines 1..14
    app/scripts/terrain/terrain.directive.js on lines 1..14
    app/scripts/viewmodel/viewmodel.directive.js on lines 1..14

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

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

    (function() {
      'use strict';
    
      function helpDirective() {
        return {
    Severity: Major
    Found in app/scripts/help/help.directive.js and 9 other locations - About 1 hr to fix
    app/scripts/biglegend/biglegend.directive.js on lines 1..14
    app/scripts/cesiumncwmslayer/cesium.ncwms.layer.directive.js on lines 1..14
    app/scripts/dataset/dataset.directive.js on lines 1..14
    app/scripts/flyto/flyto.directive.js on lines 1..14
    app/scripts/logarithmic/logarithmic.directive.js on lines 1..14
    app/scripts/outlines/outlines.directive.js on lines 1..14
    app/scripts/palette/palette.directive.js on lines 1..14
    app/scripts/terrain/terrain.directive.js on lines 1..14
    app/scripts/viewmodel/viewmodel.directive.js on lines 1..14

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

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

    (function() {
      'use strict';
    
      function datasetDirective() {
        return {
    Severity: Major
    Found in app/scripts/dataset/dataset.directive.js and 9 other locations - About 1 hr to fix
    app/scripts/biglegend/biglegend.directive.js on lines 1..14
    app/scripts/cesiumncwmslayer/cesium.ncwms.layer.directive.js on lines 1..14
    app/scripts/flyto/flyto.directive.js on lines 1..14
    app/scripts/help/help.directive.js on lines 1..14
    app/scripts/logarithmic/logarithmic.directive.js on lines 1..14
    app/scripts/outlines/outlines.directive.js on lines 1..14
    app/scripts/palette/palette.directive.js on lines 1..14
    app/scripts/terrain/terrain.directive.js on lines 1..14
    app/scripts/viewmodel/viewmodel.directive.js on lines 1..14

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

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

    (function() {
      'use strict';
    
      function outlinesToggleDirective() {
        return {
    Severity: Major
    Found in app/scripts/outlines/outlines.directive.js and 9 other locations - About 1 hr to fix
    app/scripts/biglegend/biglegend.directive.js on lines 1..14
    app/scripts/cesiumncwmslayer/cesium.ncwms.layer.directive.js on lines 1..14
    app/scripts/dataset/dataset.directive.js on lines 1..14
    app/scripts/flyto/flyto.directive.js on lines 1..14
    app/scripts/help/help.directive.js on lines 1..14
    app/scripts/logarithmic/logarithmic.directive.js on lines 1..14
    app/scripts/palette/palette.directive.js on lines 1..14
    app/scripts/terrain/terrain.directive.js on lines 1..14
    app/scripts/viewmodel/viewmodel.directive.js on lines 1..14

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

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

    (function() {
      'use strict';
    
      function cesiumViewmodelDropdownDirective() {
        return {
    Severity: Major
    Found in app/scripts/viewmodel/viewmodel.directive.js and 9 other locations - About 1 hr to fix
    app/scripts/biglegend/biglegend.directive.js on lines 1..14
    app/scripts/cesiumncwmslayer/cesium.ncwms.layer.directive.js on lines 1..14
    app/scripts/dataset/dataset.directive.js on lines 1..14
    app/scripts/flyto/flyto.directive.js on lines 1..14
    app/scripts/help/help.directive.js on lines 1..14
    app/scripts/logarithmic/logarithmic.directive.js on lines 1..14
    app/scripts/outlines/outlines.directive.js on lines 1..14
    app/scripts/palette/palette.directive.js on lines 1..14
    app/scripts/terrain/terrain.directive.js on lines 1..14

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

    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 init has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                init: function(element) {      
                    this.clock = new Cesium.Clock({
                        multiplier : 500.0
                    });
                    this.clockViewModel = new Cesium.ClockViewModel(this.clock);
    Severity: Minor
    Found in app/scripts/cesiumviewer/cesium-viewer.service.js - About 1 hr to fix

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

                    var xAxis = d3.svg.axis()
                      .scale(x)
                      .orient('bottom')
                      .innerTickSize(-chartHeight)
                      .outerTickSize(0)
      Severity: Major
      Found in app/scripts/customgraph/customgraph.controller.js and 1 other location - About 1 hr to fix
      app/scripts/customgraph/customgraph.controller.js on lines 432..437

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

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

                    var yAxis = d3.svg.axis()
                      .scale(y)
                      .orient('left')
                      .innerTickSize(-chartWidth)
                      .outerTickSize(0)
      Severity: Major
      Found in app/scripts/customgraph/customgraph.controller.js and 1 other location - About 1 hr to fix
      app/scripts/customgraph/customgraph.controller.js on lines 425..430

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

      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 PaletteController has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function PaletteController(NcwmsService, Messagebus, UserAgent) {
          this.mobile = UserAgent.mobile;
          this.getNcWMSdata = function() {
            return NcwmsService.ncWMSdata;
          };
      Severity: Minor
      Found in app/scripts/palette/palette.controller.js - About 1 hr to fix

        Function addAxesAndLegend has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                    this.addAxesAndLegend = function(svg, xAxis, yAxis, margin, chartWidth, chartHeight) {
                      var legendWidth = 0,
                        legendHeight = 0;
        
                      svg.append('clipPath')
        Severity: Minor
        Found in app/scripts/customgraph/customgraph.controller.js - About 1 hr to fix

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

            function CustomGraphController($scope, $window, $timeout, $http, d3Service, NcwmsService, Messagebus, UserAgent) {
          Severity: Major
          Found in app/scripts/customgraph/customgraph.controller.js - About 1 hr to fix

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

                          hoverLine = hoverLineGroup
                            .append('line')
                            .attr('x1', 10).attr('x2', 10) // vertical line so same value on each
                            .attr('y1', 0).attr('y2', chartHeight); // top to bottom
            Severity: Minor
            Found in app/scripts/customgraph/customgraph.controller.js and 1 other location - About 55 mins to fix
            app/scripts/customgraph/customgraph.controller.js on lines 311..314

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 54.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

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

                          timeIndicatorLine = timeIndicatorLineGroup
                            .append('line')
                            .attr('x1', 10).attr('x2', 10) // vertical line so same value on each
                            .attr('y1', 0).attr('y2', chartHeight); // top to bottom
            Severity: Minor
            Found in app/scripts/customgraph/customgraph.controller.js and 1 other location - About 55 mins to fix
            app/scripts/customgraph/customgraph.controller.js on lines 298..301

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 54.

            We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

            The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

            See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

            Refactorings

            Further Reading

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

                Messagebus.subscribe('ncwmsDatasetSelected', function(event, value) {
                  if (this.selectedDataset !== value) {
                    this.selectedDataset = value;
                  }
                }.bind(this));
            Severity: Minor
            Found in app/scripts/dataset/dataset.controller.js and 1 other location - About 55 mins to fix
            app/scripts/customgraph/customgraph.controller.js on lines 57..61

            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

            Severity
            Category
            Status
            Source
            Language