SquirrelJME/SquirrelJME

View on GitHub
emulators/springcoat-vm/src/main/java/cc/squirreljme/vm/springcoat/SpringThreadWorker.java

Summary

Maintainability
F
2 wks
Test Coverage

Method __singleStep has 1360 lines of code (exceeds 100 allowed). Consider refactoring.
Open

    private strictfp void __singleStep()
    {
        // Need the current frame and its byte code
        SpringThread thread = this.thread;
        

    File SpringThreadWorker.java has 2461 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 __singleStep has a Cognitive Complexity of 215 (exceeds 24 allowed). Consider refactoring.
      Open

          private strictfp void __singleStep()
          {
              // Need the current frame and its byte code
              SpringThread thread = this.thread;
              

      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 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 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;

        Consider simplifying this complex logical expression.
        Open

                else if (__in instanceof boolean[] ||
                    __in instanceof byte[] ||
                    __in instanceof short[] ||
                    __in instanceof char[] ||
                    __in instanceof int[] ||

          There are no issues that match your filters.

          Category
          Status