SquirrelJME/SquirrelJME

View on GitHub

Showing 121 of 1,004 total issues

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

    private final void __invokeAssembly(MethodName __name,
        MethodDescriptor __type, JavaStackResult.Output __out,
        JavaStackResult.Input... __in)
        throws NullPointerException
    {

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 (x >= 0 && y >= 0 && z >= 0)
                                        return (x << 6) | (y << 3) | (z);

    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

    Avoid deeply nested control flow statements.
    Open

                            if (__Debug__.ENABLED)
                                todo.DEBUG.note("SMT BEF: %s", stack);

      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

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

          Consider simplifying this complex logical expression.
          Open

                      if (this.isPrivate() || this.isStatic() || this.isFinal() || this
                          .isSynchronized() || this.isNative() || this.isStrict())
                          throw new InvalidClassFormatException(
                              String.format("JC3l %s", this));

            Consider simplifying this complex logical expression.
            Open

                    if (__h == null || __p == null || __sf == null || __if == null ||
                        __sm == null || __im == null)
                        throw new NullPointerException("NARG");

              Consider simplifying this complex logical expression.
              Open

                          if (amaj == 0 && amin == 0 && arel == 0 &&
                              bmaj == 99 && bmin == 99 && brel == 99)
                              sb.append('*');
                          
                          // Exact, subwildcard, or any following

                Consider simplifying this complex logical expression.
                Open

                        if (__task == null || __thread == null || __mcl == null ||
                            __mname == null || __mtype == null || __callargs == null)
                            throw new NullPointerException("NARG");

                  Consider simplifying this complex logical expression.
                  Open

                          if (__maj < 0 || __maj > 99 || __min < 0 || __min > 99 ||
                              __rel < 0 || __rel > 99)
                              throw new InvalidSuiteException(String.format("AR0i %d %d %d",
                                  __maj, __min, __rel));

                    Consider simplifying this complex logical expression.
                    Open

                                        if ((includeMain && isMain) ||
                                            (includeDaemon && isDaemon) ||
                                            (!isMain && !isDaemon))
                                            count++;

                      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

                        Consider simplifying this complex logical expression.
                        Open

                                if (__o != SocketConnection.KEEPALIVE || __o != SocketConnection.LINGER || __o != SocketConnection.SNDBUF ||
                                    __o != SocketConnection.RCVBUF || __o != SocketConnection.DELAY || __o != SocketConnection.TIMEOUT)
                                    throw new IllegalArgumentException("EC0n " + __o);

                          Method read has a Cognitive Complexity of 26 (exceeds 24 allowed). Consider refactoring.
                          Open

                              public static final PCFFont read(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

                          Method __formatOtherUnsignedInt has a Cognitive Complexity of 26 (exceeds 24 allowed). Consider refactoring.
                          Open

                              private static String __formatOtherUnsignedInt(__PrintFState__ __pf,
                                  Number __n, int __base)
                                  throws NullPointerException
                              {
                                  if (__pf == null)
                          Severity: Minor
                          Found in modules/cldc-compact/src/main/java/java/util/Formatter.java - About 35 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 build has a Cognitive Complexity of 25 (exceeds 24 allowed). Consider refactoring.
                          Open

                              public final NativeCode build()
                              {
                                  // Labels which point to addresses
                                  Map<NativeCodeLabel, Integer> labels = this._labels;
                                  

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

                              @Override
                              public final void writeUTF(String __v)
                                  throws IOException, NullPointerException
                              {
                                  if (__v == null)
                          Severity: Minor
                          Found in modules/cldc-compact/src/main/java/java/io/DataOutputStream.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 __launch has a Cognitive Complexity of 25 (exceeds 24 allowed). Consider refactoring.
                          Open

                              private void __launch(String __p)
                                  throws NullPointerException
                              {
                                  if (__p == 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

                          Method __generateReturn has a Cognitive Complexity of 25 (exceeds 24 allowed). Consider refactoring.
                          Open

                              private final NativeCodeLabel __generateReturn(JavaStackEnqueueList __eq)
                                  throws NullPointerException
                              {
                                  if (__eq == 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

                          Severity
                          Category
                          Status
                          Source
                          Language