forward3d/rbhive

View on GitHub

Showing 414 of 414 total issues

Method recv_drop_partition has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def recv_drop_partition()
      result = receive_message(Drop_partition_result)
      return result.success unless result.success.nil?
      raise result.o1 unless result.o1.nil?
      raise result.o2 unless result.o2.nil?
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb - About 25 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

Method validate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def validate
      unless @principal_type.nil? || ::PrincipalType::VALID_VALUES.include?(@principal_type)
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field principal_type!')
      end
      unless @grantorType.nil? || ::PrincipalType::VALID_VALUES.include?(@grantorType)
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb - About 25 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 8 locations. Consider refactoring.
Open

  class Cancel_delegation_token_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    O1 = 1

    FIELDS = {
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 7 other locations - About 25 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1680..1693
lib/thrift/thrift_hive_metastore.rb on lines 1929..1942
lib/thrift/thrift_hive_metastore.rb on lines 2117..2130
lib/thrift/thrift_hive_metastore.rb on lines 2339..2352
lib/thrift/thrift_hive_metastore.rb on lines 3341..3354
lib/thrift/thrift_hive_metastore.rb on lines 3651..3664
lib/thrift/thrift_hive_metastore.rb on lines 3685..3698

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

Method validate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

      def validate
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field sessionHandle is unset!') unless @sessionHandle
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field owner is unset!') unless @owner
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field renewer is unset!') unless @renewer
      end
Severity: Minor
Found in lib/thrift/t_c_l_i_service_types.rb - About 25 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

Method recv_create_database has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def recv_create_database()
      result = receive_message(Create_database_result)
      raise result.o1 unless result.o1.nil?
      raise result.o2 unless result.o2.nil?
      raise result.o3 unless result.o3.nil?
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb - About 25 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

Method recv_get_type has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def recv_get_type()
      result = receive_message(Get_type_result)
      return result.success unless result.success.nil?
      raise result.o1 unless result.o1.nil?
      raise result.o2 unless result.o2.nil?
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb - About 25 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 8 locations. Consider refactoring.
Open

  class Add_partition_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    NEW_PART = 1

    FIELDS = {
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 7 other locations - About 25 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1680..1693
lib/thrift/thrift_hive_metastore.rb on lines 1929..1942
lib/thrift/thrift_hive_metastore.rb on lines 2117..2130
lib/thrift/thrift_hive_metastore.rb on lines 3341..3354
lib/thrift/thrift_hive_metastore.rb on lines 3651..3664
lib/thrift/thrift_hive_metastore.rb on lines 3685..3698
lib/thrift/thrift_hive_metastore.rb on lines 3839..3852

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

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

  class Create_role_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    ROLE = 1

    FIELDS = {
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 7 other locations - About 25 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1680..1693
lib/thrift/thrift_hive_metastore.rb on lines 1929..1942
lib/thrift/thrift_hive_metastore.rb on lines 2117..2130
lib/thrift/thrift_hive_metastore.rb on lines 2339..2352
lib/thrift/thrift_hive_metastore.rb on lines 3651..3664
lib/thrift/thrift_hive_metastore.rb on lines 3685..3698
lib/thrift/thrift_hive_metastore.rb on lines 3839..3852

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

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

      def validate
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field type is unset!') unless @type
        unless @type.nil? || ::Hive2::Thrift::TTypeId::VALID_VALUES.include?(@type)
          raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
        end
Severity: Minor
Found in lib/thrift/t_c_l_i_service_types.rb and 3 other locations - About 25 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 869..873
lib/thrift/t_c_l_i_service_types.rb on lines 960..964
lib/thrift/t_c_l_i_service_types.rb on lines 1484..1488

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

Method recv_drop_type has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def recv_drop_type()
      result = receive_message(Drop_type_result)
      return result.success unless result.success.nil?
      raise result.o1 unless result.o1.nil?
      raise result.o2 unless result.o2.nil?
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb - About 25 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

Method recv_drop_index_by_name has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

    def recv_drop_index_by_name()
      result = receive_message(Drop_index_by_name_result)
      return result.success unless result.success.nil?
      raise result.o1 unless result.o1.nil?
      raise result.o2 unless result.o2.nil?
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb - About 25 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 8 locations. Consider refactoring.
Open

  class Create_type_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    TYPE = 1

    FIELDS = {
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 7 other locations - About 25 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1680..1693
lib/thrift/thrift_hive_metastore.rb on lines 2117..2130
lib/thrift/thrift_hive_metastore.rb on lines 2339..2352
lib/thrift/thrift_hive_metastore.rb on lines 3341..3354
lib/thrift/thrift_hive_metastore.rb on lines 3651..3664
lib/thrift/thrift_hive_metastore.rb on lines 3685..3698
lib/thrift/thrift_hive_metastore.rb on lines 3839..3852

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

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

    class TByteValue
      include ::Thrift::Struct, ::Thrift::Struct_Union
      VALUE = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 6 other locations - About 25 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 416..429
lib/thrift/t_c_l_i_service_types.rb on lines 448..461
lib/thrift/t_c_l_i_service_types.rb on lines 464..477
lib/thrift/t_c_l_i_service_types.rb on lines 480..493
lib/thrift/t_c_l_i_service_types.rb on lines 496..509
lib/thrift/t_c_l_i_service_types.rb on lines 512..525

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

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

    class TStringValue
      include ::Thrift::Struct, ::Thrift::Struct_Union
      VALUE = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 6 other locations - About 25 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 416..429
lib/thrift/t_c_l_i_service_types.rb on lines 432..445
lib/thrift/t_c_l_i_service_types.rb on lines 448..461
lib/thrift/t_c_l_i_service_types.rb on lines 464..477
lib/thrift/t_c_l_i_service_types.rb on lines 480..493
lib/thrift/t_c_l_i_service_types.rb on lines 496..509

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

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

        def process_fetchAll(seqid, iprot, oprot)
          args = read_args(iprot, FetchAll_args)
          result = FetchAll_result.new()
          begin
            result.success = @handler.fetchAll()
Severity: Major
Found in lib/thrift/thrift_hive.rb and 5 other locations - About 25 mins to fix
lib/thrift/thrift_hive.rb on lines 160..168
lib/thrift/thrift_hive.rb on lines 193..201
lib/thrift/thrift_hive.rb on lines 204..212
lib/thrift/thrift_hive.rb on lines 215..223
lib/thrift/thrift_hive.rb on lines 226..234

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

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

        def process_getClusterStatus(seqid, iprot, oprot)
          args = read_args(iprot, GetClusterStatus_args)
          result = GetClusterStatus_result.new()
          begin
            result.success = @handler.getClusterStatus()
Severity: Major
Found in lib/thrift/thrift_hive.rb and 5 other locations - About 25 mins to fix
lib/thrift/thrift_hive.rb on lines 160..168
lib/thrift/thrift_hive.rb on lines 182..190
lib/thrift/thrift_hive.rb on lines 193..201
lib/thrift/thrift_hive.rb on lines 204..212
lib/thrift/thrift_hive.rb on lines 226..234

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

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

    def process_get_type_all(seqid, iprot, oprot)
      args = read_args(iprot, Get_type_all_args)
      result = Get_type_all_result.new()
      begin
        result.success = @handler.get_type_all(args.name)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 10 other locations - About 25 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1008..1016
lib/thrift/thrift_hive_metastore.rb on lines 1166..1174
lib/thrift/thrift_hive_metastore.rb on lines 1422..1430
lib/thrift/thrift_hive_metastore.rb on lines 1433..1441
lib/thrift/thrift_hive_metastore.rb on lines 1522..1530
lib/thrift/thrift_hive_metastore.rb on lines 1533..1541
lib/thrift/thrift_hive_metastore.rb on lines 1610..1618
lib/thrift/thrift_hive_metastore.rb on lines 1621..1629
lib/thrift/thrift_hive_metastore.rb on lines 1632..1640
lib/thrift/thrift_hive_metastore.rb on lines 1654..1662

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

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

    def process_create_role(seqid, iprot, oprot)
      args = read_args(iprot, Create_role_args)
      result = Create_role_result.new()
      begin
        result.success = @handler.create_role(args.role)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 10 other locations - About 25 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1008..1016
lib/thrift/thrift_hive_metastore.rb on lines 1084..1092
lib/thrift/thrift_hive_metastore.rb on lines 1166..1174
lib/thrift/thrift_hive_metastore.rb on lines 1422..1430
lib/thrift/thrift_hive_metastore.rb on lines 1433..1441
lib/thrift/thrift_hive_metastore.rb on lines 1533..1541
lib/thrift/thrift_hive_metastore.rb on lines 1610..1618
lib/thrift/thrift_hive_metastore.rb on lines 1621..1629
lib/thrift/thrift_hive_metastore.rb on lines 1632..1640
lib/thrift/thrift_hive_metastore.rb on lines 1654..1662

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

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

    def process_revoke_privileges(seqid, iprot, oprot)
      args = read_args(iprot, Revoke_privileges_args)
      result = Revoke_privileges_result.new()
      begin
        result.success = @handler.revoke_privileges(args.privileges)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 10 other locations - About 25 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1008..1016
lib/thrift/thrift_hive_metastore.rb on lines 1084..1092
lib/thrift/thrift_hive_metastore.rb on lines 1166..1174
lib/thrift/thrift_hive_metastore.rb on lines 1422..1430
lib/thrift/thrift_hive_metastore.rb on lines 1433..1441
lib/thrift/thrift_hive_metastore.rb on lines 1522..1530
lib/thrift/thrift_hive_metastore.rb on lines 1533..1541
lib/thrift/thrift_hive_metastore.rb on lines 1610..1618
lib/thrift/thrift_hive_metastore.rb on lines 1632..1640
lib/thrift/thrift_hive_metastore.rb on lines 1654..1662

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

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

    def process_get_databases(seqid, iprot, oprot)
      args = read_args(iprot, Get_databases_args)
      result = Get_databases_result.new()
      begin
        result.success = @handler.get_databases(args.pattern)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 10 other locations - About 25 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1084..1092
lib/thrift/thrift_hive_metastore.rb on lines 1166..1174
lib/thrift/thrift_hive_metastore.rb on lines 1422..1430
lib/thrift/thrift_hive_metastore.rb on lines 1433..1441
lib/thrift/thrift_hive_metastore.rb on lines 1522..1530
lib/thrift/thrift_hive_metastore.rb on lines 1533..1541
lib/thrift/thrift_hive_metastore.rb on lines 1610..1618
lib/thrift/thrift_hive_metastore.rb on lines 1621..1629
lib/thrift/thrift_hive_metastore.rb on lines 1632..1640
lib/thrift/thrift_hive_metastore.rb on lines 1654..1662

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

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