hybridgroup/cylon-i2c

View on GitHub

Showing 78 of 78 total issues

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

LCD.prototype.backlightOn = function(callback) {
  this._backlightVal = LCD.BACKLIGHT;
  this._expanderWrite(0);
  if (typeof callback === "function") {
    callback();
Severity: Major
Found in lib/lcd.js and 1 other location - About 1 hr to fix
lib/lcd.js on lines 236..242

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

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

LCD.prototype._sendDisplayCommand = function(callback) {
  this._sendCommand(LCD.DISPLAYCONTROL | this._displaycontrol);
  if (typeof callback === "function") {
    callback();
  }
Severity: Major
Found in lib/lcd.js and 1 other location - About 1 hr to fix
lib/jhd1313m1.js on lines 294..299

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

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

Jhd1313m1.prototype._sendDisplayCommand = function(callback) {
  this._sendCommand(Jhd1313m1.DISPLAYCONTROL | this._displaycontrol);
  if (typeof callback === "function") {
    callback();
  }
Severity: Major
Found in lib/jhd1313m1.js and 1 other location - About 1 hr to fix
lib/lcd.js on lines 331..336

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

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

Bmp180.prototype.getRawPressure = function(mode, callback) {
  var self = this;

  var modeVal = parseInt(mode, 10);

Severity: Minor
Found in lib/bmp180.js - About 1 hr to fix

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

    BlinkM.prototype.playLightScript = function(id, repeats, startAtLine, cb) {
      this.connection.i2cWrite(
        this.address,
        BlinkM.PLAY_LIGHT_SCRIPT,
        [id, repeats, startAtLine],
    Severity: Major
    Found in lib/blinkm.js and 5 other locations - About 1 hr to fix
    lib/blinkm.js on lines 57..59
    lib/blinkm.js on lines 71..76
    lib/blinkm.js on lines 88..93
    lib/blinkm.js on lines 105..107
    lib/blinkm.js on lines 119..121

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

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

    BlinkM.prototype.goToRGB = function(r, g, b, callback) {
      this.connection.i2cWrite(this.address, BlinkM.TO_RGB, [r, g, b], callback);
    };
    Severity: Major
    Found in lib/blinkm.js and 5 other locations - About 1 hr to fix
    lib/blinkm.js on lines 71..76
    lib/blinkm.js on lines 88..93
    lib/blinkm.js on lines 105..107
    lib/blinkm.js on lines 119..121
    lib/blinkm.js on lines 138..145

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

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

    BlinkM.prototype.fadeToRandomHSB = function(h, s, b, cb) {
      this.connection.i2cWrite(this.address, BlinkM.FADE_TO_RND_HSB, [h, s, b], cb);
    };
    Severity: Major
    Found in lib/blinkm.js and 5 other locations - About 1 hr to fix
    lib/blinkm.js on lines 57..59
    lib/blinkm.js on lines 71..76
    lib/blinkm.js on lines 88..93
    lib/blinkm.js on lines 105..107
    lib/blinkm.js on lines 138..145

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

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

    BlinkM.prototype.fadeToHSB = function(h, s, b, callback) {
      this.connection.i2cWrite(this.address,
                               BlinkM.FADE_TO_HSB,
                               [h, s, b],
                               callback);
    Severity: Major
    Found in lib/blinkm.js and 5 other locations - About 1 hr to fix
    lib/blinkm.js on lines 57..59
    lib/blinkm.js on lines 71..76
    lib/blinkm.js on lines 105..107
    lib/blinkm.js on lines 119..121
    lib/blinkm.js on lines 138..145

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

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

    BlinkM.prototype.fadeToRGB = function(r, g, b, callback) {
      this.connection.i2cWrite(this.address,
                               BlinkM.FADE_TO_RGB,
                               [r, g, b],
                               callback);
    Severity: Major
    Found in lib/blinkm.js and 5 other locations - About 1 hr to fix
    lib/blinkm.js on lines 57..59
    lib/blinkm.js on lines 88..93
    lib/blinkm.js on lines 105..107
    lib/blinkm.js on lines 119..121
    lib/blinkm.js on lines 138..145

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

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

    BlinkM.prototype.fadeToRandomRGB = function(r, g, b, cb) {
      this.connection.i2cWrite(this.address, BlinkM.FADE_TO_RND_RGB, [r, g, b], cb);
    };
    Severity: Major
    Found in lib/blinkm.js and 5 other locations - About 1 hr to fix
    lib/blinkm.js on lines 57..59
    lib/blinkm.js on lines 71..76
    lib/blinkm.js on lines 88..93
    lib/blinkm.js on lines 119..121
    lib/blinkm.js on lines 138..145

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

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

    Bmp180.prototype.calculatePressure = function(mode, rawPress, b5) {
      var x1 = 0,
          x2 = 0,
          x3 = 0,
          b3 = 0,
    Severity: Minor
    Found in lib/bmp180.js - About 1 hr to fix

      Function getRawTemp has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      Bmp180.prototype.getRawTemp = function(callback) {
        var self = this;
      
        this.connection.i2cWrite(
          self.address,
      Severity: Minor
      Found in lib/bmp180.js - About 1 hr to fix

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

        BlinkM.prototype.setFadeSpeed = function(speed, cb) {
          this.connection.i2cWrite(this.address, BlinkM.SET_FADE, [speed], cb);
        };
        Severity: Minor
        Found in lib/blinkm.js and 1 other location - About 55 mins to fix
        lib/blinkm.js on lines 180..182

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

        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

        BlinkM.prototype.setTimeAdjust = function(time, cb) {
          this.connection.i2cWrite(this.address, BlinkM.SET_TIME, [time], cb);
        };
        Severity: Minor
        Found in lib/blinkm.js and 1 other location - About 55 mins to fix
        lib/blinkm.js on lines 166..168

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

        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 work has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

          work: function(my) {
            every((1).second(), function() {
              my.accel.getAccel(function(err, data) {
                if (err) { console.error(err); }
                console.log(data);
        Severity: Minor
        Found in examples/lsm303dlhc/lsm303dlhc.js - About 55 mins 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

        Function work has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

          work: function(my) {
            every((1).seconds(), function() {
              my.bmp180.getAltitude(0, null, function(err, data) {
                if (err) { console.error("Error:", err); }
                console.log(data);
        Severity: Minor
        Found in examples/bmp180/bmp180.js - About 55 mins 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

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

        Jhd1313m1.prototype.blinkOff = function(callback) {
          this._displaycontrol &= ~Jhd1313m1.BLINKON;
          this._sendDisplayCommand(callback);
        };
        Severity: Major
        Found in lib/jhd1313m1.js and 5 other locations - About 55 mins to fix
        lib/jhd1313m1.js on lines 157..160
        lib/jhd1313m1.js on lines 182..185
        lib/lcd.js on lines 163..166
        lib/lcd.js on lines 188..191
        lib/lcd.js on lines 212..215

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

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

        Jhd1313m1.prototype.cursorOff = function(callback) {
          this._displaycontrol &= ~Jhd1313m1.CURSORON;
          this._sendDisplayCommand(callback);
        };
        Severity: Major
        Found in lib/jhd1313m1.js and 5 other locations - About 55 mins to fix
        lib/jhd1313m1.js on lines 157..160
        lib/jhd1313m1.js on lines 206..209
        lib/lcd.js on lines 163..166
        lib/lcd.js on lines 188..191
        lib/lcd.js on lines 212..215

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

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

        LCD.prototype.displayOff = function(callback) {
          this._displaycontrol &= ~LCD.DISPLAYON;
          this._sendDisplayCommand(callback);
        };
        Severity: Major
        Found in lib/lcd.js and 5 other locations - About 55 mins to fix
        lib/jhd1313m1.js on lines 157..160
        lib/jhd1313m1.js on lines 182..185
        lib/jhd1313m1.js on lines 206..209
        lib/lcd.js on lines 188..191
        lib/lcd.js on lines 212..215

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

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

        LCD.prototype.cursorOff = function(callback) {
          this._displaycontrol &= ~LCD.CURSORON;
          this._sendDisplayCommand(callback);
        };
        Severity: Major
        Found in lib/lcd.js and 5 other locations - About 55 mins to fix
        lib/jhd1313m1.js on lines 157..160
        lib/jhd1313m1.js on lines 182..185
        lib/jhd1313m1.js on lines 206..209
        lib/lcd.js on lines 163..166
        lib/lcd.js on lines 212..215

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

        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