SquirrelJME/SquirrelJME

View on GitHub

Showing 195 of 203 total issues

Method runVm has 128 lines of code (exceeds 100 allowed). Consider refactoring.
Open

    @Override
    public int runVm()
        throws VMException
    {
        ProcessBuilder builder = this.builder;

    Method read has 128 lines of code (exceeds 100 allowed). Consider refactoring.
    Open

        @Override
        public int read()
            throws IOException
        {
            // Lock

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

          public final Object asVMObject(Object __in, boolean __noclassres)
          {
              // Null is converted to null
              if (__in == null)
                  return SpringNullObject.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 equals has a Cognitive Complexity of 35 (exceeds 24 allowed). Consider refactoring.
      Open

          @Override
          @ImplementationNote("This method considers if the source and target " +
              "lists are RandomAccess, for more optimized comparison.")
          public boolean equals(Object __o)
          {
      Severity: Minor
      Found in modules/cldc-compact/src/main/java/java/util/AbstractList.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

      Method putEntry has a Cognitive Complexity of 35 (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 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

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

          @Override
          public void rawData(int __jarOffset, byte[] __b, int __o, int __l)
              throws IndexOutOfBoundsException, NullPointerException
          {
              if (__b == null)
      modules/common-vm/src/main/java/cc/squirreljme/vm/DataContainerLibrary.java on lines 100..133

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

      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

          @Override
          public void rawData(int __jarOffset, byte[] __b, int __o, int __l)
              throws IllegalStateException, IndexOutOfBoundsException,
              NullPointerException
          {
      modules/common-vm/src/main/java/cc/squirreljme/vm/JarClassLibrary.java on lines 93..125

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

      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 -*-
      // ---------------------------------------------------------------------------
      // SquirrelJME
      //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
      // ---------------------------------------------------------------------------
      Severity: Major
      Found in modules/cldc/src/main/java/java/nio/FloatBuffer.java and 2 other locations - About 2 hrs to fix
      modules/cldc/src/main/java/java/nio/IntBuffer.java on lines 1..130
      modules/cldc/src/main/java/java/nio/ShortBuffer.java on lines 1..131

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

      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 -*-
      // ---------------------------------------------------------------------------
      // SquirrelJME
      //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
      // ---------------------------------------------------------------------------
      Severity: Major
      Found in modules/cldc/src/main/java/java/nio/IntBuffer.java and 2 other locations - About 2 hrs to fix
      modules/cldc/src/main/java/java/nio/FloatBuffer.java on lines 1..131
      modules/cldc/src/main/java/java/nio/ShortBuffer.java on lines 1..131

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

      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 -*-
      // ---------------------------------------------------------------------------
      // SquirrelJME
      //     Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
      // ---------------------------------------------------------------------------
      Severity: Major
      Found in modules/cldc/src/main/java/java/nio/ShortBuffer.java and 2 other locations - About 2 hrs to fix
      modules/cldc/src/main/java/java/nio/FloatBuffer.java on lines 1..131
      modules/cldc/src/main/java/java/nio/IntBuffer.java on lines 1..130

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

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

          private void __undirty()
          {
              if (!this._dirty)
                  return;
                  
      Severity: Major
      Found in modules/midp-lcdui/src/main/java/javax/microedition/lcdui/Text.java - About 2 hrs to fix

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

            @SuppressWarnings("ConditionCoveredByFurtherCondition")
            @Override
            public void run()
            {
                MidiPlayer player = this.player;

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

            @Override
            public int runVm()
                throws VMException
            {
                ProcessBuilder builder = this.builder;

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

            public boolean poll()
                throws JDWPException
            {
                // Read in any packets and process them as they come
                for (JDWPCommLink commLink = this.getCommLink();;)

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

            @Override
            public void rom(AOTSettings __aotSettings, RomSettings __settings,
                OutputStream __out, VMClassLibrary... __libs)
                throws IOException, 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 run has a Cognitive Complexity of 33 (exceeds 24 allowed). Consider refactoring.
        Open

            @Override
            public final void run()
            {
                List<TimerTask> tasks = this._tasks;
                
        Severity: Minor
        Found in modules/cldc-compact/src/main/java/java/util/__TimerThread__.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 connect has a Cognitive Complexity of 33 (exceeds 24 allowed). Consider refactoring.
        Open

            @Override
            @SquirrelJMEVendorApi
            public Connection connect(String __part, int __mode, boolean __timeouts,
                ConnectionOption<?>[] __opts)
                throws IOException, 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

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

            MODULE("modules.csv", ModuleCsvEntry.class)
            {
                /**
                 * {@inheritDoc}
                 * @since 2023/09/25
        modules/aot-nanocoat/src/main/java/cc/squirreljme/jvm/aot/nanocoat/csv/CsvType.java on lines 164..225

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

        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

            SHARED("shared.csv", SharedCsvEntry.class)
            {
                /**
                 * {@inheritDoc}
                 * @since 2023/09/25
        modules/aot-nanocoat/src/main/java/cc/squirreljme/jvm/aot/nanocoat/csv/CsvType.java on lines 100..161

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

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

            public final Object asVMObject(Object __in, boolean __noclassres)
            {
                // Null is converted to null
                if (__in == null)
                    return SpringNullObject.NULL;
          Severity
          Category
          Status
          Source
          Language