SquirrelJME/SquirrelJME

View on GitHub

Showing 132 of 203 total issues

Method __drawText has 108 lines of code (exceeds 100 allowed). Consider refactoring.
Open

    final void __drawText(Text __t, int __x, int __y, int __anchor)
        throws NullPointerException
    {
        if (__t == null)
            throw new NullPointerException("NARG");

    Method monitorWait has a Cognitive Complexity of 30 (exceeds 24 allowed). Consider refactoring.
    Open

        public final int monitorWait(SpringThread __by, long __ms, int __ns)
            throws NullPointerException
        {
            if (__by == 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 readUTF has a Cognitive Complexity of 30 (exceeds 24 allowed). Consider refactoring.
    Open

        @Api
        public static final String readUTF(DataInput __in)
            throws EOFException, IOException, NullPointerException,
                UTFDataFormatException
        {
    Severity: Minor
    Found in modules/cldc-compact/src/main/java/java/io/DataInputStream.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 __keyCode has a Cognitive Complexity of 30 (exceeds 24 allowed). Consider refactoring.
    Open

        private static int __keyCode(int __keyCode, char __keyChar)
        {
            // Function keys, these come in two groups
            if (__keyCode >= KeyEvent.VK_F1 && __keyCode <= KeyEvent.VK_F12)
                return NonStandardKey.F1 + (__keyCode - KeyEvent.VK_F1);

    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 30 (exceeds 24 allowed). Consider refactoring.
    Open

        public void parse()
            throws IOException
        {
            DataInputStream in = this.in;
            NativeImageLoadCallback loader = this.loader;

    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 start has 104 lines of code (exceeds 100 allowed). Consider refactoring.
    Open

        public static TaskBracket start(
            JarPackageBracket[] __classPath, String __mainClass, String[] __args,
            String[] __sysPropPairs, int __stdOut, int __stdErr)
            throws MLECallError
        {

      Method sqrt has 104 lines of code (exceeds 100 allowed). Consider refactoring.
      Open

          @ImplementationNote("Source: http://www.netlib.org/fdlibm/e_sqrt.c")
          public static strictfp double sqrt(double __v)
          {
              double z;
              int uur, uut1, uus1, uuix1, uuq1;

        Method hardwareDrawXRGB32Region has 17 arguments (exceeds 12 allowed). Consider refactoring.
        Open

                @NotNull PencilBracket __hardware, @NotNull int[] __data,
                @Range(from = 0, to = Integer.MAX_VALUE) int __off,
                @Range(from = 0, to = Integer.MAX_VALUE) int __scanLen,
                boolean __alpha, int __xSrc, int __ySrc,
                @Range(from = 0, to = Integer.MAX_VALUE) int __wSrc,

          Method __initializeEntries has 103 lines of code (exceeds 100 allowed). Consider refactoring.
          Open

              private static void __initializeEntries(Object[] __entries, int[] __tags,
                  Object[] __rawdata)
                  throws InvalidClassFormatException, NullPointerException
              {
                  // Check

            Method execute has 103 lines of code (exceeds 100 allowed). Consider refactoring.
            Open

                    @Override
                    public JDWPPacket execute(JDWPHostController __controller,
                        JDWPPacket __packet)
                        throws JDWPException
                    {

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

                  @SquirrelJMEVendorApi
                  public static MidiControlPlayer newMidiPlayer()
                      throws MediaException
                  {
                      // See if the MIDI device property exists

              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 (!((c >= 'a' && c <= 'z') ||
                              (c >= 'A' && c <= 'Z') ||
                              (c >= '0' && c <= '9') ||
                              c == '_'))
                              throw new IllegalArgumentException("CW09 " + __identifier);

                Consider simplifying this complex logical expression.
                Open

                        if (__jarOffset < 0 || (__jarOffset + __l) < 0 ||
                            (__jarOffset + __l) > libLen || __o < 0 || __l < 0 ||
                            (__o + __l) < 0 || (__o + __l) > bufLen)
                            throw new IndexOutOfBoundsException("IOOB");

                  Consider simplifying this complex logical expression.
                  Open

                          if (__jarOffset < 0 || (__jarOffset + __l) < 0 ||
                              (__jarOffset + __l) > libLen || __o < 0 || __l < 0 ||
                              (__o + __l) < 0 || (__o + __l) > bufLen)
                              throw new IndexOutOfBoundsException("IOOB");

                    Consider simplifying this complex logical expression.
                    Open

                                        if (!(c == '-' || c == '+' || (c >= '0' && c <= '9') ||
                                            c == 'e' || c == 'E' || c == '.'))
                                            throw new JsonParsingException(String.format(
                                                "illgnum", (char)c), jl);

                      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");

                        Consider simplifying this complex logical expression.
                        Open

                                            if (c == '-' || c == '+' || (c >= '0' && c <= '9') ||
                                                c == 'e' || c == 'E' || c == '.')
                                            {
                                                // Make big E, a little e
                                                if (c == 'E')

                          Method __drawRegion has 16 arguments (exceeds 12 allowed). Consider refactoring.
                          Open

                              private void __drawRegion(int[] __data, int __off, int __scanlen,
                                  boolean __alpha, int __xsrc, int __ysrc, int __wsrc, int __hsrc,
                                  int __trans, int __xdest, int __ydest, int __anch, int __wdest,
                                  int __hdest, int __origImgWidth, int __origImgHeight)

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

                                private byte[] __unfilter(InputStream __in, int __bpp)
                                    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

                            Severity
                            Category
                            Status
                            Source
                            Language