forward3d/rbhive

View on GitHub
lib/thrift/thrift_hive.rb

Summary

Maintainability
D
2 days
Test Coverage

File thrift_hive.rb has 376 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'thrift'
require_relative 'thrift_hive_metastore'
require_relative 'hive_service_types'

module Hive
Severity: Minor
Found in lib/thrift/thrift_hive.rb - About 5 hrs to fix

    Class Client has 24 methods (exceeds 20 allowed). Consider refactoring.
    Open

          class Client < ::ThriftHiveMetastore::Client 
            include ::Thrift::Client
    
            def execute(query)
              send_execute(query)
    Severity: Minor
    Found in lib/thrift/thrift_hive.rb - About 2 hrs to fix

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

            class FetchN_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 355..370

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

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

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

            class Execute_result
              include ::Thrift::Struct, ::Thrift::Struct_Union
              EX = 1
      
              FIELDS = {
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 38 other locations - About 30 mins to fix
      lib/thrift/t_c_l_i_service.rb on lines 443..456
      lib/thrift/t_c_l_i_service.rb on lines 459..472
      lib/thrift/t_c_l_i_service.rb on lines 475..488
      lib/thrift/t_c_l_i_service.rb on lines 491..504
      lib/thrift/t_c_l_i_service.rb on lines 507..520
      lib/thrift/t_c_l_i_service.rb on lines 523..536
      lib/thrift/t_c_l_i_service.rb on lines 539..552
      lib/thrift/t_c_l_i_service.rb on lines 555..568
      lib/thrift/t_c_l_i_service.rb on lines 571..584
      lib/thrift/t_c_l_i_service.rb on lines 587..600
      lib/thrift/t_c_l_i_service.rb on lines 603..616
      lib/thrift/t_c_l_i_service.rb on lines 619..632
      lib/thrift/t_c_l_i_service.rb on lines 635..648
      lib/thrift/t_c_l_i_service.rb on lines 651..664
      lib/thrift/t_c_l_i_service.rb on lines 667..680
      lib/thrift/t_c_l_i_service.rb on lines 683..696
      lib/thrift/t_c_l_i_service.rb on lines 699..712
      lib/thrift/t_c_l_i_service.rb on lines 715..728
      lib/thrift/t_c_l_i_service.rb on lines 731..744
      lib/thrift/t_c_l_i_service.rb on lines 747..760
      lib/thrift/t_c_l_i_service.rb on lines 763..776
      lib/thrift/t_c_l_i_service.rb on lines 779..792
      lib/thrift/t_c_l_i_service.rb on lines 795..808
      lib/thrift/t_c_l_i_service.rb on lines 811..824
      lib/thrift/t_c_l_i_service.rb on lines 827..840
      lib/thrift/t_c_l_i_service.rb on lines 843..856
      lib/thrift/t_c_l_i_service.rb on lines 859..872
      lib/thrift/t_c_l_i_service.rb on lines 875..888
      lib/thrift/t_c_l_i_service.rb on lines 891..904
      lib/thrift/t_c_l_i_service.rb on lines 907..920
      lib/thrift/t_c_l_i_service.rb on lines 923..936
      lib/thrift/t_c_l_i_service.rb on lines 939..952
      lib/thrift/t_c_l_i_service.rb on lines 955..968
      lib/thrift/t_c_l_i_service.rb on lines 971..984
      lib/thrift/t_c_l_i_service.rb on lines 987..1000
      lib/thrift/t_c_l_i_service.rb on lines 1003..1016
      lib/thrift/t_c_l_i_service.rb on lines 1019..1032
      lib/thrift/t_c_l_i_service.rb on lines 1035..1048

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

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

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

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

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

      Refactorings

      Further Reading

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

              def process_getQueryPlan(seqid, iprot, oprot)
                args = read_args(iprot, GetQueryPlan_args)
                result = GetQueryPlan_result.new()
                begin
                  result.success = @handler.getQueryPlan()
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 5 other locations - About 25 mins to fix
      lib/thrift/thrift_hive.rb on lines 160..168
      lib/thrift/thrift_hive.rb on lines 182..190
      lib/thrift/thrift_hive.rb on lines 193..201
      lib/thrift/thrift_hive.rb on lines 204..212
      lib/thrift/thrift_hive.rb on lines 215..223

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 29.

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

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

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

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

      Refactorings

      Further Reading

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

              def process_getSchema(seqid, iprot, oprot)
                args = read_args(iprot, GetSchema_args)
                result = GetSchema_result.new()
                begin
                  result.success = @handler.getSchema()
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 5 other locations - About 25 mins to fix
      lib/thrift/thrift_hive.rb on lines 160..168
      lib/thrift/thrift_hive.rb on lines 182..190
      lib/thrift/thrift_hive.rb on lines 204..212
      lib/thrift/thrift_hive.rb on lines 215..223
      lib/thrift/thrift_hive.rb on lines 226..234

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 29.

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

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

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

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

      Refactorings

      Further Reading

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

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

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 29.

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

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

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

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

      Refactorings

      Further Reading

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

              def process_fetchOne(seqid, iprot, oprot)
                args = read_args(iprot, FetchOne_args)
                result = FetchOne_result.new()
                begin
                  result.success = @handler.fetchOne()
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 5 other locations - About 25 mins to fix
      lib/thrift/thrift_hive.rb on lines 182..190
      lib/thrift/thrift_hive.rb on lines 193..201
      lib/thrift/thrift_hive.rb on lines 204..212
      lib/thrift/thrift_hive.rb on lines 215..223
      lib/thrift/thrift_hive.rb on lines 226..234

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 29.

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

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

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

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

      Refactorings

      Further Reading

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

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

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 29.

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

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

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

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

      Refactorings

      Further Reading

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

              def process_getThriftSchema(seqid, iprot, oprot)
                args = read_args(iprot, GetThriftSchema_args)
                result = GetThriftSchema_result.new()
                begin
                  result.success = @handler.getThriftSchema()
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 5 other locations - About 25 mins to fix
      lib/thrift/thrift_hive.rb on lines 160..168
      lib/thrift/thrift_hive.rb on lines 182..190
      lib/thrift/thrift_hive.rb on lines 193..201
      lib/thrift/thrift_hive.rb on lines 215..223
      lib/thrift/thrift_hive.rb on lines 226..234

      Duplicated Code

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

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

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

      Tuning

      This issue has a mass of 29.

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

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

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

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

      Refactorings

      Further Reading

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

            class FetchN_args
              include ::Thrift::Struct, ::Thrift::Struct_Union
              NUMROWS = 1
      
              FIELDS = {
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 23 other locations - About 20 mins to fix
      lib/thrift/facebook_service.rb on lines 305..318
      lib/thrift/facebook_service.rb on lines 336..349
      lib/thrift/facebook_service.rb on lines 401..414
      lib/thrift/facebook_service.rb on lines 448..461
      lib/thrift/facebook_service.rb on lines 464..477
      lib/thrift/facebook_service.rb on lines 513..526
      lib/thrift/facebook_service.rb on lines 529..542
      lib/thrift/facebook_service.rb on lines 576..589
      lib/thrift/facebook_service.rb on lines 592..605
      lib/thrift/facebook_service.rb on lines 623..636
      lib/thrift/thrift_hive.rb on lines 241..254
      lib/thrift/thrift_hive_metastore.rb on lines 1716..1729
      lib/thrift/thrift_hive_metastore.rb on lines 1790..1803
      lib/thrift/thrift_hive_metastore.rb on lines 1893..1906
      lib/thrift/thrift_hive_metastore.rb on lines 1967..1980
      lib/thrift/thrift_hive_metastore.rb on lines 2003..2016
      lib/thrift/thrift_hive_metastore.rb on lines 2229..2242
      lib/thrift/thrift_hive_metastore.rb on lines 3033..3046
      lib/thrift/thrift_hive_metastore.rb on lines 3067..3080
      lib/thrift/thrift_hive_metastore.rb on lines 3375..3388
      lib/thrift/thrift_hive_metastore.rb on lines 3719..3732
      lib/thrift/thrift_hive_metastore.rb on lines 3789..3802
      lib/thrift/thrift_hive_metastore.rb on lines 3823..3836

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

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

            class Execute_args
              include ::Thrift::Struct, ::Thrift::Struct_Union
              QUERY = 1
      
              FIELDS = {
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 23 other locations - About 20 mins to fix
      lib/thrift/facebook_service.rb on lines 305..318
      lib/thrift/facebook_service.rb on lines 336..349
      lib/thrift/facebook_service.rb on lines 401..414
      lib/thrift/facebook_service.rb on lines 448..461
      lib/thrift/facebook_service.rb on lines 464..477
      lib/thrift/facebook_service.rb on lines 513..526
      lib/thrift/facebook_service.rb on lines 529..542
      lib/thrift/facebook_service.rb on lines 576..589
      lib/thrift/facebook_service.rb on lines 592..605
      lib/thrift/facebook_service.rb on lines 623..636
      lib/thrift/thrift_hive.rb on lines 306..319
      lib/thrift/thrift_hive_metastore.rb on lines 1716..1729
      lib/thrift/thrift_hive_metastore.rb on lines 1790..1803
      lib/thrift/thrift_hive_metastore.rb on lines 1893..1906
      lib/thrift/thrift_hive_metastore.rb on lines 1967..1980
      lib/thrift/thrift_hive_metastore.rb on lines 2003..2016
      lib/thrift/thrift_hive_metastore.rb on lines 2229..2242
      lib/thrift/thrift_hive_metastore.rb on lines 3033..3046
      lib/thrift/thrift_hive_metastore.rb on lines 3067..3080
      lib/thrift/thrift_hive_metastore.rb on lines 3375..3388
      lib/thrift/thrift_hive_metastore.rb on lines 3719..3732
      lib/thrift/thrift_hive_metastore.rb on lines 3789..3802
      lib/thrift/thrift_hive_metastore.rb on lines 3823..3836

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

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

              def recv_getThriftSchema()
                result = receive_message(GetThriftSchema_result)
                return result.success unless result.success.nil?
                raise result.ex unless result.ex.nil?
                raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getThriftSchema failed: unknown result')
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 31 other locations - About 20 mins to fix
      lib/thrift/thrift_hive.rb on lines 41..45
      lib/thrift/thrift_hive.rb on lines 57..61
      lib/thrift/thrift_hive.rb on lines 73..77
      lib/thrift/thrift_hive.rb on lines 89..93
      lib/thrift/thrift_hive.rb on lines 121..125
      lib/thrift/thrift_hive.rb on lines 137..141
      lib/thrift/thrift_hive_metastore.rb on lines 75..79
      lib/thrift/thrift_hive_metastore.rb on lines 91..95
      lib/thrift/thrift_hive_metastore.rb on lines 175..179
      lib/thrift/thrift_hive_metastore.rb on lines 261..265
      lib/thrift/thrift_hive_metastore.rb on lines 277..281
      lib/thrift/thrift_hive_metastore.rb on lines 499..503
      lib/thrift/thrift_hive_metastore.rb on lines 515..519
      lib/thrift/thrift_hive_metastore.rb on lines 548..552
      lib/thrift/thrift_hive_metastore.rb on lines 597..601
      lib/thrift/thrift_hive_metastore.rb on lines 613..617
      lib/thrift/thrift_hive_metastore.rb on lines 629..633
      lib/thrift/thrift_hive_metastore.rb on lines 730..734
      lib/thrift/thrift_hive_metastore.rb on lines 746..750
      lib/thrift/thrift_hive_metastore.rb on lines 762..766
      lib/thrift/thrift_hive_metastore.rb on lines 778..782
      lib/thrift/thrift_hive_metastore.rb on lines 794..798
      lib/thrift/thrift_hive_metastore.rb on lines 810..814
      lib/thrift/thrift_hive_metastore.rb on lines 826..830
      lib/thrift/thrift_hive_metastore.rb on lines 842..846
      lib/thrift/thrift_hive_metastore.rb on lines 858..862
      lib/thrift/thrift_hive_metastore.rb on lines 874..878
      lib/thrift/thrift_hive_metastore.rb on lines 890..894
      lib/thrift/thrift_hive_metastore.rb on lines 906..910
      lib/thrift/thrift_hive_metastore.rb on lines 922..926
      lib/thrift/thrift_hive_metastore.rb on lines 938..942

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

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

              def recv_getClusterStatus()
                result = receive_message(GetClusterStatus_result)
                return result.success unless result.success.nil?
                raise result.ex unless result.ex.nil?
                raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getClusterStatus failed: unknown result')
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 31 other locations - About 20 mins to fix
      lib/thrift/thrift_hive.rb on lines 41..45
      lib/thrift/thrift_hive.rb on lines 57..61
      lib/thrift/thrift_hive.rb on lines 73..77
      lib/thrift/thrift_hive.rb on lines 89..93
      lib/thrift/thrift_hive.rb on lines 105..109
      lib/thrift/thrift_hive.rb on lines 137..141
      lib/thrift/thrift_hive_metastore.rb on lines 75..79
      lib/thrift/thrift_hive_metastore.rb on lines 91..95
      lib/thrift/thrift_hive_metastore.rb on lines 175..179
      lib/thrift/thrift_hive_metastore.rb on lines 261..265
      lib/thrift/thrift_hive_metastore.rb on lines 277..281
      lib/thrift/thrift_hive_metastore.rb on lines 499..503
      lib/thrift/thrift_hive_metastore.rb on lines 515..519
      lib/thrift/thrift_hive_metastore.rb on lines 548..552
      lib/thrift/thrift_hive_metastore.rb on lines 597..601
      lib/thrift/thrift_hive_metastore.rb on lines 613..617
      lib/thrift/thrift_hive_metastore.rb on lines 629..633
      lib/thrift/thrift_hive_metastore.rb on lines 730..734
      lib/thrift/thrift_hive_metastore.rb on lines 746..750
      lib/thrift/thrift_hive_metastore.rb on lines 762..766
      lib/thrift/thrift_hive_metastore.rb on lines 778..782
      lib/thrift/thrift_hive_metastore.rb on lines 794..798
      lib/thrift/thrift_hive_metastore.rb on lines 810..814
      lib/thrift/thrift_hive_metastore.rb on lines 826..830
      lib/thrift/thrift_hive_metastore.rb on lines 842..846
      lib/thrift/thrift_hive_metastore.rb on lines 858..862
      lib/thrift/thrift_hive_metastore.rb on lines 874..878
      lib/thrift/thrift_hive_metastore.rb on lines 890..894
      lib/thrift/thrift_hive_metastore.rb on lines 906..910
      lib/thrift/thrift_hive_metastore.rb on lines 922..926
      lib/thrift/thrift_hive_metastore.rb on lines 938..942

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

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

              def recv_fetchN()
                result = receive_message(FetchN_result)
                return result.success unless result.success.nil?
                raise result.ex unless result.ex.nil?
                raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchN failed: unknown result')
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 31 other locations - About 20 mins to fix
      lib/thrift/thrift_hive.rb on lines 41..45
      lib/thrift/thrift_hive.rb on lines 73..77
      lib/thrift/thrift_hive.rb on lines 89..93
      lib/thrift/thrift_hive.rb on lines 105..109
      lib/thrift/thrift_hive.rb on lines 121..125
      lib/thrift/thrift_hive.rb on lines 137..141
      lib/thrift/thrift_hive_metastore.rb on lines 75..79
      lib/thrift/thrift_hive_metastore.rb on lines 91..95
      lib/thrift/thrift_hive_metastore.rb on lines 175..179
      lib/thrift/thrift_hive_metastore.rb on lines 261..265
      lib/thrift/thrift_hive_metastore.rb on lines 277..281
      lib/thrift/thrift_hive_metastore.rb on lines 499..503
      lib/thrift/thrift_hive_metastore.rb on lines 515..519
      lib/thrift/thrift_hive_metastore.rb on lines 548..552
      lib/thrift/thrift_hive_metastore.rb on lines 597..601
      lib/thrift/thrift_hive_metastore.rb on lines 613..617
      lib/thrift/thrift_hive_metastore.rb on lines 629..633
      lib/thrift/thrift_hive_metastore.rb on lines 730..734
      lib/thrift/thrift_hive_metastore.rb on lines 746..750
      lib/thrift/thrift_hive_metastore.rb on lines 762..766
      lib/thrift/thrift_hive_metastore.rb on lines 778..782
      lib/thrift/thrift_hive_metastore.rb on lines 794..798
      lib/thrift/thrift_hive_metastore.rb on lines 810..814
      lib/thrift/thrift_hive_metastore.rb on lines 826..830
      lib/thrift/thrift_hive_metastore.rb on lines 842..846
      lib/thrift/thrift_hive_metastore.rb on lines 858..862
      lib/thrift/thrift_hive_metastore.rb on lines 874..878
      lib/thrift/thrift_hive_metastore.rb on lines 890..894
      lib/thrift/thrift_hive_metastore.rb on lines 906..910
      lib/thrift/thrift_hive_metastore.rb on lines 922..926
      lib/thrift/thrift_hive_metastore.rb on lines 938..942

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

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

              def recv_getSchema()
                result = receive_message(GetSchema_result)
                return result.success unless result.success.nil?
                raise result.ex unless result.ex.nil?
                raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getSchema failed: unknown result')
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 31 other locations - About 20 mins to fix
      lib/thrift/thrift_hive.rb on lines 41..45
      lib/thrift/thrift_hive.rb on lines 57..61
      lib/thrift/thrift_hive.rb on lines 73..77
      lib/thrift/thrift_hive.rb on lines 105..109
      lib/thrift/thrift_hive.rb on lines 121..125
      lib/thrift/thrift_hive.rb on lines 137..141
      lib/thrift/thrift_hive_metastore.rb on lines 75..79
      lib/thrift/thrift_hive_metastore.rb on lines 91..95
      lib/thrift/thrift_hive_metastore.rb on lines 175..179
      lib/thrift/thrift_hive_metastore.rb on lines 261..265
      lib/thrift/thrift_hive_metastore.rb on lines 277..281
      lib/thrift/thrift_hive_metastore.rb on lines 499..503
      lib/thrift/thrift_hive_metastore.rb on lines 515..519
      lib/thrift/thrift_hive_metastore.rb on lines 548..552
      lib/thrift/thrift_hive_metastore.rb on lines 597..601
      lib/thrift/thrift_hive_metastore.rb on lines 613..617
      lib/thrift/thrift_hive_metastore.rb on lines 629..633
      lib/thrift/thrift_hive_metastore.rb on lines 730..734
      lib/thrift/thrift_hive_metastore.rb on lines 746..750
      lib/thrift/thrift_hive_metastore.rb on lines 762..766
      lib/thrift/thrift_hive_metastore.rb on lines 778..782
      lib/thrift/thrift_hive_metastore.rb on lines 794..798
      lib/thrift/thrift_hive_metastore.rb on lines 810..814
      lib/thrift/thrift_hive_metastore.rb on lines 826..830
      lib/thrift/thrift_hive_metastore.rb on lines 842..846
      lib/thrift/thrift_hive_metastore.rb on lines 858..862
      lib/thrift/thrift_hive_metastore.rb on lines 874..878
      lib/thrift/thrift_hive_metastore.rb on lines 890..894
      lib/thrift/thrift_hive_metastore.rb on lines 906..910
      lib/thrift/thrift_hive_metastore.rb on lines 922..926
      lib/thrift/thrift_hive_metastore.rb on lines 938..942

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

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

              def recv_fetchAll()
                result = receive_message(FetchAll_result)
                return result.success unless result.success.nil?
                raise result.ex unless result.ex.nil?
                raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchAll failed: unknown result')
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 31 other locations - About 20 mins to fix
      lib/thrift/thrift_hive.rb on lines 41..45
      lib/thrift/thrift_hive.rb on lines 57..61
      lib/thrift/thrift_hive.rb on lines 89..93
      lib/thrift/thrift_hive.rb on lines 105..109
      lib/thrift/thrift_hive.rb on lines 121..125
      lib/thrift/thrift_hive.rb on lines 137..141
      lib/thrift/thrift_hive_metastore.rb on lines 75..79
      lib/thrift/thrift_hive_metastore.rb on lines 91..95
      lib/thrift/thrift_hive_metastore.rb on lines 175..179
      lib/thrift/thrift_hive_metastore.rb on lines 261..265
      lib/thrift/thrift_hive_metastore.rb on lines 277..281
      lib/thrift/thrift_hive_metastore.rb on lines 499..503
      lib/thrift/thrift_hive_metastore.rb on lines 515..519
      lib/thrift/thrift_hive_metastore.rb on lines 548..552
      lib/thrift/thrift_hive_metastore.rb on lines 597..601
      lib/thrift/thrift_hive_metastore.rb on lines 613..617
      lib/thrift/thrift_hive_metastore.rb on lines 629..633
      lib/thrift/thrift_hive_metastore.rb on lines 730..734
      lib/thrift/thrift_hive_metastore.rb on lines 746..750
      lib/thrift/thrift_hive_metastore.rb on lines 762..766
      lib/thrift/thrift_hive_metastore.rb on lines 778..782
      lib/thrift/thrift_hive_metastore.rb on lines 794..798
      lib/thrift/thrift_hive_metastore.rb on lines 810..814
      lib/thrift/thrift_hive_metastore.rb on lines 826..830
      lib/thrift/thrift_hive_metastore.rb on lines 842..846
      lib/thrift/thrift_hive_metastore.rb on lines 858..862
      lib/thrift/thrift_hive_metastore.rb on lines 874..878
      lib/thrift/thrift_hive_metastore.rb on lines 890..894
      lib/thrift/thrift_hive_metastore.rb on lines 906..910
      lib/thrift/thrift_hive_metastore.rb on lines 922..926
      lib/thrift/thrift_hive_metastore.rb on lines 938..942

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

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

              def recv_getQueryPlan()
                result = receive_message(GetQueryPlan_result)
                return result.success unless result.success.nil?
                raise result.ex unless result.ex.nil?
                raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getQueryPlan failed: unknown result')
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 31 other locations - About 20 mins to fix
      lib/thrift/thrift_hive.rb on lines 41..45
      lib/thrift/thrift_hive.rb on lines 57..61
      lib/thrift/thrift_hive.rb on lines 73..77
      lib/thrift/thrift_hive.rb on lines 89..93
      lib/thrift/thrift_hive.rb on lines 105..109
      lib/thrift/thrift_hive.rb on lines 121..125
      lib/thrift/thrift_hive_metastore.rb on lines 75..79
      lib/thrift/thrift_hive_metastore.rb on lines 91..95
      lib/thrift/thrift_hive_metastore.rb on lines 175..179
      lib/thrift/thrift_hive_metastore.rb on lines 261..265
      lib/thrift/thrift_hive_metastore.rb on lines 277..281
      lib/thrift/thrift_hive_metastore.rb on lines 499..503
      lib/thrift/thrift_hive_metastore.rb on lines 515..519
      lib/thrift/thrift_hive_metastore.rb on lines 548..552
      lib/thrift/thrift_hive_metastore.rb on lines 597..601
      lib/thrift/thrift_hive_metastore.rb on lines 613..617
      lib/thrift/thrift_hive_metastore.rb on lines 629..633
      lib/thrift/thrift_hive_metastore.rb on lines 730..734
      lib/thrift/thrift_hive_metastore.rb on lines 746..750
      lib/thrift/thrift_hive_metastore.rb on lines 762..766
      lib/thrift/thrift_hive_metastore.rb on lines 778..782
      lib/thrift/thrift_hive_metastore.rb on lines 794..798
      lib/thrift/thrift_hive_metastore.rb on lines 810..814
      lib/thrift/thrift_hive_metastore.rb on lines 826..830
      lib/thrift/thrift_hive_metastore.rb on lines 842..846
      lib/thrift/thrift_hive_metastore.rb on lines 858..862
      lib/thrift/thrift_hive_metastore.rb on lines 874..878
      lib/thrift/thrift_hive_metastore.rb on lines 890..894
      lib/thrift/thrift_hive_metastore.rb on lines 906..910
      lib/thrift/thrift_hive_metastore.rb on lines 922..926
      lib/thrift/thrift_hive_metastore.rb on lines 938..942

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

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

              def recv_fetchOne()
                result = receive_message(FetchOne_result)
                return result.success unless result.success.nil?
                raise result.ex unless result.ex.nil?
                raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'fetchOne failed: unknown result')
      Severity: Major
      Found in lib/thrift/thrift_hive.rb and 31 other locations - About 20 mins to fix
      lib/thrift/thrift_hive.rb on lines 57..61
      lib/thrift/thrift_hive.rb on lines 73..77
      lib/thrift/thrift_hive.rb on lines 89..93
      lib/thrift/thrift_hive.rb on lines 105..109
      lib/thrift/thrift_hive.rb on lines 121..125
      lib/thrift/thrift_hive.rb on lines 137..141
      lib/thrift/thrift_hive_metastore.rb on lines 75..79
      lib/thrift/thrift_hive_metastore.rb on lines 91..95
      lib/thrift/thrift_hive_metastore.rb on lines 175..179
      lib/thrift/thrift_hive_metastore.rb on lines 261..265
      lib/thrift/thrift_hive_metastore.rb on lines 277..281
      lib/thrift/thrift_hive_metastore.rb on lines 499..503
      lib/thrift/thrift_hive_metastore.rb on lines 515..519
      lib/thrift/thrift_hive_metastore.rb on lines 548..552
      lib/thrift/thrift_hive_metastore.rb on lines 597..601
      lib/thrift/thrift_hive_metastore.rb on lines 613..617
      lib/thrift/thrift_hive_metastore.rb on lines 629..633
      lib/thrift/thrift_hive_metastore.rb on lines 730..734
      lib/thrift/thrift_hive_metastore.rb on lines 746..750
      lib/thrift/thrift_hive_metastore.rb on lines 762..766
      lib/thrift/thrift_hive_metastore.rb on lines 778..782
      lib/thrift/thrift_hive_metastore.rb on lines 794..798
      lib/thrift/thrift_hive_metastore.rb on lines 810..814
      lib/thrift/thrift_hive_metastore.rb on lines 826..830
      lib/thrift/thrift_hive_metastore.rb on lines 842..846
      lib/thrift/thrift_hive_metastore.rb on lines 858..862
      lib/thrift/thrift_hive_metastore.rb on lines 874..878
      lib/thrift/thrift_hive_metastore.rb on lines 890..894
      lib/thrift/thrift_hive_metastore.rb on lines 906..910
      lib/thrift/thrift_hive_metastore.rb on lines 922..926
      lib/thrift/thrift_hive_metastore.rb on lines 938..942

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

      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

      There are no issues that match your filters.

      Category
      Status