estimancy/projestimate

View on GitHub

Showing 1,675 of 1,675 total issues

Class ProjectsController has 59 methods (exceeds 20 allowed). Consider refactoring.
Open

class ProjectsController < ApplicationController
  include WbsActivityElementsHelper
  include ModuleProjectsHelper
  include ProjectsHelper
  include PemoduleEstimationMethods
Severity: Major
Found in app/controllers/projects_controller.rb - About 1 day to fix

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

        function tmpl(str, data) {
            // Figure out if we're getting a template, or if we need to
            // load the template - and be sure to cache the result.
            var fn = !/\W/.test(str) ?
              cache[str] = cache[str] ||
    Severity: Major
    Found in app/assets/javascripts/ChartNew.js and 1 other location - About 1 day to fix
    app/assets/javascripts/ChartNew.js on lines 139..167

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

    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

    function tmplbis(str, data) {
        // Figure out if we're getting a template, or if we need to
        // load the template - and be sure to cache the result.
        var fn = !/\W/.test(str) ?
          cachebis[str] = cachebis[str] ||
    Severity: Major
    Found in app/assets/javascripts/ChartNew.js and 1 other location - About 1 day to fix
    app/assets/javascripts/ChartNew.js on lines 4007..4035

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

    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

    Method create_organization_from_image has 206 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      def create_organization_from_image
        authorize! :manage, Organization
    
        case params[:action_name]
          #Duplicate organization
    Severity: Major
    Found in app/controllers/organizations_controller.rb - About 1 day to fix

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

                      $rows.each(function() {
                          $row = $(this);
                          if (this.style.display !== 'none') {
                              // remove all columns class names
                              $cells = $row.children().removeClass(remove);
      Severity: Major
      Found in app/assets/javascripts/tablesorter.min.js and 1 other location - About 1 day to fix
      app/assets/javascripts/pager.js on lines 1958..1975

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

      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

                      $tr.each(function(){
                          $t = $(this);
                          if (this.style.display !== 'none'){
                              // remove all columns class names
                              $td = $t.children().removeClass(rmv);
      Severity: Major
      Found in app/assets/javascripts/pager.js and 1 other location - About 1 day to fix
      app/assets/javascripts/tablesorter.min.js on lines 302..319

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

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

              if (!config.scaleOverride) {
                  calculatedScale = calculateScale(config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
                  msr = setMeasures(data, config, ctx, height, width, calculatedScale.labels, true, false, false, false);
              }
              else {
      Severity: Major
      Found in app/assets/javascripts/ChartNew.js and 4 other locations - About 1 day to fix
      app/assets/javascripts/ChartNew.js on lines 1515..1530
      app/assets/javascripts/ChartNew.js on lines 2242..2256
      app/assets/javascripts/ChartNew.js on lines 3257..3271
      app/assets/javascripts/ChartNew.js on lines 3534..3548

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

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

              if (!config.scaleOverride) {
                  calculatedScale = calculateScale(config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
                  msr = setMeasures(data, config, ctx, height, width, calculatedScale.labels, true, true, true, true);
              }
              else {
      Severity: Major
      Found in app/assets/javascripts/ChartNew.js and 4 other locations - About 1 day to fix
      app/assets/javascripts/ChartNew.js on lines 1346..1360
      app/assets/javascripts/ChartNew.js on lines 1515..1530
      app/assets/javascripts/ChartNew.js on lines 2242..2256
      app/assets/javascripts/ChartNew.js on lines 3257..3271

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

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

              if (!config.scaleOverride) {
      
                  calculatedScale = calculateScale(config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
                  msr = setMeasures(data, config, ctx, height, width, calculatedScale.labels, true, false, false, true);
              }
      Severity: Major
      Found in app/assets/javascripts/ChartNew.js and 4 other locations - About 1 day to fix
      app/assets/javascripts/ChartNew.js on lines 1346..1360
      app/assets/javascripts/ChartNew.js on lines 2242..2256
      app/assets/javascripts/ChartNew.js on lines 3257..3271
      app/assets/javascripts/ChartNew.js on lines 3534..3548

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

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

              if (!config.scaleOverride) {
                  calculatedScale = calculateScale(config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
                  msr = setMeasures(data, config, ctx, height, width, calculatedScale.labels, false, false, true, true);
              }
              else {
      Severity: Major
      Found in app/assets/javascripts/ChartNew.js and 4 other locations - About 1 day to fix
      app/assets/javascripts/ChartNew.js on lines 1346..1360
      app/assets/javascripts/ChartNew.js on lines 1515..1530
      app/assets/javascripts/ChartNew.js on lines 3257..3271
      app/assets/javascripts/ChartNew.js on lines 3534..3548

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

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

              if (!config.scaleOverride) {
                  calculatedScale = calculateScale(config, valueBounds.maxSteps, valueBounds.minSteps, valueBounds.maxValue, valueBounds.minValue, labelTemplateString);
                  msr = setMeasures(data, config, ctx, height, width, calculatedScale.labels, true, false, true, true);
              }
              else {
      Severity: Major
      Found in app/assets/javascripts/ChartNew.js and 4 other locations - About 1 day to fix
      app/assets/javascripts/ChartNew.js on lines 1346..1360
      app/assets/javascripts/ChartNew.js on lines 1515..1530
      app/assets/javascripts/ChartNew.js on lines 2242..2256
      app/assets/javascripts/ChartNew.js on lines 3534..3548

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

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

              findRows: function(table, filters, combinedFilters) {
                  if (table.config.lastCombinedFilter === combinedFilters || !table.config.widgetOptions.filter_initialized) { return; }
                  var len, $rows, rowIndex, tbodyIndex, $tbody, $cells, $cell, columnIndex,
                      childRow, lastSearch, hasSelect, matches, result, showRow, time, val, indx,
                      notFiltered, searchFiltered, filterMatched, excludeMatch, fxn, ffxn,
      Severity: Major
      Found in app/assets/javascripts/tablesorter.min.js - About 1 day to fix

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

          initialize: function(opt) {
            this.controller = this.config = 
              $.merge(Options("Canvas", "Margin", "Label", "BarChart"), {
                Label: { type: 'Native' }
              }, opt);
        Severity: Major
        Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 7 hrs to fix
        app/assets/javascripts/jit-2.0.1.js on lines 10178..10192

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

        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

          initialize: function(opt) {
            this.controller = this.config = 
              $.merge(Options("Canvas", "Margin", "Label", "AreaChart"), {
                Label: { type: 'Native' }
              }, opt);
        Severity: Major
        Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 7 hrs to fix
        app/assets/javascripts/jit-2.0.1.js on lines 11117..11131

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

        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

        Method show_element_name has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
        Open

          def show_element_name(element)
            if element.attributes.has_key? 'record_status_id'
              if element.is_root?
                "<span class='#{h element.record_status.to_s }'>#{h element.name} </span>"
              else
        Severity: Minor
        Found in app/helpers/wbs_activity_elements_helper.rb - About 7 hrs to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

          select: function(id, name) {
            if(!this.config.hoveredColor) return;
            var s = this.selected;
            if(s.id != id || s.name != name) {
              s.id = id;
        Severity: Major
        Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 7 hrs to fix
        app/assets/javascripts/jit-2.0.1.js on lines 12927..12943

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

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

          select: function(id, name) {
            if(!this.config.hoveredColor) return;
            var s = this.selected;
            if(s.id != id || s.name != name) {
              s.id = id;
        Severity: Major
        Found in app/assets/javascripts/jit-2.0.1.js and 1 other location - About 7 hrs to fix
        app/assets/javascripts/jit-2.0.1.js on lines 11449..11465

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

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

                function drawPicker(x, y) {
                    if(!jscolor.picker) {
                        jscolor.picker = {
                            box : document.createElement('div'),
                            boxB : document.createElement('div'),
        Severity: Major
        Found in app/assets/javascripts/jscolor.js - About 7 hrs to fix

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

                      if (config.yAxisRight) {
                          ctx.save();
                          ctx.beginPath();
                          ctx.font = config.yAxisFontStyle + " " + config.yAxisFontSize + "px " + config.yAxisFontFamily;
                          ctx.fillStyle = config.yAxisFontColor;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 1 other location - About 7 hrs to fix
          app/assets/javascripts/ChartNew.js on lines 4465..4477

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

          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

                      if (config.yAxisLeft) {
                          ctx.save();
                          ctx.beginPath();
                          ctx.font = config.yAxisFontStyle + " " + config.yAxisFontSize + "px " + config.yAxisFontFamily;
                          ctx.fillStyle = config.yAxisFontColor;
          Severity: Major
          Found in app/assets/javascripts/ChartNew.js and 1 other location - About 7 hrs to fix
          app/assets/javascripts/ChartNew.js on lines 4478..4490

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

          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