vegantech/sims

View on GitHub

Showing 433 of 433 total issues

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

describe NewsItemsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "news_items", :action => "index").should == "/news_items"
    end
Severity: Major
Found in pending-spec/routing-pending/news_items_routing_spec.rb and 6 other locations - About 6 hrs to fix
pending-spec/routing-pending/checklists_routing_spec.rb on lines 3..56
pending-spec/routing-pending/custom_flags_routing_spec.rb on lines 3..56
pending-spec/routing-pending/groups_routing_spec.rb on lines 3..56
pending-spec/routing-pending/interventions_routing_spec.rb on lines 3..56
pending-spec/routing-pending/principal_overrides_routing_spec.rb on lines 3..56
pending-spec/routing-pending/quicklist_items_routing_spec.rb on lines 3..56

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

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

describe GroupsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "groups", :action => "index").should == "/groups"
    end
Severity: Major
Found in pending-spec/routing-pending/groups_routing_spec.rb and 6 other locations - About 6 hrs to fix
pending-spec/routing-pending/checklists_routing_spec.rb on lines 3..56
pending-spec/routing-pending/custom_flags_routing_spec.rb on lines 3..56
pending-spec/routing-pending/interventions_routing_spec.rb on lines 3..56
pending-spec/routing-pending/news_items_routing_spec.rb on lines 3..56
pending-spec/routing-pending/principal_overrides_routing_spec.rb on lines 3..56
pending-spec/routing-pending/quicklist_items_routing_spec.rb on lines 3..56

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

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

describe ChecklistsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "checklists", :action => "index").should == "/checklists"
    end
Severity: Major
Found in pending-spec/routing-pending/checklists_routing_spec.rb and 6 other locations - About 6 hrs to fix
pending-spec/routing-pending/custom_flags_routing_spec.rb on lines 3..56
pending-spec/routing-pending/groups_routing_spec.rb on lines 3..56
pending-spec/routing-pending/interventions_routing_spec.rb on lines 3..56
pending-spec/routing-pending/news_items_routing_spec.rb on lines 3..56
pending-spec/routing-pending/principal_overrides_routing_spec.rb on lines 3..56
pending-spec/routing-pending/quicklist_items_routing_spec.rb on lines 3..56

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

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

describe QuicklistItemsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "quicklist_items", :action => "index").should == "/quicklist_items"
    end
pending-spec/routing-pending/checklists_routing_spec.rb on lines 3..56
pending-spec/routing-pending/custom_flags_routing_spec.rb on lines 3..56
pending-spec/routing-pending/groups_routing_spec.rb on lines 3..56
pending-spec/routing-pending/interventions_routing_spec.rb on lines 3..56
pending-spec/routing-pending/news_items_routing_spec.rb on lines 3..56
pending-spec/routing-pending/principal_overrides_routing_spec.rb on lines 3..56

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

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

describe InterventionsController do
  describe "route generation" do
    it "should map #index" do
      route_for(:controller => "interventions", :action => "index").should == "/interventions"
    end
Severity: Major
Found in pending-spec/routing-pending/interventions_routing_spec.rb and 6 other locations - About 6 hrs to fix
pending-spec/routing-pending/checklists_routing_spec.rb on lines 3..56
pending-spec/routing-pending/custom_flags_routing_spec.rb on lines 3..56
pending-spec/routing-pending/groups_routing_spec.rb on lines 3..56
pending-spec/routing-pending/news_items_routing_spec.rb on lines 3..56
pending-spec/routing-pending/principal_overrides_routing_spec.rb on lines 3..56
pending-spec/routing-pending/quicklist_items_routing_spec.rb on lines 3..56

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

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 (v=="above") { this.setTop(refTop-height+this.offsetTop); }
            else if (v=="top") { this.setTop(refTop+this.offsetTop); }
            else if (v=="center") { this.setTop(refTop+(refHeight/2)-(height/2)+this.offsetTop); }
            else if (v=="bottom") { this.setTop(refTop+refHeight-height+this.offsetTop); }
            else if (v=="below") { this.setTop(refTop+refHeight+this.offsetTop); }
Severity: Major
Found in app/assets/javascripts/popup.js and 1 other location - About 5 hrs to fix
app/assets/javascripts/popup.js on lines 1054..1058

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

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 (h=="adjacent-left") { this.setLeft(refLeft-width+this.offsetLeft); }
            else if (h=="left") { this.setLeft(refLeft+this.offsetLeft); }
            else if (h=="center") { this.setLeft(refLeft+(refWidth/2)-(width/2)+this.offsetLeft); }
            else if (h=="right") { this.setLeft(refLeft+refWidth-width+this.offsetLeft); }
            else if (h=="adjacent-right") { this.setLeft(refLeft+refWidth+this.offsetLeft); }
Severity: Major
Found in app/assets/javascripts/popup.js and 1 other location - About 5 hrs to fix
app/assets/javascripts/popup.js on lines 1047..1051

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

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

Class Base has 42 methods (exceeds 20 allowed). Consider refactoring.
Open

  class Base
    attr_reader :messages
    FIELD_DESCRIPTIONS = {}
    def initialize file_name, district
      @district = district
Severity: Minor
Found in lib/csv_importer/base.rb - About 5 hrs to fix

    Class District has 39 methods (exceeds 20 allowed). Consider refactoring.
    Open

    class District < ActiveRecord::Base
    
    #  ActiveSupport::Dependencies.load_missing_constant self, :StudentsController
      SETTINGS = [:key, :previous_key, :custom_interventions ]
      BOOLEAN_SETTINGS = [:restrict_free_lunch, :forgot_password, :lock_tier, :email_on_team_consultation_response, :show_team_consultations_if_pending]
    Severity: Minor
    Found in app/models/district.rb - About 5 hrs to fix

      Function init has 126 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              init: function(tableId) {
                      if (!document.getElementsByTagName || !document.createElement || !document.getElementById) return;
      
                      var tables = tableId && document.getElementById(tableId) ? [document.getElementById(tableId)] : document.getElementsByTagName("table");
                      var c, ii, len, colMatch, showOnly, match, showArrow, columnNumSortObj, obj, workArr, headers, thtext, aclone, multi, colCnt, cel, allRowArr, rowArr, sortableTable, celCount, colspan, rowspan, rowLength;
      Severity: Major
      Found in app/assets/javascripts/tablesort.js - About 5 hrs to fix

        Function create has 125 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                o.create = function() {
                        
                        function createTH(details) {
                                var th = document.createElement('th');
                                if(details.thClassName) th.className = details.thClassName;
        Severity: Major
        Found in app/assets/javascripts/datepicker.js - About 5 hrs to fix

          Function CSS has 123 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          var CSS = (function(){
              var css = {};
          
              // Convert an RGB string in the form "rgb (255, 255, 255)" to "#ffffff"
              css.rgb2hex = function(rgbString) {
          Severity: Major
          Found in app/assets/javascripts/popup.js - About 4 hrs to fix

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

                                            if(inp.className.search(regExp1) != -1) {
                                                    var tmp = inp.className.match(regExp1)[0].replace(/disable-days-/, '');
                                                    options.disableDays = [0,0,0,0,0,0,0];
                                                    for(var j = 0; j < tmp.length; j++) {
                                                            options.disableDays[tmp.charAt(j) - 1] = 1;
            Severity: Major
            Found in app/assets/javascripts/datepicker.js and 1 other location - About 4 hrs to fix
            app/assets/javascripts/datepicker.js on lines 1379..1385

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

            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(inp.className.search(regExp3) != -1) {
                                                    var tmp = inp.className.match(regExp3)[0].replace(/highlight-days-/, '');
                                                    options.highlightDays = [0,0,0,0,0,0,0];
                                                    for(var j = 0; j < tmp.length; j++) {
                                                            options.highlightDays[tmp.charAt(j) - 1] = 1;
            Severity: Major
            Found in app/assets/javascripts/datepicker.js and 1 other location - About 4 hrs to fix
            app/assets/javascripts/datepicker.js on lines 1388..1394

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

            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

            function printForHtml( n ) {
                var htmlstr = n;
                if( htmlstr.length == 1 ) {
                    // do simple case statement if it's just one character
                    switch ( n ) {
            Severity: Major
            Found in app/assets/javascripts/spellerpages/wordWindow.js and 1 other location - About 4 hrs to fix
            public/speller/wordWindow.js on lines 218..240

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

            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

            function printForHtml( n ) {
                var htmlstr = n;
                if( htmlstr.length == 1 ) {
                    // do simple case statement if it's just one character
                    switch ( n ) {
            Severity: Major
            Found in public/speller/wordWindow.js and 1 other location - About 4 hrs to fix
            app/assets/javascripts/spellerpages/wordWindow.js on lines 218..240

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

            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

            function ignoreWord() {
                var wi = this.currentWordIndex;
                var ti = this.currentTextIndex;
                if( !this.wordWin ) {
                    alert( 'Error: Word frame not available.' );
            Severity: Major
            Found in public/speller/spellChecker.js and 1 other location - About 4 hrs to fix
            app/assets/javascripts/spellerpages/spellChecker.js on lines 126..142

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

            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

            function ignoreWord() {
                var wi = this.currentWordIndex;
                var ti = this.currentTextIndex;
                if( !this.wordWin ) {
                    alert( 'Error: Word frame not available.' );
            Severity: Major
            Found in app/assets/javascripts/spellerpages/spellChecker.js and 1 other location - About 4 hrs to fix
            public/speller/spellChecker.js on lines 116..132

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

            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

            function _getSuggestions( text_num, word_num ) {
                this.controlWin.clearSuggestions();
                // add suggestion in list for each suggested word.
                // get the array of suggested words out of the
                // three-dimensional array containing all suggestions.
            Severity: Major
            Found in public/speller/spellChecker.js and 1 other location - About 4 hrs to fix
            app/assets/javascripts/spellerpages/spellChecker.js on lines 403..416

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

            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

            function _getSuggestions( text_num, word_num ) {
                this.controlWin.clearSuggestions();
                // add suggestion in list for each suggested word.
                // get the array of suggested words out of the
                // three-dimensional array containing all suggestions.
            Severity: Major
            Found in app/assets/javascripts/spellerpages/spellChecker.js and 1 other location - About 4 hrs to fix
            public/speller/spellChecker.js on lines 393..406

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

            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