forward3d/rbhive

View on GitHub

Showing 414 of 414 total issues

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

      class GetQueryPlan_result
        include ::Thrift::Struct, ::Thrift::Struct_Union
        SUCCESS = 0
        EX = 1

Severity: Minor
Found in lib/thrift/thrift_hive.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive.rb on lines 454..469

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

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

  class Get_index_names_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O2 = 1

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 8 other locations - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1806..1821
lib/thrift/thrift_hive_metastore.rb on lines 1839..1854
lib/thrift/thrift_hive_metastore.rb on lines 2211..2226
lib/thrift/thrift_hive_metastore.rb on lines 2245..2260
lib/thrift/thrift_hive_metastore.rb on lines 2773..2788
lib/thrift/thrift_hive_metastore.rb on lines 2899..2914
lib/thrift/thrift_hive_metastore.rb on lines 3049..3064
lib/thrift/thrift_hive_metastore.rb on lines 3424..3439

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

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 GetClusterStatus_result
        include ::Thrift::Struct, ::Thrift::Struct_Union
        SUCCESS = 0
        EX = 1

Severity: Minor
Found in lib/thrift/thrift_hive.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive.rb on lines 487..502

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

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 9 (exceeds 5 allowed). Consider refactoring.
Open

      def validate
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field operationHandle is unset!') unless @operationHandle
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field orientation is unset!') unless @orientation
        raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Required field maxRows is unset!') unless @maxRows
        unless @orientation.nil? || ::Hive2::Thrift::TFetchOrientation::VALID_VALUES.include?(@orientation)
Severity: Minor
Found in lib/thrift/t_c_l_i_service_types.rb - About 55 mins to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

    def process_add_partition(seqid, iprot, oprot)
      args = read_args(iprot, Add_partition_args)
      result = Add_partition_result.new()
      begin
        result.success = @handler.add_partition(args.new_part)
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1056..1068

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

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

    def process_get_partitions_with_auth(seqid, iprot, oprot)
      args = read_args(iprot, Get_partitions_with_auth_args)
      result = Get_partitions_with_auth_result.new()
      begin
        result.success = @handler.get_partitions_with_auth(args.db_name, args.tbl_name, args.max_parts, args.user_name, args.group_names)
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1287..1297

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

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

    def process_get_partition_with_auth(seqid, iprot, oprot)
      args = read_args(iprot, Get_partition_with_auth_args)
      result = Get_partition_with_auth_result.new()
      begin
        result.success = @handler.get_partition_with_auth(args.db_name, args.tbl_name, args.part_vals, args.user_name, args.group_names)
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1326..1336

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

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

    def process_create_type(seqid, iprot, oprot)
      args = read_args(iprot, Create_type_args)
      result = Create_type_result.new()
      begin
        result.success = @handler.create_type(args.type)
Severity: Minor
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1203..1215

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

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

    def coerce_column(column_name, value)
      type = column_type_map[column_name]
      return INFINITY if (type != :string && value == "Infinity")
      return NAN if (type != :string && value == "NaN")
      return coerce_complex_value(value) if type.to_s =~ /^array/
Severity: Minor
Found in lib/rbhive/schema_definition.rb and 1 other location - About 55 mins to fix
lib/rbhive/t_c_l_i_schema_definition.rb on lines 67..74

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

      class GetThriftSchema_result
        include ::Thrift::Struct, ::Thrift::Struct_Union
        SUCCESS = 0
        EX = 1

Severity: Minor
Found in lib/thrift/thrift_hive.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive.rb on lines 388..403

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

      class GetSchema_result
        include ::Thrift::Struct, ::Thrift::Struct_Union
        SUCCESS = 0
        EX = 1

Severity: Minor
Found in lib/thrift/thrift_hive.rb and 1 other location - About 55 mins to fix
lib/thrift/thrift_hive.rb on lines 421..436

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

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

    def coerce_column(column_name, value)
      type = column_type_map[column_name]
      return INFINITY if (type != :string && value == "Infinity")
      return NAN if (type != :string && value == "NaN")
      return coerce_complex_value(value) if type.to_s =~ /^array/
Severity: Minor
Found in lib/rbhive/t_c_l_i_schema_definition.rb and 1 other location - About 55 mins to fix
lib/rbhive/schema_definition.rb on lines 66..73

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

    def process_drop_partition_by_name(seqid, iprot, oprot)
      args = read_args(iprot, Drop_partition_by_name_args)
      result = Drop_partition_by_name_result.new()
      begin
        result.success = @handler.drop_partition_by_name(args.db_name, args.tbl_name, args.part_name, args.deleteData)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1248..1258
lib/thrift/thrift_hive_metastore.rb on lines 1385..1395
lib/thrift/thrift_hive_metastore.rb on lines 1472..1482

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

    def process_get_partitions_by_filter(seqid, iprot, oprot)
      args = read_args(iprot, Get_partitions_by_filter_args)
      result = Get_partitions_by_filter_result.new()
      begin
        result.success = @handler.get_partitions_by_filter(args.db_name, args.tbl_name, args.filter, args.max_parts)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1248..1258
lib/thrift/thrift_hive_metastore.rb on lines 1261..1271
lib/thrift/thrift_hive_metastore.rb on lines 1472..1482

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

    def process_drop_index_by_name(seqid, iprot, oprot)
      args = read_args(iprot, Drop_index_by_name_args)
      result = Drop_index_by_name_result.new()
      begin
        result.success = @handler.drop_index_by_name(args.db_name, args.tbl_name, args.index_name, args.deleteData)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1248..1258
lib/thrift/thrift_hive_metastore.rb on lines 1261..1271
lib/thrift/thrift_hive_metastore.rb on lines 1385..1395

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

    def process_drop_partition(seqid, iprot, oprot)
      args = read_args(iprot, Drop_partition_args)
      result = Drop_partition_result.new()
      begin
        result.success = @handler.drop_partition(args.db_name, args.tbl_name, args.part_vals, args.deleteData)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1261..1271
lib/thrift/thrift_hive_metastore.rb on lines 1385..1395
lib/thrift/thrift_hive_metastore.rb on lines 1472..1482

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

  class Alter_database_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    O1 = 1
    O2 = 2

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 6 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 2175..2190
lib/thrift/thrift_hive_metastore.rb on lines 2321..2336
lib/thrift/thrift_hive_metastore.rb on lines 2979..2994
lib/thrift/thrift_hive_metastore.rb on lines 3101..3116
lib/thrift/thrift_hive_metastore.rb on lines 3163..3178
lib/thrift/thrift_hive_metastore.rb on lines 3592..3607

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

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 Alter_index_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    O1 = 1
    O2 = 2

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 6 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1875..1890
lib/thrift/thrift_hive_metastore.rb on lines 2175..2190
lib/thrift/thrift_hive_metastore.rb on lines 2321..2336
lib/thrift/thrift_hive_metastore.rb on lines 2979..2994
lib/thrift/thrift_hive_metastore.rb on lines 3101..3116
lib/thrift/thrift_hive_metastore.rb on lines 3592..3607

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

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 Get_privilege_set_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O1 = 1

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 6 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1875..1890
lib/thrift/thrift_hive_metastore.rb on lines 2175..2190
lib/thrift/thrift_hive_metastore.rb on lines 2321..2336
lib/thrift/thrift_hive_metastore.rb on lines 2979..2994
lib/thrift/thrift_hive_metastore.rb on lines 3101..3116
lib/thrift/thrift_hive_metastore.rb on lines 3163..3178

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

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 Drop_table_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    O1 = 1
    O3 = 2

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 6 other locations - About 50 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1875..1890
lib/thrift/thrift_hive_metastore.rb on lines 2321..2336
lib/thrift/thrift_hive_metastore.rb on lines 2979..2994
lib/thrift/thrift_hive_metastore.rb on lines 3101..3116
lib/thrift/thrift_hive_metastore.rb on lines 3163..3178
lib/thrift/thrift_hive_metastore.rb on lines 3592..3607

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

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