hackedteam/vector-edk

View on GitHub
vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java

Summary

Maintainability
F
3 days
Test Coverage

Method main has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring.
Open

    public static void main(String[] args) throws Exception
    {
        System.out.println("\nLZMA (Java) 4.61  2008-11-23\n");
        
        if (args.length < 1)
Severity: Minor
Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 7 hrs 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 Parse has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
Open

        public boolean Parse(String[] args) throws Exception
        {
            int pos = 0;
            boolean switchMode = true;
            for (int i = 0; i < args.length; i++)
Severity: Minor
Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 6 hrs 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 main has 81 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    public static void main(String[] args) throws Exception
    {
        System.out.println("\nLZMA (Java) 4.61  2008-11-23\n");
        
        if (args.length < 1)
Severity: Major
Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 3 hrs to fix

    Method Parse has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public boolean Parse(String[] args) throws Exception
            {
                int pos = 0;
                boolean switchMode = true;
                for (int i = 0; i < args.length; i++)
    Severity: Major
    Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 2 hrs to fix

      Method ParseSwitch has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

              boolean ParseSwitch(String s)
              {
                  if (s.startsWith("d"))
                  {
                      DictionarySize = 1 << Integer.parseInt(s.substring(1));
      Severity: Minor
      Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 1 hr 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 ParseSwitch has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              boolean ParseSwitch(String s)
              {
                  if (s.startsWith("d"))
                  {
                      DictionarySize = 1 << Integer.parseInt(s.substring(1));
      Severity: Minor
      Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 1 hr to fix

        Avoid too many return statements within this method.
        Open

                                return false;
        Severity: Major
        Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                      return true;
          Severity: Major
          Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                                            return false;
            Severity: Major
            Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                          return false;
              Severity: Major
              Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                    return false;
                Severity: Major
                Found in vector-uefi/insyde/7zip/Java/SevenZip/LzmaAlone.java - About 30 mins to fix

                  There are no issues that match your filters.

                  Category
                  Status