CalebFenton/dex-oracle

View on GitHub

Showing 27 of 136 total issues

Avoid too many return statements within this method.
Open

            return int.class;
Severity: Major
Found in driver/src/main/java/org/cf/oracle/options/TargetParser.java - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

                return long.class;
    Severity: Major
    Found in driver/src/main/java/org/cf/oracle/options/TargetParser.java - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

                  return short.class;
      Severity: Major
      Found in driver/src/main/java/org/cf/oracle/options/TargetParser.java - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                    return boolean.class;
        Severity: Major
        Found in driver/src/main/java/org/cf/oracle/options/TargetParser.java - About 30 mins to fix

          Method binaryToInternal has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

              public static String binaryToInternal(String binaryName) {
                  String baseName = getComponentBase(binaryName);
                  StringBuilder sb = new StringBuilder();
                  int dimensionCount = getDimensionCount(binaryName);
                  for (int i = 0; i < dimensionCount; i++) {
          Severity: Minor
          Found in driver/src/main/java/org/cf/oracle/ClassNameUtils.java - About 25 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

          Method which has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

            def self.which(cmd)
              exts = ENV['PATHEXT'] ? ENV['PATHEXT'].split(';') : ['']
              ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
                exts.each do |ext|
                  exe = File.join(path, "#{cmd}#{ext}")
          Severity: Minor
          Found in lib/dex-oracle/utility.rb - About 25 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

          Method extract_file has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
          Open

            def self.extract_file(zip, name, dest)
              Zip::File.open(zip) do |zf|
                zf.each do |e|
                  next unless e.name == name
                  e.extract(dest) { true } # overwrite
          Severity: Minor
          Found in lib/dex-oracle/utility.rb - About 25 mins to fix

          Cognitive Complexity

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

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

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

          Further reading

          Severity
          Category
          Status
          Source
          Language