Showing 30 of 48 total issues

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

module Pio
  module OpenFlow13
    # NXAST_STACK_POP action
    class NiciraStackPop < OpenFlow::NiciraAction
      nicira_action_header action_type: 0xffff,
Severity: Major
Found in lib/pio/open_flow13/nicira_stack_pop.rb and 1 other location - About 2 hrs to fix
lib/pio/open_flow13/nicira_stack_push.rb on lines 6..47

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

module Pio
  module OpenFlow13
    # NXAST_STACK_PUSH action
    class NiciraStackPush < OpenFlow::NiciraAction
      nicira_action_header action_type: 0xffff,
Severity: Major
Found in lib/pio/open_flow13/nicira_stack_push.rb and 1 other location - About 2 hrs to fix
lib/pio/open_flow13/nicira_stack_pop.rb on lines 6..47

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

  0x11, 0x22, 0x33, 0x44, 0x55, 0x66, # destination_mac
  0x66, 0x55, 0x44, 0x33, 0x22, 0x11, # source_mac
  0x08, 0x00, # ether_type
  0b0100_0101, # ip_version, ip_header_length
  0x00, # ip_type_of_service
Severity: Major
Found in fixtures/icmp/icmp_request.rb and 1 other location - About 1 hr to fix
fixtures/icmp/icmp_reply.rb on lines 4..22

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

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

  0x11, 0x22, 0x33, 0x44, 0x55, 0x66, # destination_mac
  0x66, 0x55, 0x44, 0x33, 0x22, 0x11, # source_mac
  0x08, 0x00, # ether_type
  0b0100_0101, # ip_version, ip_header_length
  0x00, # ip_type_of_service
Severity: Major
Found in fixtures/icmp/icmp_reply.rb and 1 other location - About 1 hr to fix
fixtures/icmp/icmp_request.rb on lines 4..22

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

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

module Pio
  module OpenFlow13
    # Set ARP operation field
    class SetArpOperation < OpenFlow::Action
      action_header action_type: 25, action_length: 16
Severity: Major
Found in lib/pio/open_flow13/set_arp_operation.rb and 4 other locations - About 1 hr to fix
lib/pio/open_flow13/set_arp_sender_hardware_address.rb on lines 6..22
lib/pio/open_flow13/set_arp_sender_protocol_address.rb on lines 6..22
lib/pio/open_flow13/set_destination_mac_address.rb on lines 6..22
lib/pio/open_flow13/set_source_mac_address.rb on lines 6..22

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

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

module Pio
  module OpenFlow13
    # Set ARP sender hardware address field
    class SetArpSenderHardwareAddress < OpenFlow::Action
      action_header action_type: 25, action_length: 16
Severity: Major
Found in lib/pio/open_flow13/set_arp_sender_hardware_address.rb and 4 other locations - About 1 hr to fix
lib/pio/open_flow13/set_arp_operation.rb on lines 6..22
lib/pio/open_flow13/set_arp_sender_protocol_address.rb on lines 6..22
lib/pio/open_flow13/set_destination_mac_address.rb on lines 6..22
lib/pio/open_flow13/set_source_mac_address.rb on lines 6..22

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

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

module Pio
  module OpenFlow13
    # Set a header field.
    class SetSourceMacAddress < OpenFlow::Action
      action_header action_type: 25, action_length: 16
Severity: Major
Found in lib/pio/open_flow13/set_source_mac_address.rb and 4 other locations - About 1 hr to fix
lib/pio/open_flow13/set_arp_operation.rb on lines 6..22
lib/pio/open_flow13/set_arp_sender_hardware_address.rb on lines 6..22
lib/pio/open_flow13/set_arp_sender_protocol_address.rb on lines 6..22
lib/pio/open_flow13/set_destination_mac_address.rb on lines 6..22

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

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

module Pio
  module OpenFlow13
    # Set a header field.
    class SetDestinationMacAddress < OpenFlow::Action
      action_header action_type: 25, action_length: 16
Severity: Major
Found in lib/pio/open_flow13/set_destination_mac_address.rb and 4 other locations - About 1 hr to fix
lib/pio/open_flow13/set_arp_operation.rb on lines 6..22
lib/pio/open_flow13/set_arp_sender_hardware_address.rb on lines 6..22
lib/pio/open_flow13/set_arp_sender_protocol_address.rb on lines 6..22
lib/pio/open_flow13/set_source_mac_address.rb on lines 6..22

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

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

module Pio
  module OpenFlow13
    # Set ARP sender protocol address field
    class SetArpSenderProtocolAddress < OpenFlow::Action
      action_header action_type: 25, action_length: 16
Severity: Major
Found in lib/pio/open_flow13/set_arp_sender_protocol_address.rb and 4 other locations - About 1 hr to fix
lib/pio/open_flow13/set_arp_operation.rb on lines 6..22
lib/pio/open_flow13/set_arp_sender_hardware_address.rb on lines 6..22
lib/pio/open_flow13/set_destination_mac_address.rb on lines 6..22
lib/pio/open_flow13/set_source_mac_address.rb on lines 6..22

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

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

module Pio
  module OpenFlow10
    # OpenFlow 1.0 Aggregate Stats messages
    module AggregateStats
      # OpenFlow 1.0 Aggregate Stats Request message
Severity: Minor
Found in lib/pio/open_flow10/aggregate_stats/request.rb and 1 other location - About 55 mins to fix
lib/pio/open_flow10/flow_stats/request.rb on lines 7..22

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

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

module Pio
  module OpenFlow10
    # OpenFlow 1.0 FlowStats messages
    module FlowStats
      # OpenFlow 1.0 Flow Stats Request message
Severity: Minor
Found in lib/pio/open_flow10/flow_stats/request.rb and 1 other location - About 55 mins to fix
lib/pio/open_flow10/aggregate_stats/request.rb on lines 8..22

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

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

  0x00, 0x26, 0x82, 0xeb, 0xea, 0xd1, # destination_mac
  0x00, 0x16, 0x9d, 0x1d, 0x9c, 0xc4, # source_mac
  0x08, 0x06, # ether_type
  0x00, 0x01, # hardware_type
  0x08, 0x00, # protocol_type
Severity: Minor
Found in fixtures/arp/arp_reply.rb and 1 other location - About 50 mins to fix
fixtures/arp/arp_request.rb on lines 4..15

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

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

module Pio
  module OpenFlow10
    module Error
      # Bad request error.
      class BadRequest < OpenFlow::Message
Severity: Minor
Found in lib/pio/open_flow10/error/bad_request.rb and 1 other location - About 50 mins to fix
lib/pio/open_flow10/error/hello_failed.rb on lines 8..20

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

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

module Pio
  module OpenFlow10
    module Error
      # Hello failed error.
      class HelloFailed < OpenFlow::Message
Severity: Minor
Found in lib/pio/open_flow10/error/hello_failed.rb and 1 other location - About 50 mins to fix
lib/pio/open_flow10/error/bad_request.rb on lines 8..19

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

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

  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, # destination_mac
  0x00, 0x26, 0x82, 0xeb, 0xea, 0xd1, # source_mac
  0x08, 0x06, # ether_type
  0x00, 0x01, # hardware_type
  0x08, 0x00, # protocol_type
Severity: Minor
Found in fixtures/arp/arp_request.rb and 1 other location - About 50 mins to fix
fixtures/arp/arp_reply.rb on lines 4..15

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

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

    class SetTransportDestinationPort < OpenFlow::Action
      action_header action_type: 10, action_length: 8
      uint16 :port
      string :padding, length: 2
      hide :padding
Severity: Minor
Found in lib/pio/open_flow10/set_transport_port.rb and 1 other location - About 45 mins to fix
lib/pio/open_flow10/set_transport_port.rb on lines 9..23

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

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

    class SetTransportSourcePort < OpenFlow::Action
      action_header action_type: 9, action_length: 8
      uint16 :port
      string :padding, length: 2
      hide :padding
Severity: Minor
Found in lib/pio/open_flow10/set_transport_port.rb and 1 other location - About 45 mins to fix
lib/pio/open_flow10/set_transport_port.rb on lines 28..42

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

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

  module OpenFlow10
    # OpenFlow 1.0 Port Status message
    class PortStatus < OpenFlow::Message
      # What changed about the physical port
      class Reason < BinData::Primitive
Severity: Minor
Found in lib/pio/open_flow10/port_status/reason.rb and 1 other location - About 25 mins to fix
lib/pio/open_flow10/flow_removed/reason.rb on lines 4..19

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

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

  module OpenFlow10
    # Flow Removed message
    class FlowRemoved < OpenFlow::Message
      # Why was this flow removed?
      # (enum ofp_flow_removed_reason)
Severity: Minor
Found in lib/pio/open_flow10/flow_removed/reason.rb and 1 other location - About 25 mins to fix
lib/pio/open_flow10/port_status/reason.rb on lines 4..18

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

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

    class BufferId < BinData::Primitive
      NO_BUFFER = 0xffffffff

      endian :big
      uint32 :buffer_id, initial_value: NO_BUFFER
Severity: Minor
Found in lib/pio/open_flow/buffer_id.rb and 2 other locations - About 25 mins to fix
lib/pio/open_flow13/flow_mod.rb on lines 34..45
lib/pio/open_flow13/flow_mod.rb on lines 51..62

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

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