biemond/biemond-orawls

View on GitHub

Showing 131 of 131 total issues

Method get_domain has 542 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def get_domain(domain_path, n)
  prefix = 'ora_mdw'
  domainfile = domain_path + '/config/config.xml'

  return if FileTest.exists?(domainfile) == false
Severity: Major
Found in lib/facter/orawls.rb - About 2 days to fix

    Method get_domain has a Cognitive Complexity of 120 (exceeds 5 allowed). Consider refactoring.
    Open

    def get_domain(domain_path, n)
      prefix = 'ora_mdw'
      domainfile = domain_path + '/config/config.xml'
    
      return if FileTest.exists?(domainfile) == false
    Severity: Minor
    Found in lib/facter/orawls.rb - About 2 days to fix

    Cognitive Complexity

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

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

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

    Further reading

    File orawls.rb has 739 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require 'rexml/document'
    require 'facter'
    require 'yaml'
    
    def get_weblogic_user
    Severity: Major
    Found in lib/facter/orawls.rb - About 1 day to fix

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

        Type.newtype(:wls_adminserver) do
          desc 'control the adminserver state like running,stop,restart'
      
          newproperty(:ensure) do
            desc 'Whether to do something.'
      Severity: Major
      Found in lib/puppet/type/wls_adminserver.rb and 1 other location - About 5 hrs to fix
      lib/puppet/type/wls_ohsserver.rb on lines 2..167

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

      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

        Type.newtype(:wls_ohsserver) do
          desc 'control the ohs server state like running,stop,restart'
      
          newproperty(:ensure) do
            desc 'Whether to do something.'
      Severity: Major
      Found in lib/puppet/type/wls_ohsserver.rb and 1 other location - About 5 hrs to fix
      lib/puppet/type/wls_adminserver.rb on lines 2..167

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

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

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

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

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

      Refactorings

      Further Reading

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

        module Puppet
          module Parser
            module Functions
              newfunction(:soa_cluster_configured, :type => :rvalue) do |args|
      
      
      Severity: Major
      Found in lib/puppet/parser/functions/soa_cluster_configured.rb and 3 other locations - About 4 hrs to fix
      lib/puppet/parser/functions/bam_cluster_configured.rb on lines 4..59
      lib/puppet/parser/functions/jrf_cluster_configured.rb on lines 4..58
      lib/puppet/parser/functions/osb_cluster_configured.rb on lines 4..58

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

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

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

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

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

      Refactorings

      Further Reading

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

        module Puppet
          module Parser
            module Functions
              newfunction(:jrf_cluster_configured, :type => :rvalue) do |args|
      
      
      Severity: Major
      Found in lib/puppet/parser/functions/jrf_cluster_configured.rb and 3 other locations - About 4 hrs to fix
      lib/puppet/parser/functions/bam_cluster_configured.rb on lines 4..59
      lib/puppet/parser/functions/osb_cluster_configured.rb on lines 4..58
      lib/puppet/parser/functions/soa_cluster_configured.rb on lines 4..59

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

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

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

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

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

      Refactorings

      Further Reading

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

        module Puppet
          module Parser
            module Functions
              newfunction(:bam_cluster_configured, :type => :rvalue) do |args|
      
      
      Severity: Major
      Found in lib/puppet/parser/functions/bam_cluster_configured.rb and 3 other locations - About 4 hrs to fix
      lib/puppet/parser/functions/jrf_cluster_configured.rb on lines 4..58
      lib/puppet/parser/functions/osb_cluster_configured.rb on lines 4..58
      lib/puppet/parser/functions/soa_cluster_configured.rb on lines 4..59

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

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

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

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

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

      Refactorings

      Further Reading

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

        module Puppet
          module Parser
            module Functions
              newfunction(:osb_cluster_configured, :type => :rvalue) do |args|
      
      
      Severity: Major
      Found in lib/puppet/parser/functions/osb_cluster_configured.rb and 3 other locations - About 4 hrs to fix
      lib/puppet/parser/functions/bam_cluster_configured.rb on lines 4..59
      lib/puppet/parser/functions/jrf_cluster_configured.rb on lines 4..58
      lib/puppet/parser/functions/soa_cluster_configured.rb on lines 4..59

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

      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

        root.elements.each("app-deployment[name = 'MQSeriesAdapter']") do |apps|
          unless apps.elements['plan-path'].nil?
            unless apps.elements['plan-dir'].attributes['xsi:nil'] == 'true'
              mQSeriesAdapterPlan += apps.elements['plan-dir'].text + '/' + apps.elements['plan-path'].text
            else
      Severity: Major
      Found in lib/facter/orawls.rb and 1 other location - About 3 hrs to fix
      lib/facter/orawls.rb on lines 461..481

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

      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

        root.elements.each("app-deployment[name = 'FtpAdapter']") do |apps|
          unless apps.elements['plan-path'].nil?
            unless apps.elements['plan-dir'].attributes['xsi:nil'] == 'true'
              ftpAdapterPlan += apps.elements['plan-dir'].text + '/' + apps.elements['plan-path'].text
            else
      Severity: Major
      Found in lib/facter/orawls.rb and 1 other location - About 3 hrs to fix
      lib/facter/orawls.rb on lines 502..522

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

      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

      File wls_access.rb has 306 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      require 'tempfile'
      require 'fileutils'
      require 'utils/settings'
      require 'utils/wls_daemon'
      
      
      Severity: Minor
      Found in lib/utils/wls_access.rb - About 3 hrs to fix

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

        module Puppet
          Type.newtype(:wls_virtual_target) do
            include EasyType
            include Utils::WlsAccess
            extend Utils::TitleParser
        Severity: Major
        Found in lib/puppet/type/wls_virtual_target.rb and 1 other location - About 3 hrs to fix
        lib/puppet/type/wls_workmanager.rb on lines 3..51

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

        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

        module Puppet
          Type.newtype(:wls_workmanager) do
            include EasyType
            include Utils::WlsAccess
            extend Utils::TitleParser
        Severity: Major
        Found in lib/puppet/type/wls_workmanager.rb and 1 other location - About 3 hrs to fix
        lib/puppet/type/wls_virtual_target.rb on lines 3..51

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

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

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

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

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

        Refactorings

        Further Reading

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

        module Puppet
          Type.newtype(:wls_server_template) do
            include EasyType
            include Utils::WlsAccess
            extend Utils::TitleParser
        Severity: Major
        Found in lib/puppet/type/wls_server_template.rb and 2 other locations - About 2 hrs to fix
        lib/puppet/type/wls_authentication_provider.rb on lines 4..73
        lib/puppet/type/wls_identity_asserter.rb on lines 3..52

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

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

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

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

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

        Refactorings

        Further Reading

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

        module Puppet
          #
          Type.newtype(:wls_identity_asserter) do
            include EasyType
            include Utils::WlsAccess
        Severity: Major
        Found in lib/puppet/type/wls_identity_asserter.rb and 2 other locations - About 2 hrs to fix
        lib/puppet/type/wls_authentication_provider.rb on lines 4..73
        lib/puppet/type/wls_server_template.rb on lines 3..51

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

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

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

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

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

        Refactorings

        Further Reading

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

        module Puppet
          #
          Type.newtype(:wls_authentication_provider) do
            include EasyType
            include Utils::WlsAccess
        Severity: Major
        Found in lib/puppet/type/wls_authentication_provider.rb and 2 other locations - About 2 hrs to fix
        lib/puppet/type/wls_identity_asserter.rb on lines 3..52
        lib/puppet/type/wls_server_template.rb on lines 3..51

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

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

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

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

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

        Refactorings

        Further Reading

        Method execute_rest has 73 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def execute_rest(domain, parameters, operation)
              array_size = parameters['attributes'].size
        
              weblogicUser       = domain['weblogic_user']     || 'weblogic'
              weblogicConnectUrl = domain['connect_url']       || 'http://localhost:7001'
        Severity: Major
        Found in lib/utils/wls_access.rb - About 2 hrs to fix

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

          module Puppet
            Type.newtype(:wls_singleton_service) do
              include EasyType
              include Utils::WlsAccess
              extend Utils::TitleParser
          Severity: Major
          Found in lib/puppet/type/wls_singleton_service.rb and 2 other locations - About 2 hrs to fix
          lib/puppet/type/wls_foreign_jndi_provider.rb on lines 4..53
          lib/puppet/type/wls_jdbc_persistence_store.rb on lines 4..53

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

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

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

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

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

          Refactorings

          Further Reading

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

          module Puppet
            #
            Type.newtype(:wls_foreign_jndi_provider) do
              include EasyType
              include Utils::WlsAccess
          Severity: Major
          Found in lib/puppet/type/wls_foreign_jndi_provider.rb and 2 other locations - About 2 hrs to fix
          lib/puppet/type/wls_jdbc_persistence_store.rb on lines 4..53
          lib/puppet/type/wls_singleton_service.rb on lines 4..51

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

          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