forward3d/rbhive

View on GitHub

Showing 414 of 414 total issues

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

  class Get_partition_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    DB_NAME = 1
    TBL_NAME = 2
    PART_VALS = 3
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 2377..2394

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 54.

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

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

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

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

Refactorings

Further Reading

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

  class Drop_type_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O1 = 1
    O2 = 2
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 2483..2500
lib/thrift/thrift_hive_metastore.rb on lines 2525..2542
lib/thrift/thrift_hive_metastore.rb on lines 3203..3220

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

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

  class Drop_partition_by_name_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O1 = 1
    O2 = 2
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 1983..2000
lib/thrift/thrift_hive_metastore.rb on lines 2483..2500
lib/thrift/thrift_hive_metastore.rb on lines 3203..3220

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

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

  class Drop_index_by_name_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O1 = 1
    O2 = 2
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 1983..2000
lib/thrift/thrift_hive_metastore.rb on lines 2483..2500
lib/thrift/thrift_hive_metastore.rb on lines 2525..2542

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

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

  class Drop_partition_result
    include ::Thrift::Struct, ::Thrift::Struct_Union
    SUCCESS = 0
    O1 = 1
    O2 = 2
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 1983..2000
lib/thrift/thrift_hive_metastore.rb on lines 2525..2542
lib/thrift/thrift_hive_metastore.rb on lines 3203..3220

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

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

  class Get_partitions_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    DB_NAME = 1
    TBL_NAME = 2
    MAX_PARTS = 3
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 2753..2770
lib/thrift/thrift_hive_metastore.rb on lines 3263..3280
lib/thrift/thrift_hive_metastore.rb on lines 3303..3320

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

  class Get_index_names_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    DB_NAME = 1
    TBL_NAME = 2
    MAX_INDEXES = 3
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 2669..2686
lib/thrift/thrift_hive_metastore.rb on lines 2753..2770
lib/thrift/thrift_hive_metastore.rb on lines 3263..3280

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

  class Get_partition_names_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    DB_NAME = 1
    TBL_NAME = 2
    MAX_PARTS = 3
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 2669..2686
lib/thrift/thrift_hive_metastore.rb on lines 3263..3280
lib/thrift/thrift_hive_metastore.rb on lines 3303..3320

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

  class Get_indexes_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    DB_NAME = 1
    TBL_NAME = 2
    MAX_INDEXES = 3
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 3 other locations - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 2669..2686
lib/thrift/thrift_hive_metastore.rb on lines 2753..2770
lib/thrift/thrift_hive_metastore.rb on lines 3303..3320

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

  class Alter_partition_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    DB_NAME = 1
    TBL_NAME = 2
    NEW_PART = 3
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 2301..2318

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

  class Alter_table_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    DBNAME = 1
    TBL_NAME = 2
    NEW_TBL = 3
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 2959..2976

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

    def process_append_partition_by_name(seqid, iprot, oprot)
      args = read_args(iprot, Append_partition_by_name_args)
      result = Append_partition_by_name_result.new()
      begin
        result.success = @handler.append_partition_by_name(args.db_name, args.tbl_name, args.part_name)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 1218..1230

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

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 TStructTypeEntry
      include ::Thrift::Struct, ::Thrift::Struct_Union
      NAMETOTYPEPTR = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 1 other location - About 1 hr to fix
lib/thrift/t_c_l_i_service_types.rb on lines 270..284

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

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 TUnionTypeEntry
      include ::Thrift::Struct, ::Thrift::Struct_Union
      NAMETOTYPEPTR = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 1 other location - About 1 hr to fix
lib/thrift/t_c_l_i_service_types.rb on lines 253..267

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

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_append_partition(seqid, iprot, oprot)
      args = read_args(iprot, Append_partition_args)
      result = Append_partition_result.new()
      begin
        result.success = @handler.append_partition(args.db_name, args.tbl_name, args.part_vals)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 1 other location - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 1233..1245

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

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

Severity: Major
Found in lib/thrift/thrift_hive.rb and 1 other location - About 1 hr to fix
lib/thrift/thrift_hive.rb on lines 322..337

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

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

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 2 other locations - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 2813..2828
lib/thrift/thrift_hive_metastore.rb on lines 3554..3569

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

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

Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 2 other locations - About 1 hr to fix
lib/thrift/thrift_hive_metastore.rb on lines 2813..2828
lib/thrift/thrift_hive_metastore.rb on lines 3633..3648

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

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

class FieldSchema
  include ::Thrift::Struct, ::Thrift::Struct_Union
  NAME = 1
  TYPE = 2
  COMMENT = 3
Severity: Major
Found in lib/thrift/hive_metastore_types.rb and 5 other locations - About 1 hr to fix
lib/thrift/hive_metastore_types.rb on lines 204..221
lib/thrift/thrift_hive_metastore.rb on lines 2155..2172
lib/thrift/thrift_hive_metastore.rb on lines 2419..2436
lib/thrift/thrift_hive_metastore.rb on lines 2629..2646
lib/thrift/thrift_hive_metastore.rb on lines 3223..3240

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

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

  class Append_partition_by_name_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    DB_NAME = 1
    TBL_NAME = 2
    PART_NAME = 3
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 5 other locations - About 1 hr to fix
lib/thrift/hive_metastore_types.rb on lines 47..64
lib/thrift/hive_metastore_types.rb on lines 204..221
lib/thrift/thrift_hive_metastore.rb on lines 2155..2172
lib/thrift/thrift_hive_metastore.rb on lines 2629..2646
lib/thrift/thrift_hive_metastore.rb on lines 3223..3240

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

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