estimancy/projestimate

View on GitHub

Showing 1,675 of 1,675 total issues

Method is_validate has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  def is_validate(val)
    #deserialize options to do something like that : ['integer', '>=', 50]
    array = pe_attribute.options.compact.reject { |s| s.nil? or s.empty? or s.blank? }

    #test attribute type and check validity (numeric = float and integer)
Severity: Minor
Found in app/models/attribute_module.rb - About 1 hr to fix

    Method save_values has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def save_values
        authorize! :manage_modules_instances, ModuleProject
        #set ratio values
        ratio_values = params[:ratio_values]
        ratio_values.each do |key, value|
    Severity: Minor
    Found in app/controllers/wbs_activity_ratio_elements_controller.rb - About 1 hr to fix

      Method add_wbs_activity_to_project has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        def add_wbs_activity_to_project
          @project = Project.find(params[:project_id])
      
          @pe_wbs_project_activity = @project.pe_wbs_projects.activities_wbs.first
          @wbs_project_elements_root = @project.wbs_project_element_root
      Severity: Minor
      Found in app/controllers/projects_controller.rb - About 1 hr to fix

        Function _updateAnchorList has 12 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                var _updateAnchorList = function(lists, theta, order, conn, aBoolean, otherElId, idx, reverse, edgeId, elId, connsToPaint, endpointsToPaint) {        
        Severity: Major
        Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js - About 1 hr to fix

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

                    case "Radar":
                       new Chart(document.getElementById(dynamicDisplayList[i]).getContext("2d")).Radar(dynamicDisplay[dynamicDisplayList[i]][3],dynamicDisplay[dynamicDisplayList[i]][4]);
                       break;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 8 other locations - About 1 hr to fix
          app/assets/javascripts/ChartNew.js on lines 357..359
          app/assets/javascripts/ChartNew.js on lines 360..362
          app/assets/javascripts/ChartNew.js on lines 363..365
          app/assets/javascripts/ChartNew.js on lines 369..371
          app/assets/javascripts/ChartNew.js on lines 372..374
          app/assets/javascripts/ChartNew.js on lines 375..377
          app/assets/javascripts/ChartNew.js on lines 378..380
          app/assets/javascripts/ChartNew.js on lines 381..383

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

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

                    case "HorizontalBar":
                       new Chart(document.getElementById(dynamicDisplayList[i]).getContext("2d")).HorizontalBar(dynamicDisplay[dynamicDisplayList[i]][3],dynamicDisplay[dynamicDisplayList[i]][4]);
                       break;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 8 other locations - About 1 hr to fix
          app/assets/javascripts/ChartNew.js on lines 357..359
          app/assets/javascripts/ChartNew.js on lines 360..362
          app/assets/javascripts/ChartNew.js on lines 363..365
          app/assets/javascripts/ChartNew.js on lines 366..368
          app/assets/javascripts/ChartNew.js on lines 369..371
          app/assets/javascripts/ChartNew.js on lines 375..377
          app/assets/javascripts/ChartNew.js on lines 378..380
          app/assets/javascripts/ChartNew.js on lines 381..383

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

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

                    case "HorizontalStackedBar":
                       new Chart(document.getElementById(dynamicDisplayList[i]).getContext("2d")).HorizontalStackedBar(dynamicDisplay[dynamicDisplayList[i]][3],dynamicDisplay[dynamicDisplayList[i]][4]);
                       break;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 8 other locations - About 1 hr to fix
          app/assets/javascripts/ChartNew.js on lines 357..359
          app/assets/javascripts/ChartNew.js on lines 360..362
          app/assets/javascripts/ChartNew.js on lines 363..365
          app/assets/javascripts/ChartNew.js on lines 366..368
          app/assets/javascripts/ChartNew.js on lines 369..371
          app/assets/javascripts/ChartNew.js on lines 372..374
          app/assets/javascripts/ChartNew.js on lines 375..377
          app/assets/javascripts/ChartNew.js on lines 381..383

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

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

                    case "PolarArea":
                       new Chart(document.getElementById(dynamicDisplayList[i]).getContext("2d")).PolarArea(dynamicDisplay[dynamicDisplayList[i]][3],dynamicDisplay[dynamicDisplayList[i]][4]);
                       break;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 8 other locations - About 1 hr to fix
          app/assets/javascripts/ChartNew.js on lines 357..359
          app/assets/javascripts/ChartNew.js on lines 360..362
          app/assets/javascripts/ChartNew.js on lines 363..365
          app/assets/javascripts/ChartNew.js on lines 366..368
          app/assets/javascripts/ChartNew.js on lines 372..374
          app/assets/javascripts/ChartNew.js on lines 375..377
          app/assets/javascripts/ChartNew.js on lines 378..380
          app/assets/javascripts/ChartNew.js on lines 381..383

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

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

                    case "StackedBar":
                       new Chart(document.getElementById(dynamicDisplayList[i]).getContext("2d")).StackedBar(dynamicDisplay[dynamicDisplayList[i]][3],dynamicDisplay[dynamicDisplayList[i]][4]);
                       break;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 8 other locations - About 1 hr to fix
          app/assets/javascripts/ChartNew.js on lines 357..359
          app/assets/javascripts/ChartNew.js on lines 360..362
          app/assets/javascripts/ChartNew.js on lines 363..365
          app/assets/javascripts/ChartNew.js on lines 366..368
          app/assets/javascripts/ChartNew.js on lines 369..371
          app/assets/javascripts/ChartNew.js on lines 372..374
          app/assets/javascripts/ChartNew.js on lines 378..380
          app/assets/javascripts/ChartNew.js on lines 381..383

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

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

                    case "Line":
                       new Chart(document.getElementById(dynamicDisplayList[i]).getContext("2d")).Line(dynamicDisplay[dynamicDisplayList[i]][3],dynamicDisplay[dynamicDisplayList[i]][4]);
                       break;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 8 other locations - About 1 hr to fix
          app/assets/javascripts/ChartNew.js on lines 357..359
          app/assets/javascripts/ChartNew.js on lines 360..362
          app/assets/javascripts/ChartNew.js on lines 363..365
          app/assets/javascripts/ChartNew.js on lines 366..368
          app/assets/javascripts/ChartNew.js on lines 369..371
          app/assets/javascripts/ChartNew.js on lines 372..374
          app/assets/javascripts/ChartNew.js on lines 375..377
          app/assets/javascripts/ChartNew.js on lines 378..380

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

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

                    case "Bar":
                       new Chart(document.getElementById(dynamicDisplayList[i]).getContext("2d")).Bar(dynamicDisplay[dynamicDisplayList[i]][3],dynamicDisplay[dynamicDisplayList[i]][4]);
                       break;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 8 other locations - About 1 hr to fix
          app/assets/javascripts/ChartNew.js on lines 360..362
          app/assets/javascripts/ChartNew.js on lines 363..365
          app/assets/javascripts/ChartNew.js on lines 366..368
          app/assets/javascripts/ChartNew.js on lines 369..371
          app/assets/javascripts/ChartNew.js on lines 372..374
          app/assets/javascripts/ChartNew.js on lines 375..377
          app/assets/javascripts/ChartNew.js on lines 378..380
          app/assets/javascripts/ChartNew.js on lines 381..383

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

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

                    case "Pie":
                       new Chart(document.getElementById(dynamicDisplayList[i]).getContext("2d")).Pie(dynamicDisplay[dynamicDisplayList[i]][3],dynamicDisplay[dynamicDisplayList[i]][4]);
                       break;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 8 other locations - About 1 hr to fix
          app/assets/javascripts/ChartNew.js on lines 357..359
          app/assets/javascripts/ChartNew.js on lines 363..365
          app/assets/javascripts/ChartNew.js on lines 366..368
          app/assets/javascripts/ChartNew.js on lines 369..371
          app/assets/javascripts/ChartNew.js on lines 372..374
          app/assets/javascripts/ChartNew.js on lines 375..377
          app/assets/javascripts/ChartNew.js on lines 378..380
          app/assets/javascripts/ChartNew.js on lines 381..383

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

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

                    case "Doughnut":
                       new Chart(document.getElementById(dynamicDisplayList[i]).getContext("2d")).Doughnut(dynamicDisplay[dynamicDisplayList[i]][3],dynamicDisplay[dynamicDisplayList[i]][4]);
                       break;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 8 other locations - About 1 hr to fix
          app/assets/javascripts/ChartNew.js on lines 357..359
          app/assets/javascripts/ChartNew.js on lines 360..362
          app/assets/javascripts/ChartNew.js on lines 366..368
          app/assets/javascripts/ChartNew.js on lines 369..371
          app/assets/javascripts/ChartNew.js on lines 372..374
          app/assets/javascripts/ChartNew.js on lines 375..377
          app/assets/javascripts/ChartNew.js on lines 378..380
          app/assets/javascripts/ChartNew.js on lines 381..383

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

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

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

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

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

          Refactorings

          Further Reading

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

                      var color = $.rgbToHex($.map($.hexToRgb(colorArray[i % colorLength].slice(1)), 
                          function(v) { return (v * 0.5) >> 0; }));
          Severity: Major
          Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
          app/assets/javascripts/jit-2.0.1.js on lines 10071..10072
          app/assets/javascripts/jit-2.0.1.js on lines 10836..10837

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

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

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

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

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

          Refactorings

          Further Reading

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

                      var color = $.rgbToHex($.map($.hexToRgb(colorArray[i % colorLength].slice(1)), 
                          function(v) { return (v * 0.85) >> 0; }));
          Severity: Major
          Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
          app/assets/javascripts/jit-2.0.1.js on lines 10836..10837
          app/assets/javascripts/jit-2.0.1.js on lines 10986..10987

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

          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

                                  return "m" + _conv(d.x1) + "," + _conv(d.y1) + " l" + _conv(d.x2) + "," + _conv(d.y2) + " e";
          Severity: Major
          Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 8477..8478

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

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

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

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

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

          Refactorings

          Further Reading

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

                      var color = $.rgbToHex($.map($.hexToRgb(colorArray[i % colorLength].slice(1)), 
                          function(v) { return (v * 0.5) >> 0; }));
          Severity: Major
          Found in app/assets/javascripts/jit-2.0.1.js and 2 other locations - About 1 hr to fix
          app/assets/javascripts/jit-2.0.1.js on lines 10071..10072
          app/assets/javascripts/jit-2.0.1.js on lines 10986..10987

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

          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

                                  return "m" + _conv(d.x1) + "," + _conv(d.y1) + 
                                         " c" + _conv(d.cp1x) + "," + _conv(d.cp1y) + "," + _conv(d.cp2x) + "," + _conv(d.cp2y) + "," + _conv(d.x2) + "," + _conv(d.y2) + " e";
          Severity: Major
          Found in app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js and 1 other location - About 1 hr to fix
          app/assets/javascripts/jquery.jsPlumb-1.4.1-all.js on lines 8473..8473

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

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

                onCreateLabel: function(domElement, node) {
                  var labelConf = config.Label,
                      valueArray = node.getData('valueArray'),
                      acumLeft = $.reduce(valueArray, function(x, y) { return x + y[0]; }, 0),
                      acumRight = $.reduce(valueArray, function(x, y) { return x + y[1]; }, 0);
          Severity: Minor
          Found in app/assets/javascripts/jit-2.0.1.js - About 1 hr to fix

            Function buildSelect has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    buildSelect: function(table, column, arry, updating, onlyAvail) {
                        table = $(table)[0];
                        column = parseInt(column, 10);
                        if (!table.config.cache || $.isEmptyObject(table.config.cache)) { return; }
                        var indx, val, txt, t, $filters, $filter,
            Severity: Minor
            Found in app/assets/javascripts/tablesorter.min.js - About 1 hr to fix
              Severity
              Category
              Status
              Source
              Language