SquirrelJME/SquirrelJME

View on GitHub

Showing 195 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

                  Similar blocks of code found in 7 locations. Consider refactoring.
                  Open

                  // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
                  // ---------------------------------------------------------------------------
                  // SquirrelJME
                  //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
                  // ---------------------------------------------------------------------------
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/BooleanArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ByteArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/DoubleArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/FloatArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/LongArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ShortArrayList.java on lines 1..148

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 312.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 7 locations. Consider refactoring.
                  Open

                  // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
                  // ---------------------------------------------------------------------------
                  // SquirrelJME
                  //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
                  // ---------------------------------------------------------------------------
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/BooleanArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ByteArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/CharacterArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/DoubleArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/FloatArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/LongArrayList.java on lines 1..148

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 312.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 7 locations. Consider refactoring.
                  Open

                  // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
                  // ---------------------------------------------------------------------------
                  // SquirrelJME
                  //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
                  // ---------------------------------------------------------------------------
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/BooleanArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ByteArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/CharacterArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/DoubleArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/FloatArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ShortArrayList.java on lines 1..148

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 312.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 7 locations. Consider refactoring.
                  Open

                  // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
                  // ---------------------------------------------------------------------------
                  // SquirrelJME
                  //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
                  // ---------------------------------------------------------------------------
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/BooleanArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ByteArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/CharacterArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/DoubleArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/LongArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ShortArrayList.java on lines 1..148

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 312.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 7 locations. Consider refactoring.
                  Open

                  // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
                  // ---------------------------------------------------------------------------
                  // SquirrelJME
                  //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
                  // ---------------------------------------------------------------------------
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/BooleanArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ByteArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/CharacterArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/FloatArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/LongArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ShortArrayList.java on lines 1..148

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 312.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 7 locations. Consider refactoring.
                  Open

                  // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
                  // ---------------------------------------------------------------------------
                  // SquirrelJME
                  //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
                  // ---------------------------------------------------------------------------
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/BooleanArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/CharacterArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/DoubleArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/FloatArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/LongArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ShortArrayList.java on lines 1..148

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 312.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  Further Reading

                  Similar blocks of code found in 7 locations. Consider refactoring.
                  Open

                  // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
                  // ---------------------------------------------------------------------------
                  // SquirrelJME
                  //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
                  // ---------------------------------------------------------------------------
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ByteArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/CharacterArrayList.java on lines 1..147
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/DoubleArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/FloatArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/LongArrayList.java on lines 1..148
                  modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/ShortArrayList.java on lines 1..148

                  Duplicated Code

                  Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                  Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                  When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                  Tuning

                  This issue has a mass of 312.

                  We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                  The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                  If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                  See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                  Refactorings

                  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>
                  // ---------------------------------------------------------------------------
                    Severity
                    Category
                    Status
                    Source
                    Language