SquirrelJME/SquirrelJME

View on GitHub

Showing 132 of 203 total issues

Consider simplifying this complex logical expression.
Open

            else if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
                (c >= '0' && c <= '9') || c == ':' || c == '@' || c == '-' ||
                c == '.' || c == '_' || c == '~' || c == '!' || c == '$' ||
                c == '&' || c == '\'' || c == '(' || c == ')' || c == '*' ||
                c == '+' || c == ',' || c == ';' || c == '=')
Severity: Critical
Found in modules/gcf/src/main/java/cc/squirreljme/runtime/gcf/FileAddress.java - About 6 hrs to fix

    Method deserialize has 223 lines of code (exceeds 100 allowed). Consider refactoring.
    Open

        public static Object deserialize(Graphics __g, GraphicsFunction __func,
            Object... __args)
            throws IllegalArgumentException, NullPointerException
        {
            if (__g == null || __func == null)

      Method toString has 223 lines of code (exceeds 100 allowed). Consider refactoring.
      Open

          @SuppressWarnings("MagicNumber")
          public static String toString(int __code)
          {
              // Wide codes
              switch (__code & 0xFFFF)

        File ByteCodeUtils.java has 1013 lines of code (exceeds 850 allowed). Consider refactoring.
        Open

        // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
        // ---------------------------------------------------------------------------
        // Multi-Phasic Applications: SquirrelJME
        //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
        // ---------------------------------------------------------------------------

          Method toString has 221 lines of code (exceeds 100 allowed). Consider refactoring.
          Open

              public static String toString(int __op)
              {
                  switch (__op)
                  {
                      case InstructionIndex.NOP: return "NOP";

            Method toChar has 200 lines of code (exceeds 100 allowed). Consider refactoring.
            Open

                public static final int toChar(String __n)
                    throws NullPointerException
                {
                    if (__n == null)
                        throw new NullPointerException("NARG");

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

                  @Override
                  public final int read(byte[] __b, int __o, int __l)
                      throws IndexOutOfBoundsException, IOException, NullPointerException
                  {
                      if (__b == null)
              Severity: Minor
              Found in modules/io/src/main/java/net/multiphasicapps/io/Base64Decoder.java - About 4 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 __internalGet has 184 lines of code (exceeds 100 allowed). Consider refactoring.
              Open

                  private final void __internalGet()
                  {
                      // Read next data bit
                      Input.Data d = this.input.next();
                      String ds;

                Method __updateState has a Cognitive Complexity of 46 (exceeds 24 allowed). Consider refactoring.
                Open

                        private void __updateState(int __w, int __h)
                        {
                            // Needed for cycling    
                            Random random = this.random;
                            

                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

                File JDWPHostController.java has 928 lines of code (exceeds 850 allowed). Consider refactoring.
                Open

                // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
                // ---------------------------------------------------------------------------
                // SquirrelJME
                //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
                // ---------------------------------------------------------------------------

                  Method run has a Cognitive Complexity of 45 (exceeds 24 allowed). Consider refactoring.
                  Open

                      @Override
                      public void run()
                      {
                          JDWPCommLink link = this.commLink;
                          TallyTracker receiveTally = this.receiveTally;

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

                      @Api
                      public String readLine()
                          throws IOException
                      {
                          // Has this been closed?
                  Severity: Minor
                  Found in modules/cldc-compact/src/main/java/java/io/BufferedReader.java - About 3 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

                  File ByteCode.java has 916 lines of code (exceeds 850 allowed). Consider refactoring.
                  Open

                  // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
                  // ---------------------------------------------------------------------------
                  // SquirrelJME
                  //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
                  // ---------------------------------------------------------------------------

                    Method __nextInternal has 156 lines of code (exceeds 100 allowed). Consider refactoring.
                    Open

                        private Data __nextInternal()
                            throws IOException
                        {
                            // Reading loop
                            for (;;)

                      Method __standardSysProps has a Cognitive Complexity of 41 (exceeds 24 allowed). Consider refactoring.
                      Open

                          private static void __standardSysProps(
                              Map<String, String> __sysProps)
                              throws NullPointerException
                          {
                              if (__sysProps == 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 __declareComplex has 152 lines of code (exceeds 100 allowed). Consider refactoring.
                      Open

                          static List<String> __declareComplex(CType __start, CIdentifier __name)
                              throws NullPointerException
                          {
                              if (__start == null)
                                  throw new NullPointerException("NARG");

                        Consider simplifying this complex logical expression.
                        Open

                                else if ((last >= 'a' && last <= 'z') ||
                                    (last >= 'A' && last <= 'Z') ||
                                    (last >= '0' && last <= '9') ||
                                    last == '_')
                                {

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

                              public static CModifier of(CModifier... __of)
                                  throws IllegalArgumentException, NullPointerException
                              {
                                  // If there is just a single modifier, there is no real point in doing
                                  // much to wrap them because it will only ever contain a single one

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

                              @Override
                              public void eventKey(UIDrawableBracket __drawable,
                                  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

                          Consider simplifying this complex logical expression.
                          Open

                                  else if (__first == '=')
                                      return !(last == '+' || last == '-' ||
                                          last == '*' || last == '/' ||
                                          last == '%' || last == '^' ||
                                          last == '&' || last == '|' ||
                            Severity
                            Category
                            Status
                            Source
                            Language