SquirrelJME/SquirrelJME

View on GitHub

Showing 164 of 178 total issues

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/IntegerArrayList.java on lines 1..147
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 298.

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/IntegerArrayList.java on lines 1..147
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 298.

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/IntegerArrayList.java on lines 1..147
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 298.

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/DoubleArrayList.java on lines 1..148
modules/cldc-compact/src/main/java/cc/squirreljme/runtime/cldc/util/IntegerArrayList.java on lines 1..147
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 298.

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

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/IntegerArrayList.java on lines 1..147
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 298.

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/IntegerArrayList.java on lines 1..147
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 298.

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

// -*- 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/UnmodifiableArrayIterator.java on lines 1..143

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

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

// -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
// ---------------------------------------------------------------------------
// SquirrelJME
//     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
// ---------------------------------------------------------------------------
modules/collections/src/main/java/net/multiphasicapps/collections/UnmodifiableArrayIterator.java on lines 1..143

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

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

    public final __BucketMapEntry__<K, V> putEntry(K __k)
    {
        __BucketMapEntry__<K, V>[][] buckets = this._buckets;
        int bucketdiv = this._bucketdiv;
        
Severity: Minor
Found in modules/cldc-compact/src/main/java/java/util/__BucketMap__.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

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

    @Deprecated
    public static MinimizedPool decode(int __n, byte[] __is, int __o,
        int __l)
        throws IndexOutOfBoundsException, InvalidClassFormatException,
            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

Method main has 150 lines of code (exceeds 100 allowed). Consider refactoring.
Open

    public static void main(String... __args)
    {
        // Poke the VM to initialize some probably important parts of it
        Poking.poke();
        

    Method minimize has 149 lines of code (exceeds 100 allowed). Consider refactoring.
    Open

        public static void minimize(OutputStream __os, String __boot,
            String[] __initcp, String __mainbc, boolean __ismid,
            VMClassLibrary... __libs)
            throws IOException, NullPointerException
        {

      Method __process has 145 lines of code (exceeds 100 allowed). Consider refactoring.
      Open

          private final void __process(OutputStream __sout)
              throws IOException, NullPointerException
          {
              if (__sout == null)
                  throw new NullPointerException("NARG");

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

            public final int infoPointer()
            {
                // If it has already been initialized use it
                int rv = this._classdata;
                if (rv >= 0)

        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 JavaStackState.java has 879 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>
        // ---------------------------------------------------------------------------

          NearNativeByteCodeHandler has 69 methods (exceeds 65 allowed). Consider refactoring.
          Open

          public final class NearNativeByteCodeHandler
              implements ByteCodeHandler
          {
              /** The jvm functions class. */
              @Deprecated

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

                public ZipStreamEntry nextEntry()
                    throws IOException
                {
                    // {@squirreljme.error BF0z An entry is currently being read, it
                    // must first be closed.}

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