forward3d/rbhive

View on GitHub

Showing 349 of 414 total issues

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_partition_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 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_table_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 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 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

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 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 Add_index_args
    include ::Thrift::Struct, ::Thrift::Struct_Union
    NEW_INDEX = 1
    INDEX_TABLE = 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 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 14 locations. Consider refactoring.
Open

    class TSessionHandle
      include ::Thrift::Struct, ::Thrift::Struct_Union
      SESSIONID = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 13 other locations - About 45 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 997..1011
lib/thrift/t_c_l_i_service_types.rb on lines 1014..1028
lib/thrift/t_c_l_i_service_types.rb on lines 1170..1184
lib/thrift/t_c_l_i_service_types.rb on lines 1206..1220
lib/thrift/t_c_l_i_service_types.rb on lines 1326..1340
lib/thrift/t_c_l_i_service_types.rb on lines 1449..1463
lib/thrift/t_c_l_i_service_types.rb on lines 1494..1508
lib/thrift/t_c_l_i_service_types.rb on lines 1511..1525
lib/thrift/t_c_l_i_service_types.rb on lines 1528..1542
lib/thrift/t_c_l_i_service_types.rb on lines 1545..1559
lib/thrift/t_c_l_i_service_types.rb on lines 1562..1576
lib/thrift/t_c_l_i_service_types.rb on lines 1707..1721
lib/thrift/t_c_l_i_service_types.rb on lines 1744..1758

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    class TGetCatalogsReq
      include ::Thrift::Struct, ::Thrift::Struct_Union
      SESSIONHANDLE = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 13 other locations - About 45 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 899..913
lib/thrift/t_c_l_i_service_types.rb on lines 997..1011
lib/thrift/t_c_l_i_service_types.rb on lines 1014..1028
lib/thrift/t_c_l_i_service_types.rb on lines 1170..1184
lib/thrift/t_c_l_i_service_types.rb on lines 1326..1340
lib/thrift/t_c_l_i_service_types.rb on lines 1449..1463
lib/thrift/t_c_l_i_service_types.rb on lines 1494..1508
lib/thrift/t_c_l_i_service_types.rb on lines 1511..1525
lib/thrift/t_c_l_i_service_types.rb on lines 1528..1542
lib/thrift/t_c_l_i_service_types.rb on lines 1545..1559
lib/thrift/t_c_l_i_service_types.rb on lines 1562..1576
lib/thrift/t_c_l_i_service_types.rb on lines 1707..1721
lib/thrift/t_c_l_i_service_types.rb on lines 1744..1758

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    class TGetResultSetMetadataReq
      include ::Thrift::Struct, ::Thrift::Struct_Union
      OPERATIONHANDLE = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 13 other locations - About 45 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 899..913
lib/thrift/t_c_l_i_service_types.rb on lines 997..1011
lib/thrift/t_c_l_i_service_types.rb on lines 1014..1028
lib/thrift/t_c_l_i_service_types.rb on lines 1170..1184
lib/thrift/t_c_l_i_service_types.rb on lines 1206..1220
lib/thrift/t_c_l_i_service_types.rb on lines 1326..1340
lib/thrift/t_c_l_i_service_types.rb on lines 1449..1463
lib/thrift/t_c_l_i_service_types.rb on lines 1494..1508
lib/thrift/t_c_l_i_service_types.rb on lines 1511..1525
lib/thrift/t_c_l_i_service_types.rb on lines 1528..1542
lib/thrift/t_c_l_i_service_types.rb on lines 1545..1559
lib/thrift/t_c_l_i_service_types.rb on lines 1707..1721
lib/thrift/t_c_l_i_service_types.rb on lines 1744..1758

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    def process_get_partition(seqid, iprot, oprot)
      args = read_args(iprot, Get_partition_args)
      result = Get_partition_result.new()
      begin
        result.success = @handler.get_partition(args.db_name, args.tbl_name, args.part_vals)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 4 other locations - About 45 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1300..1310
lib/thrift/thrift_hive_metastore.rb on lines 1313..1323
lib/thrift/thrift_hive_metastore.rb on lines 1485..1495
lib/thrift/thrift_hive_metastore.rb on lines 1498..1508

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    def process_get_index_by_name(seqid, iprot, oprot)
      args = read_args(iprot, Get_index_by_name_args)
      result = Get_index_by_name_result.new()
      begin
        result.success = @handler.get_index_by_name(args.db_name, args.tbl_name, args.index_name)
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 4 other locations - About 45 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 1274..1284
lib/thrift/thrift_hive_metastore.rb on lines 1300..1310
lib/thrift/thrift_hive_metastore.rb on lines 1313..1323
lib/thrift/thrift_hive_metastore.rb on lines 1498..1508

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    class TCloseOperationReq
      include ::Thrift::Struct, ::Thrift::Struct_Union
      OPERATIONHANDLE = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 13 other locations - About 45 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 899..913
lib/thrift/t_c_l_i_service_types.rb on lines 997..1011
lib/thrift/t_c_l_i_service_types.rb on lines 1014..1028
lib/thrift/t_c_l_i_service_types.rb on lines 1170..1184
lib/thrift/t_c_l_i_service_types.rb on lines 1206..1220
lib/thrift/t_c_l_i_service_types.rb on lines 1326..1340
lib/thrift/t_c_l_i_service_types.rb on lines 1449..1463
lib/thrift/t_c_l_i_service_types.rb on lines 1494..1508
lib/thrift/t_c_l_i_service_types.rb on lines 1511..1525
lib/thrift/t_c_l_i_service_types.rb on lines 1545..1559
lib/thrift/t_c_l_i_service_types.rb on lines 1562..1576
lib/thrift/t_c_l_i_service_types.rb on lines 1707..1721
lib/thrift/t_c_l_i_service_types.rb on lines 1744..1758

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    class TCancelOperationReq
      include ::Thrift::Struct, ::Thrift::Struct_Union
      OPERATIONHANDLE = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 13 other locations - About 45 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 899..913
lib/thrift/t_c_l_i_service_types.rb on lines 997..1011
lib/thrift/t_c_l_i_service_types.rb on lines 1014..1028
lib/thrift/t_c_l_i_service_types.rb on lines 1170..1184
lib/thrift/t_c_l_i_service_types.rb on lines 1206..1220
lib/thrift/t_c_l_i_service_types.rb on lines 1326..1340
lib/thrift/t_c_l_i_service_types.rb on lines 1449..1463
lib/thrift/t_c_l_i_service_types.rb on lines 1511..1525
lib/thrift/t_c_l_i_service_types.rb on lines 1528..1542
lib/thrift/t_c_l_i_service_types.rb on lines 1545..1559
lib/thrift/t_c_l_i_service_types.rb on lines 1562..1576
lib/thrift/t_c_l_i_service_types.rb on lines 1707..1721
lib/thrift/t_c_l_i_service_types.rb on lines 1744..1758

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    class TRenewDelegationTokenResp
      include ::Thrift::Struct, ::Thrift::Struct_Union
      STATUS = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 13 other locations - About 45 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 899..913
lib/thrift/t_c_l_i_service_types.rb on lines 997..1011
lib/thrift/t_c_l_i_service_types.rb on lines 1014..1028
lib/thrift/t_c_l_i_service_types.rb on lines 1170..1184
lib/thrift/t_c_l_i_service_types.rb on lines 1206..1220
lib/thrift/t_c_l_i_service_types.rb on lines 1326..1340
lib/thrift/t_c_l_i_service_types.rb on lines 1449..1463
lib/thrift/t_c_l_i_service_types.rb on lines 1494..1508
lib/thrift/t_c_l_i_service_types.rb on lines 1511..1525
lib/thrift/t_c_l_i_service_types.rb on lines 1528..1542
lib/thrift/t_c_l_i_service_types.rb on lines 1545..1559
lib/thrift/t_c_l_i_service_types.rb on lines 1562..1576
lib/thrift/t_c_l_i_service_types.rb on lines 1707..1721

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    def recv_append_partition_by_name()
      result = receive_message(Append_partition_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: Major
Found in lib/thrift/thrift_hive_metastore.rb and 6 other locations - About 45 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 140..146
lib/thrift/thrift_hive_metastore.rb on lines 191..197
lib/thrift/thrift_hive_metastore.rb on lines 209..215
lib/thrift/thrift_hive_metastore.rb on lines 326..332
lib/thrift/thrift_hive_metastore.rb on lines 344..350
lib/thrift/thrift_hive_metastore.rb on lines 645..651

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    def recv_add_index()
      result = receive_message(Add_index_result)
      return result.success unless result.success.nil?
      raise result.o1 unless result.o1.nil?
      raise result.o2 unless result.o2.nil?
Severity: Major
Found in lib/thrift/thrift_hive_metastore.rb and 6 other locations - About 45 mins to fix
lib/thrift/thrift_hive_metastore.rb on lines 140..146
lib/thrift/thrift_hive_metastore.rb on lines 191..197
lib/thrift/thrift_hive_metastore.rb on lines 209..215
lib/thrift/thrift_hive_metastore.rb on lines 326..332
lib/thrift/thrift_hive_metastore.rb on lines 344..350
lib/thrift/thrift_hive_metastore.rb on lines 362..368

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    class TCloseSessionReq
      include ::Thrift::Struct, ::Thrift::Struct_Union
      SESSIONHANDLE = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 13 other locations - About 45 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 899..913
lib/thrift/t_c_l_i_service_types.rb on lines 1014..1028
lib/thrift/t_c_l_i_service_types.rb on lines 1170..1184
lib/thrift/t_c_l_i_service_types.rb on lines 1206..1220
lib/thrift/t_c_l_i_service_types.rb on lines 1326..1340
lib/thrift/t_c_l_i_service_types.rb on lines 1449..1463
lib/thrift/t_c_l_i_service_types.rb on lines 1494..1508
lib/thrift/t_c_l_i_service_types.rb on lines 1511..1525
lib/thrift/t_c_l_i_service_types.rb on lines 1528..1542
lib/thrift/t_c_l_i_service_types.rb on lines 1545..1559
lib/thrift/t_c_l_i_service_types.rb on lines 1562..1576
lib/thrift/t_c_l_i_service_types.rb on lines 1707..1721
lib/thrift/t_c_l_i_service_types.rb on lines 1744..1758

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

    class TGetOperationStatusReq
      include ::Thrift::Struct, ::Thrift::Struct_Union
      OPERATIONHANDLE = 1

      FIELDS = {
Severity: Major
Found in lib/thrift/t_c_l_i_service_types.rb and 13 other locations - About 45 mins to fix
lib/thrift/t_c_l_i_service_types.rb on lines 899..913
lib/thrift/t_c_l_i_service_types.rb on lines 997..1011
lib/thrift/t_c_l_i_service_types.rb on lines 1014..1028
lib/thrift/t_c_l_i_service_types.rb on lines 1170..1184
lib/thrift/t_c_l_i_service_types.rb on lines 1206..1220
lib/thrift/t_c_l_i_service_types.rb on lines 1326..1340
lib/thrift/t_c_l_i_service_types.rb on lines 1494..1508
lib/thrift/t_c_l_i_service_types.rb on lines 1511..1525
lib/thrift/t_c_l_i_service_types.rb on lines 1528..1542
lib/thrift/t_c_l_i_service_types.rb on lines 1545..1559
lib/thrift/t_c_l_i_service_types.rb on lines 1562..1576
lib/thrift/t_c_l_i_service_types.rb on lines 1707..1721
lib/thrift/t_c_l_i_service_types.rb on lines 1744..1758

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language