SquirrelJME/SquirrelJME

View on GitHub

Showing 110 of 178 total issues

Method eventKey has a Cognitive Complexity of 29 (exceeds 24 allowed). Consider refactoring.
Open

    @Override
    public void eventKey(UIFormBracket __form, UIItemBracket __item,
        int __event, int __keyCode, int __modifiers)
    {
        // Debug

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 __parseHeader has a Cognitive Complexity of 29 (exceeds 24 allowed). Consider refactoring.
Open

    private void __parseHeader(DataInputStream __in)
        throws IOException, NullPointerException
    {
        // Check
        if (__in == null)

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 print has a Cognitive Complexity of 29 (exceeds 24 allowed). Consider refactoring.
Open

    public final void print(PrintStream __ps)
        throws NullPointerException
    {
        if (__ps == null)
            throw new NullPointerException("NARG");

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

Consider simplifying this complex logical expression.
Open

        if (__properties == null || __accelerators == null ||
            __metrics == null || __bitmap == null || __encoding == null ||
            __scalablewidths == null || __glyphnames == null)
            throw new NullPointerException("NARG");

    Method __unfilter has a Cognitive Complexity of 28 (exceeds 24 allowed). Consider refactoring.
    Open

        private final byte[] __unfilter(InputStream __in)
            throws IOException, NullPointerException
        {
            if (__in == null)
                throw new NullPointerException("NARG");

    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

    Avoid deeply nested control flow statements.
    Open

                            if (!sops.isEmpty())
                                stackpoison.put(addr, sops);

      Method add has a Cognitive Complexity of 27 (exceeds 24 allowed). Consider refactoring.
      Open

          public final int add(Object __v)
              throws NullPointerException
          {
              if (__v == null)
                  throw new NullPointerException("NARG");

      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

      Avoid deeply nested control flow statements.
      Open

                                  for (int p = 0; p < numparts; p++)
                                      parts[p] = xd.readByte() & 0xFF;

        Avoid deeply nested control flow statements.
        Open

                                        for (int r = 0; r < count; r++)
                                            reglist[r] =
                                                ((icache[rargp++] & 0xFF) << 8) |
                                                (icache[rargp++] & 0xFF);

          Avoid deeply nested control flow statements.
          Open

                                          if (rv < 0 || rv > 127)
                                          {
                                              wide = true;
                                              break;
                                          }

            Avoid deeply nested control flow statements.
            Open

                                            for (int r = 0; r < rn; r++)
                                                dos.writeShort(rl.get(r));

              Avoid deeply nested control flow statements.
              Open

                                      if (buf[gap] == '\n')
                                          rp = ln + 2;
                                      
                                      // Otherwise do not
                                      else
              Severity: Major
              Found in modules/cldc-compact/src/main/java/java/io/BufferedReader.java - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                            for (int p = 0; p < numparts; p++)
                                                parts[p] = xd.readUnsignedShort();

                  Method __specifier has a Cognitive Complexity of 27 (exceeds 24 allowed). Consider refactoring.
                  Open

                      private static int __specifier(__PrintFState__ __pf, int __base,
                          String __fmt)
                          throws IllegalArgumentException, NullPointerException
                      {
                          if (__pf == null || __fmt == null)
                  Severity: Minor
                  Found in modules/cldc-compact/src/main/java/java/util/Formatter.java - About 45 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

                  Avoid deeply nested control flow statements.
                  Open

                                                  for (int j = 0; j < numparts; j++)
                                                      cnn[j] = entries.get(parts[j]).
                                                          <ClassName>value(ClassName.class);

                    Avoid deeply nested control flow statements.
                    Open

                                                        if (x >= 0 && y >= 0 && z >= 0)
                                                            return (x << 6) | (y << 3) | (z);

                      Avoid deeply nested control flow statements.
                      Open

                                                          if (x >= 0 && y >= 0)
                                                              return (x << 4) | (y);

                        Method doMath has a Cognitive Complexity of 27 (exceeds 24 allowed). Consider refactoring.
                        Open

                            @Override
                            public final void doMath(StackJavaType __dt, MathType __mt,
                                JavaStackResult.Input __a, JavaStackResult.Input __b,
                                JavaStackResult.Output __c)
                            {

                        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 createVM has a Cognitive Complexity of 27 (exceeds 24 allowed). Consider refactoring.
                        Open

                            @Override
                            protected VirtualMachine createVM(ProfilerSnapshot __ps,
                                JDWPFactory __jdwp, VMThreadModel __threadModel, VMSuiteManager __sm,
                                VMClassLibrary[] __cp, String __maincl, Map<String, String> __sprops,
                                String[] __args)

                        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

                        Consider simplifying this complex logical expression.
                        Open

                                if (__r < 0 || __r > 255 || __g < 0 || __g > 255 || __b < 0 ||
                                    __b > 255)
                                    throw new IllegalArgumentException(String.format("DA01 %d %d %d",
                                        __r, __g, __b));
                        Severity: Major
                        Found in modules/meep-lui/src/main/java/javax/microedition/lui/DisplayColor.java - About 40 mins to fix
                          Severity
                          Category
                          Status
                          Source
                          Language