SquirrelJME/SquirrelJME

View on GitHub

Showing 195 of 203 total issues

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

    @Api
    public static int parseInt(String __v, int __r)
        throws NumberFormatException
    {
        /* {@squirreljme.error ZZ19 The radix is out of bounds. (The radix)} */
Severity: Major
Found in modules/cldc-compact/src/main/java/java/lang/Integer.java and 1 other location - About 3 hrs to fix
modules/cldc-compact/src/main/java/java/lang/Long.java on lines 256..308

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 305.

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 2 locations. Consider refactoring.
Open

    @Api
    public static long parseLong(String __v, int __radix)
        throws NumberFormatException
    {
        /* {@squirreljme.error ZZ25 The radix is out of bounds. (The radix)} */
Severity: Major
Found in modules/cldc-compact/src/main/java/java/lang/Long.java and 1 other location - About 3 hrs to fix
modules/cldc-compact/src/main/java/java/lang/Integer.java on lines 481..533

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 305.

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

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 == '|' ||

          Method sqrt has a Cognitive Complexity of 38 (exceeds 24 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;

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

              @Override
              public ZipStreamEntry nextEntry()
                  throws IOException
              {
                  /* {@squirreljme.error BF0z An entry is currently being read, it

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

              private boolean __context(JDWPHostController __controller, Object __thread,
                  JDWPEventModifierContext __context, Object __on, Object[] __ensnare)
                  throws NullPointerException
              {
                  if (__controller == null || __context == null)

            Method byteToChar has 137 lines of code (exceeds 100 allowed). Consider refactoring.
            Open

                public static char byteToChar(int __b)
                    throws IllegalArgumentException
                {
                    /* {@squirreljme.error BF01 Byte index is not within bounds.
                    (The byte)} */
            Severity: Major
            Found in modules/zip/src/main/java/net/multiphasicapps/zip/IBM437CodePage.java - About 2 hrs to fix

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

                  @SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
                  public JDWPPacket poll()
                      throws JDWPException
                  {
                      // If the handshake did not happen, do it now

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

                  @Override
                  public int read(byte[] __b, int __o, int __l)
                      throws IndexOutOfBoundsException, IOException, NullPointerException
                  {
                      // Check
              Severity: Minor
              Found in modules/io/src/main/java/net/multiphasicapps/io/ZLibDecompressor.java - About 2 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 3 locations. Consider refactoring.
              Open

              // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
              // ---------------------------------------------------------------------------
              // Multi-Phasic Applications: SquirrelJME
              //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
              // ---------------------------------------------------------------------------
              modules/aot-nanocoat/src/main/java/cc/squirreljme/jvm/aot/nanocoat/csv/ClassCsvEntry.java on lines 1..102
              modules/aot-nanocoat/src/main/java/cc/squirreljme/jvm/aot/nanocoat/csv/ModuleCsvEntry.java on lines 1..101

              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 225.

              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 3 locations. Consider refactoring.
              Open

              // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
              // ---------------------------------------------------------------------------
              // Multi-Phasic Applications: SquirrelJME
              //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
              // ---------------------------------------------------------------------------
              modules/aot-nanocoat/src/main/java/cc/squirreljme/jvm/aot/nanocoat/csv/ClassCsvEntry.java on lines 1..102
              modules/aot-nanocoat/src/main/java/cc/squirreljme/jvm/aot/nanocoat/csv/SharedCsvEntry.java on lines 1..101

              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 225.

              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 3 locations. Consider refactoring.
              Open

              // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
              // ---------------------------------------------------------------------------
              // Multi-Phasic Applications: SquirrelJME
              //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
              // ---------------------------------------------------------------------------
              modules/aot-nanocoat/src/main/java/cc/squirreljme/jvm/aot/nanocoat/csv/ModuleCsvEntry.java on lines 1..101
              modules/aot-nanocoat/src/main/java/cc/squirreljme/jvm/aot/nanocoat/csv/SharedCsvEntry.java on lines 1..101

              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 225.

              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

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                  LINE_BLEND_NODOT
                  {
                      /**
                       * {@inheritDoc}
                       * @since 2019/03/24
              modules/midp-lcdui/src/main/java/cc/squirreljme/runtime/lcdui/gfx/AdvancedFunction.java on lines 348..386

              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 220.

              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

              Identical blocks of code found in 2 locations. Consider refactoring.
              Open

                  LINE_BLEND_DOT
                  {
                      /**
                       * {@inheritDoc}
                       * @since 2019/03/24
              modules/midp-lcdui/src/main/java/cc/squirreljme/runtime/lcdui/gfx/AdvancedFunction.java on lines 307..345

              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 220.

              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

              Severity
              Category
              Status
              Source
              Language