estimancy/projestimate

View on GitHub

Showing 1,675 of 1,675 total issues

Consider simplifying this complex logical expression.
Open

                            if((posAngle> Math.PI && posAngle<2*Math.PI) || (posAngle< 0 && posAngle>-Math.PI) || (posAngle< -2*Math.PI && posAngle>-3*Math.PI))ctx.textBaseline = "top";
                            else ctx.textBaseline = "bottom";
Severity: Major
Found in app/assets/javascripts/ChartNew.js - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

                                if((posAngle> Math.PI && posAngle<2*Math.PI) || (posAngle< 0 && posAngle>-Math.PI) || (posAngle< -2*Math.PI && posAngle>-3*Math.PI))ctx.textBaseline = "bottom";
                                else ctx.textBaseline = "top";
    Severity: Major
    Found in app/assets/javascripts/ChartNew.js - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

          if (@project.is_model && can?(:manage_estimation_models, Project)) || (!@project.is_model && (can?(:edit_project, @project) || can_alter_estimation?(@project))) # Have the write access to project
      
            @product_name = params[:project][:product_name]
            project_root = @project.root_component
            project_root_name = "#{@product_name.blank? ? @project.title : @product_name}"
      Severity: Major
      Found in app/controllers/projects_controller.rb - About 40 mins to fix

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

                            if (typeof (data[i].title) == "string") lgtxt = data[i].title.trim();
                            else lgtxt = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                                if (typeof (data.labels[j]) == "string") lgtxt2 = data.labels[j].trim();
                                else lgtxt2 = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                                    if (typeof (data.labels[j]) == "string") lgtxt2 = data.labels[j].trim();
                                    else lgtxt2 = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                                if (typeof (data.labels[j]) == "string") lgtxt2 = data.labels[j].trim();
                                else lgtxt2 = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                                if (typeof (data.labels[j]) == "string") lgtxt2 = data.labels[j].trim();
                                else lgtxt2 = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                                    if (typeof (data.labels[j]) == "string") lgtxt2 = data.labels[j].trim();
                                    else lgtxt2 = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                                    if (typeof (data.labels[j]) == "string") lgtxt2 = data.labels[j].trim();
                                    else lgtxt2 = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

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

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

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

        Refactorings

        Further Reading

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

            var root = {
              'id': prefix + '$root',
              'name': '',
              'data': {
                '$type': 'none',
        Severity: Minor
        Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 40 mins to fix
        app/assets/javascripts/jit-2.0.1.js on lines 10397..10406
        app/assets/javascripts/jit-2.0.1.js on lines 11345..11354

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

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

                          if (typeof (data[i].title) == "string") lgtxt = data[i].title.trim();
                          else lgtxt = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                                if (typeof (data.labels[j]) == "string") lgtxt2 = data.labels[j].trim();
                                else lgtxt2 = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                          if (typeof (data[i].title) == "string") lgtxt = data[i].title.trim();
                          else lgtxt = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                            if (typeof (data[i].title) == "string") lgtxt = data[i].title.trim();
                            else lgtxt = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                            if (typeof (data[i].title) == "string") lgtxt = data[i].title.trim();
                            else lgtxt = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                                if (typeof (data.labels[j]) == "string") lgtxt2 = data.labels[j].trim();
                                else lgtxt2 = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

                                if (typeof (data.labels[j]) == "string") lgtxt2 = data.labels[j].trim();
                                else lgtxt2 = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2671..2672
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330

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

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

                                if (typeof (data.labels[j]) == "string") lgtxt2 = data.labels[j].trim();
                                else lgtxt2 = "";
        Severity: Major
        Found in app/assets/javascripts/ChartNew.js and 16 other locations - About 40 mins to fix
        app/assets/javascripts/ChartNew.js on lines 1411..1412
        app/assets/javascripts/ChartNew.js on lines 1587..1588
        app/assets/javascripts/ChartNew.js on lines 1899..1900
        app/assets/javascripts/ChartNew.js on lines 1994..1995
        app/assets/javascripts/ChartNew.js on lines 2098..2099
        app/assets/javascripts/ChartNew.js on lines 2193..2194
        app/assets/javascripts/ChartNew.js on lines 2341..2342
        app/assets/javascripts/ChartNew.js on lines 2623..2624
        app/assets/javascripts/ChartNew.js on lines 2645..2646
        app/assets/javascripts/ChartNew.js on lines 2706..2707
        app/assets/javascripts/ChartNew.js on lines 2975..2976
        app/assets/javascripts/ChartNew.js on lines 2998..2999
        app/assets/javascripts/ChartNew.js on lines 3022..3023
        app/assets/javascripts/ChartNew.js on lines 3057..3058
        app/assets/javascripts/ChartNew.js on lines 3329..3330
        app/assets/javascripts/ChartNew.js on lines 3605..3606

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

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

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

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

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

        Refactorings

        Further Reading

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

            var root = {
              'id': prefix + '$root',
              'name': '',
              'data': {
                '$type': 'none',
        Severity: Minor
        Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 40 mins to fix
        app/assets/javascripts/jit-2.0.1.js on lines 10397..10406
        app/assets/javascripts/jit-2.0.1.js on lines 12848..12857

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

        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