talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

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

                                        for(var k in permissions){
                                            if(k.match(/folder\[permissions\]\[\d+\]\[user_id\]/) !== null){
                                                var index = k.match(/\d+/)[0];
                                                var p = permissions['folder[permissions][' + index + '][permission]'];
                                                var u = permissions[k];
Severity: Major
Found in app/assets/javascripts/documents/AddEditFolderWindow.js and 1 other location - About 3 hrs to fix
app/assets/javascripts/documents/AddEditFolderWindow.js on lines 219..226

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

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

        this.tracker = new Ext.dd.DragTracker({
            onBeforeStart: this.onBeforeStart.createDelegate(this),
            onStart: this.onStart.createDelegate(this),
            onDrag: this.onDrag.createDelegate(this),
            onEnd: this.onEnd.createDelegate(this),
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/list/ColumnResizer.js and 1 other location - About 3 hrs to fix
app/assets/javascripts/ext/src/widgets/Slider.js on lines 82..89

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

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 complete(){
            // Process result
            if ( s.complete )
                s.complete(xhr, status);

Severity: Major
Found in app/assets/javascripts/jquery.js and 1 other location - About 3 hrs to fix
app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 2762..2774

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

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

        FLOAT: {
            convert: function(v){
                return v !== undefined && v !== null && v !== '' ?
                    parseFloat(String(v).replace(Ext.data.Types.stripRe, ''), 10) : (this.useNull ? null : 0);
            },
Severity: Major
Found in app/assets/javascripts/ext/src/data/Types.js and 1 other location - About 3 hrs to fix
app/assets/javascripts/ext/src/data/Types.js on lines 93..100

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

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

        INT: {
            convert: function(v){
                return v !== undefined && v !== null && v !== '' ?
                    parseInt(String(v).replace(Ext.data.Types.stripRe, ''), 10) : (this.useNull ? null : 0);
            },
Severity: Major
Found in app/assets/javascripts/ext/src/data/Types.js and 1 other location - About 3 hrs to fix
app/assets/javascripts/ext/src/data/Types.js on lines 108..115

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

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

        this.tracker = new Ext.dd.DragTracker({
            onBeforeStart: this.onBeforeDragStart.createDelegate(this),
            onStart      : this.onDragStart.createDelegate(this),
            onDrag       : this.onDrag.createDelegate(this),
            onEnd        : this.onDragEnd.createDelegate(this),
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/Slider.js and 1 other location - About 3 hrs to fix
app/assets/javascripts/ext/src/widgets/list/ColumnResizer.js on lines 31..38

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

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 complete(){
            // Process result
            if ( s.complete )
                s.complete(xml, status);

Severity: Major
Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 3 hrs to fix
app/assets/javascripts/jquery.js on lines 3652..3664

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

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

  def add_notification(xml)
    xml.swn(:notification) do
      provider = message.Behavior.Delivery.Providers.select{|c| c.name == "swn" && c.device == "Fax"}.first
      title = ""
      messagetext = ""
Severity: Major
Found in app/models/service/swn/fax/message.rb and 4 other locations - About 3 hrs to fix
app/models/service/swn/blackberry/message.rb on lines 84..101
app/models/service/swn/email/message.rb on lines 84..101
app/models/service/swn/phone/message.rb on lines 85..102
app/models/service/swn/sms/message.rb on lines 84..101

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

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

  def add_notification(xml)
    xml.swn(:notification) do
      provider = message.Behavior.Delivery.Providers.select{|c| c.name == "swn" && c.device == "Blackberry PIN"}.first
      title = ""
      messagetext = ""
Severity: Major
Found in app/models/service/swn/blackberry/message.rb and 4 other locations - About 3 hrs to fix
app/models/service/swn/email/message.rb on lines 84..101
app/models/service/swn/fax/message.rb on lines 83..100
app/models/service/swn/phone/message.rb on lines 85..102
app/models/service/swn/sms/message.rb on lines 84..101

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

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

  def add_notification(xml)
    xml.swn(:notification) do
      provider = message.Behavior.Delivery.Providers.select{|c| c.name == "swn" && c.device == "Phone"}.first
      title = ""
      messagetext = ""
Severity: Major
Found in app/models/service/swn/phone/message.rb and 4 other locations - About 3 hrs to fix
app/models/service/swn/blackberry/message.rb on lines 84..101
app/models/service/swn/email/message.rb on lines 84..101
app/models/service/swn/fax/message.rb on lines 83..100
app/models/service/swn/sms/message.rb on lines 84..101

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

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

  def add_notification(xml)
    xml.swn(:notification) do
      provider = message.Behavior.Delivery.Providers.select{|c| c.name == "swn" && c.device == "E-mail"}.first
      title = ""
      messagetext = ""
Severity: Major
Found in app/models/service/swn/email/message.rb and 4 other locations - About 3 hrs to fix
app/models/service/swn/blackberry/message.rb on lines 84..101
app/models/service/swn/fax/message.rb on lines 83..100
app/models/service/swn/phone/message.rb on lines 85..102
app/models/service/swn/sms/message.rb on lines 84..101

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

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

  def add_notification(xml)
    xml.swn(:notification) do
      provider = message.Behavior.Delivery.Providers.select{|c| c.name == "swn" && c.device == "SMS"}.first
      title = ""
      messagetext = ""
Severity: Major
Found in app/models/service/swn/sms/message.rb and 4 other locations - About 3 hrs to fix
app/models/service/swn/blackberry/message.rb on lines 84..101
app/models/service/swn/email/message.rb on lines 84..101
app/models/service/swn/fax/message.rb on lines 83..100
app/models/service/swn/phone/message.rb on lines 85..102

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

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

Consider simplifying this complex logical expression.
Open

if ( document.documentElement["getBoundingClientRect"] )
    jQuery.fn.offset = function() {
        if ( !this[0] ) return { top: 0, left: 0 };
        if ( this[0] === this[0].ownerDocument.body ) return jQuery.offset.bodyOffset( this[0] );
        var box  = this[0].getBoundingClientRect(), doc = this[0].ownerDocument, body = doc.body, docElem = doc.documentElement,
Severity: Critical
Found in app/assets/javascripts/jquery.js - About 3 hrs to fix

    BasicForm has 28 functions (exceeds 20 allowed). Consider refactoring.
    Open

    Ext.form.BasicForm = Ext.extend(Ext.util.Observable, {
    
        constructor: function(el, config){
            Ext.apply(this, config);
            if(Ext.isString(this.paramOrder)){
    Severity: Minor
    Found in app/assets/javascripts/ext/src/widgets/form/BasicForm.js - About 3 hrs to fix

      Consider simplifying this complex logical expression.
      Open

                          if ( (type == "" && !!z ||
                               type == "=" && z == m[5] ||
                               type == "!=" && z != m[5] ||
                               type == "^=" && z && !z.indexOf(m[5]) ||
                               type == "$=" && z.substr(z.length - m[5].length) == m[5] ||
      Severity: Critical
      Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 3 hrs to fix

        Function fireEvents has 83 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                fireEvents: function(e, isDrop) {
                    var dc = this.dragCurrent;
        
                    // If the user did the mouse up outside of the window, we could
                    // get here even though we have ended the drag.
        Severity: Major
        Found in app/assets/javascripts/ext/src/dd/DDCore.js - About 3 hrs to fix

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

                  {xtype: 'container', layout: 'hbox', layoutConfig:{pack:'end',defaultMargins:'0 0 0 10'}, items:[
                    {xtype: 'button', text: 'Apply Changes', name: 'save_button', handler: this.save, scope: this, width:'auto'},
                    {xtype: 'button', text: 'Cancel and Discard Changes', handler: this.close, scope: this, width:'auto'}
                  ]}
          Severity: Major
          Found in app/assets/javascripts/profile/ProfileBase.js and 1 other location - About 3 hrs to fix
          app/assets/javascripts/admin/BatchUsers.js on lines 162..166

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

          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

              onscrollBottom : function(){
                  var sw = this.getScrollHeight()-this.getScrollArea(),
                      pos = this.getScrollPos(),
                      s = Math.min(sw, pos + this.getScrollIncrement());
                  if(s != pos){
          app/assets/javascripts/ext/src/widgets/TabPanel.js on lines 1015..1022

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

          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

                  {xtype: 'container', layout: 'hbox', layoutConfig:{pack:'end',defaultMargins:'0 0 0 10'},items:[
                    {xtype: 'button', text: 'Apply Changes', name: 'save_button', handler: this.save, scope: this, width:'auto'},
                    {xtype: 'button', text: 'Cancel and Discard Changes', handler: this.close, scope: this,width:'auto'}
          
                  ]}
          Severity: Major
          Found in app/assets/javascripts/admin/BatchUsers.js and 1 other location - About 3 hrs to fix
          app/assets/javascripts/profile/ProfileBase.js on lines 13..16

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

          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

              onScrollRight : function(){
                  var sw = this.getScrollWidth()-this.getScrollArea(),
                      pos = this.getScrollPos(),
                      s = Math.min(sw, pos + this.getScrollIncrement());
                  if(s != pos){
          Severity: Major
          Found in app/assets/javascripts/ext/src/widgets/TabPanel.js and 1 other location - About 3 hrs to fix
          app/assets/javascripts/ext_extensions/VerticalTabPanel/Ext.ux.tot2ivn.VrTabPanel.js on lines 888..895

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

          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