hybridgroup/node-bebop

View on GitHub

Showing 131 of 131 total issues

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

Network.prototype.wifiAuthChannel = function() {

  var buffer = commandToBuffer(1, "Network", "WifiAuthChannel");

  this.self._writePacket(this.self._networkFrameGenerator(buffer));
Severity: Major
Found in lib/Network.js and 18 other locations - About 1 hr to fix
lib/Animations.js on lines 27..33
lib/Common.js on lines 11..17
lib/Common.js on lines 35..41
lib/FlightPlanEvent.js on lines 11..17
lib/FlightPlanEvent.js on lines 19..25
lib/GPSSettings.js on lines 19..25
lib/Mavlink.js on lines 19..24
lib/Mavlink.js on lines 26..31
lib/MediaRecord.js on lines 27..33
lib/Network.js on lines 11..17
lib/OverHeat.js on lines 11..17
lib/OverHeat.js on lines 19..25
lib/Piloting.js on lines 11..17
lib/Piloting.js on lines 19..25
lib/Piloting.js on lines 37..43
lib/Piloting.js on lines 45..51
lib/Settings.js on lines 11..17
lib/Settings.js on lines 19..25

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

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

Piloting.prototype.landing = function() {

  var buffer = commandToBuffer(1, "Piloting", "Landing");

  this.self._writePacket(this.self._networkFrameGenerator(buffer));
Severity: Major
Found in lib/Piloting.js and 18 other locations - About 1 hr to fix
lib/Animations.js on lines 27..33
lib/Common.js on lines 11..17
lib/Common.js on lines 35..41
lib/FlightPlanEvent.js on lines 11..17
lib/FlightPlanEvent.js on lines 19..25
lib/GPSSettings.js on lines 19..25
lib/Mavlink.js on lines 19..24
lib/Mavlink.js on lines 26..31
lib/MediaRecord.js on lines 27..33
lib/Network.js on lines 11..17
lib/Network.js on lines 19..25
lib/OverHeat.js on lines 11..17
lib/OverHeat.js on lines 19..25
lib/Piloting.js on lines 11..17
lib/Piloting.js on lines 19..25
lib/Piloting.js on lines 45..51
lib/Settings.js on lines 11..17
lib/Settings.js on lines 19..25

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

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

Piloting.prototype.emergency = function() {

  var buffer = commandToBuffer(1, "Piloting", "Emergency");

  this.self._writePacket(this.self._networkFrameGenerator(buffer));
Severity: Major
Found in lib/Piloting.js and 18 other locations - About 1 hr to fix
lib/Animations.js on lines 27..33
lib/Common.js on lines 11..17
lib/Common.js on lines 35..41
lib/FlightPlanEvent.js on lines 11..17
lib/FlightPlanEvent.js on lines 19..25
lib/GPSSettings.js on lines 19..25
lib/Mavlink.js on lines 19..24
lib/Mavlink.js on lines 26..31
lib/MediaRecord.js on lines 27..33
lib/Network.js on lines 11..17
lib/Network.js on lines 19..25
lib/OverHeat.js on lines 11..17
lib/OverHeat.js on lines 19..25
lib/Piloting.js on lines 11..17
lib/Piloting.js on lines 19..25
lib/Piloting.js on lines 37..43
lib/Settings.js on lines 11..17
lib/Settings.js on lines 19..25

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

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

FlightPlanEvent.prototype.speedBridleEvent = function() {

  var buffer = commandToBuffer(0, "FlightPlanEvent", "SpeedBridleEvent");

  this.self._writePacket(this.self._networkFrameGenerator(buffer));
Severity: Major
Found in lib/FlightPlanEvent.js and 18 other locations - About 1 hr to fix
lib/Animations.js on lines 27..33
lib/Common.js on lines 11..17
lib/Common.js on lines 35..41
lib/FlightPlanEvent.js on lines 11..17
lib/GPSSettings.js on lines 19..25
lib/Mavlink.js on lines 19..24
lib/Mavlink.js on lines 26..31
lib/MediaRecord.js on lines 27..33
lib/Network.js on lines 11..17
lib/Network.js on lines 19..25
lib/OverHeat.js on lines 11..17
lib/OverHeat.js on lines 19..25
lib/Piloting.js on lines 11..17
lib/Piloting.js on lines 19..25
lib/Piloting.js on lines 37..43
lib/Piloting.js on lines 45..51
lib/Settings.js on lines 11..17
lib/Settings.js on lines 19..25

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

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

Network.prototype.disconnect = function() {

  var buffer = commandToBuffer(0, "Network", "Disconnect");

  this.self._writePacket(this.self._networkFrameGenerator(buffer));
Severity: Major
Found in lib/Network.js and 18 other locations - About 1 hr to fix
lib/Animations.js on lines 27..33
lib/Common.js on lines 11..17
lib/Common.js on lines 35..41
lib/FlightPlanEvent.js on lines 11..17
lib/FlightPlanEvent.js on lines 19..25
lib/GPSSettings.js on lines 19..25
lib/Mavlink.js on lines 19..24
lib/Mavlink.js on lines 26..31
lib/MediaRecord.js on lines 27..33
lib/Network.js on lines 19..25
lib/OverHeat.js on lines 11..17
lib/OverHeat.js on lines 19..25
lib/Piloting.js on lines 11..17
lib/Piloting.js on lines 19..25
lib/Piloting.js on lines 37..43
lib/Piloting.js on lines 45..51
lib/Settings.js on lines 11..17
lib/Settings.js on lines 19..25

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

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

Settings.prototype.allSettings = function() {

  var buffer = commandToBuffer(0, "Settings", "AllSettings");

  this.self._writePacket(this.self._networkFrameGenerator(buffer));
Severity: Major
Found in lib/Settings.js and 18 other locations - About 1 hr to fix
lib/Animations.js on lines 27..33
lib/Common.js on lines 11..17
lib/Common.js on lines 35..41
lib/FlightPlanEvent.js on lines 11..17
lib/FlightPlanEvent.js on lines 19..25
lib/GPSSettings.js on lines 19..25
lib/Mavlink.js on lines 19..24
lib/Mavlink.js on lines 26..31
lib/MediaRecord.js on lines 27..33
lib/Network.js on lines 11..17
lib/Network.js on lines 19..25
lib/OverHeat.js on lines 11..17
lib/OverHeat.js on lines 19..25
lib/Piloting.js on lines 11..17
lib/Piloting.js on lines 19..25
lib/Piloting.js on lines 37..43
lib/Piloting.js on lines 45..51
lib/Settings.js on lines 19..25

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

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

Animations.prototype.stopAllAnimations = function() {

  var buffer = commandToBuffer(0, "Animations", "StopAllAnimations");

  this.self._writePacket(this.self._networkFrameGenerator(buffer));
Severity: Major
Found in lib/Animations.js and 18 other locations - About 1 hr to fix
lib/Common.js on lines 11..17
lib/Common.js on lines 35..41
lib/FlightPlanEvent.js on lines 11..17
lib/FlightPlanEvent.js on lines 19..25
lib/GPSSettings.js on lines 19..25
lib/Mavlink.js on lines 19..24
lib/Mavlink.js on lines 26..31
lib/MediaRecord.js on lines 27..33
lib/Network.js on lines 11..17
lib/Network.js on lines 19..25
lib/OverHeat.js on lines 11..17
lib/OverHeat.js on lines 19..25
lib/Piloting.js on lines 11..17
lib/Piloting.js on lines 19..25
lib/Piloting.js on lines 37..43
lib/Piloting.js on lines 45..51
lib/Settings.js on lines 11..17
lib/Settings.js on lines 19..25

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

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

GPSSettings.prototype.resetHome = function() {

  var buffer = commandToBuffer(1, "GPSSettings", "ResetHome");

  this.self._writePacket(this.self._networkFrameGenerator(buffer));
Severity: Major
Found in lib/GPSSettings.js and 18 other locations - About 1 hr to fix
lib/Animations.js on lines 27..33
lib/Common.js on lines 11..17
lib/Common.js on lines 35..41
lib/FlightPlanEvent.js on lines 11..17
lib/FlightPlanEvent.js on lines 19..25
lib/Mavlink.js on lines 19..24
lib/Mavlink.js on lines 26..31
lib/MediaRecord.js on lines 27..33
lib/Network.js on lines 11..17
lib/Network.js on lines 19..25
lib/OverHeat.js on lines 11..17
lib/OverHeat.js on lines 19..25
lib/Piloting.js on lines 11..17
lib/Piloting.js on lines 19..25
lib/Piloting.js on lines 37..43
lib/Piloting.js on lines 45..51
lib/Settings.js on lines 11..17
lib/Settings.js on lines 19..25

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

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

FlightPlanEvent.prototype.startingErrorEvent = function() {

  var buffer = commandToBuffer(0, "FlightPlanEvent", "StartingErrorEvent");

  this.self._writePacket(this.self._networkFrameGenerator(buffer));
Severity: Major
Found in lib/FlightPlanEvent.js and 18 other locations - About 1 hr to fix
lib/Animations.js on lines 27..33
lib/Common.js on lines 11..17
lib/Common.js on lines 35..41
lib/FlightPlanEvent.js on lines 19..25
lib/GPSSettings.js on lines 19..25
lib/Mavlink.js on lines 19..24
lib/Mavlink.js on lines 26..31
lib/MediaRecord.js on lines 27..33
lib/Network.js on lines 11..17
lib/Network.js on lines 19..25
lib/OverHeat.js on lines 11..17
lib/OverHeat.js on lines 19..25
lib/Piloting.js on lines 11..17
lib/Piloting.js on lines 19..25
lib/Piloting.js on lines 37..43
lib/Piloting.js on lines 45..51
lib/Settings.js on lines 11..17
lib/Settings.js on lines 19..25

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

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

OverHeat.prototype.ventilate = function() {

  var buffer = commandToBuffer(0, "OverHeat", "Ventilate");

  this.self._writePacket(this.self._networkFrameGenerator(buffer));
Severity: Major
Found in lib/OverHeat.js and 18 other locations - About 1 hr to fix
lib/Animations.js on lines 27..33
lib/Common.js on lines 11..17
lib/Common.js on lines 35..41
lib/FlightPlanEvent.js on lines 11..17
lib/FlightPlanEvent.js on lines 19..25
lib/GPSSettings.js on lines 19..25
lib/Mavlink.js on lines 19..24
lib/Mavlink.js on lines 26..31
lib/MediaRecord.js on lines 27..33
lib/Network.js on lines 11..17
lib/Network.js on lines 19..25
lib/OverHeat.js on lines 11..17
lib/Piloting.js on lines 11..17
lib/Piloting.js on lines 19..25
lib/Piloting.js on lines 37..43
lib/Piloting.js on lines 45..51
lib/Settings.js on lines 11..17
lib/Settings.js on lines 19..25

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

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

Bebop.prototype.backward = function(val) {
  this._pcmd.pitch = validatePitch(val) * -1;
  this._pcmd.flag = 1;
  return this;
};
Severity: Major
Found in lib/bebop.js and 3 other locations - About 1 hr to fix
lib/bebop.js on lines 422..426
lib/bebop.js on lines 454..458
lib/bebop.js on lines 466..470

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

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

Bebop.prototype.down = function(val) {
  this._pcmd.gaz = validatePitch(val) * -1;
  this._pcmd.flag = 1;
  return this;
};
Severity: Major
Found in lib/bebop.js and 3 other locations - About 1 hr to fix
lib/bebop.js on lines 442..446
lib/bebop.js on lines 454..458
lib/bebop.js on lines 466..470

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

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

Bebop.prototype.left = function(val) {
  this._pcmd.roll = validatePitch(val) * -1;
  this._pcmd.flag = 1;
  return this;
};
Severity: Major
Found in lib/bebop.js and 3 other locations - About 1 hr to fix
lib/bebop.js on lines 422..426
lib/bebop.js on lines 442..446
lib/bebop.js on lines 466..470

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

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

Bebop.prototype.counterClockwise = function(val) {
  this._pcmd.yaw = validatePitch(val) * -1;
  this._pcmd.flag = 1;
  return this;
};
Severity: Major
Found in lib/bebop.js and 3 other locations - About 1 hr to fix
lib/bebop.js on lines 422..426
lib/bebop.js on lines 442..446
lib/bebop.js on lines 454..458

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

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": {
    read: function(buffer, index) {
      return buffer.readFloatLE(index);
    },
    write: function(buffer, data, index) {
Severity: Major
Found in lib/types.js and 1 other location - About 1 hr to fix
lib/types.js on lines 69..78

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

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

  "double": {
    read: function(buffer, index) {
      return buffer.readDoubleLE(index);
    },
    write: function(buffer, data, index) {
Severity: Major
Found in lib/types.js and 1 other location - About 1 hr to fix
lib/types.js on lines 59..68

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

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

  var frame = {
    type: buf.readUInt8(0),
    id: buf.readUInt8(1),
    seq: buf.readUInt8(2),
    size: buf.readUInt32LE(3)
Severity: Major
Found in lib/bebop.js and 1 other location - About 1 hr to fix
lib/bebop.js on lines 125..130

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

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

  var frame = {
    frameNumber: buf.readUInt16LE(0),
    frameFlags: buf.readUInt8(2),
    fragmentNumber: buf.readUInt8(3),
    fragmentsPerFrame: buf.readUInt8(4),
Severity: Major
Found in lib/bebop.js and 1 other location - About 1 hr to fix
lib/bebop.js on lines 89..94

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

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

Bebop.prototype.up = function(val) {
  this._pcmd.gaz = validatePitch(val);
  this._pcmd.flag = 1;
  return this;
};
Severity: Major
Found in lib/bebop.js and 3 other locations - About 1 hr to fix
lib/bebop.js on lines 432..436
lib/bebop.js on lines 448..452
lib/bebop.js on lines 460..464

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

Bebop.prototype.right = function(val) {
  this._pcmd.roll = validatePitch(val);
  this._pcmd.flag = 1;
  return this;
};
Severity: Major
Found in lib/bebop.js and 3 other locations - About 1 hr to fix
lib/bebop.js on lines 416..420
lib/bebop.js on lines 432..436
lib/bebop.js on lines 460..464

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

Severity
Category
Status
Source
Language