Showing 294 of 294 total issues

Method sort has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public char[] sort(char[] arr, int start, int end) {
    if (end > start) {
      if (end - start < 10) {
        return insertionSort.sort(arr, start, end);
Severity: Minor
Found in src/main/java/com/trickl/sort/QuickSort.java - About 55 mins 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 sort has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public double[] sort(double[] arr, int start, int end) {
    if (end > start) {
      if (end - start < 10) {
        return insertionSort.sort(arr, start, end);
Severity: Minor
Found in src/main/java/com/trickl/sort/QuickSort.java - About 55 mins 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 sort has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

  @Override
  public int[] sort(int[] arr, int start, int end) {
    if (end > start) {
      if (end - start < 10) {
        return insertionSort.sort(arr, start, end);
Severity: Minor
Found in src/main/java/com/trickl/sort/QuickSort.java - About 55 mins 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 select has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

      T[] S, int[] freq, int[] index, int start, int end, int k, Comparator<T> comparator) {
Severity: Major
Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 50 mins to fix

    Method cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      public char[] cycle(char[] S, int first, int second, int third, int fourth, int fifth) {
    Severity: Minor
    Found in src/main/java/com/trickl/math/ChainPermutator.java - About 45 mins to fix

      Method partitionByMedian has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

        protected int partitionByMedian(float[] S, int[] freq, int[] indices, int low, int high) {
          final int arraysize = high - low;
          float[] subList = new float[(arraysize + 4) / 5];
          int[] subListFreq = null;
          if (freq != null) {
      Severity: Minor
      Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 45 mins 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 partitionByMedian has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

        protected <T> int partitionByMedian(
            T[] S, int[] freq, int[] indices, int low, int high, Comparator<T> comparator) {
          final int arraysize = high - low;
          T[] subList = (T[]) Array.newInstance(S[0].getClass(), (arraysize + 4) / 5);
          int[] subListFreq = null;
      Severity: Minor
      Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 45 mins 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 cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

        public float[] cycle(float[] S, int first, int second, int third, int fourth, int fifth) {
      Severity: Minor
      Found in src/main/java/com/trickl/math/StandardPermutator.java - About 45 mins to fix

        Method cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

          public double[] cycle(double[] S, int first, int second, int third, int fourth, int fifth) {
        Severity: Minor
        Found in src/main/java/com/trickl/math/IntArrayPermutator.java - About 45 mins to fix

          Method cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

            int[] cycle(int[] S, int first, int second, int third, int fourth, int fifth);
          Severity: Minor
          Found in src/main/java/com/trickl/math/Permutator.java - About 45 mins to fix

            Method cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

              <T> T[] cycle(T[] S, int first, int second, int third, int fourth, int fifth);
            Severity: Minor
            Found in src/main/java/com/trickl/math/Permutator.java - About 45 mins to fix

              Method cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                public int[] cycle(int[] S, int first, int second, int third, int fourth, int fifth) {
              Severity: Minor
              Found in src/main/java/com/trickl/math/ChainPermutator.java - About 45 mins to fix

                Method select has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                  protected int select(short[] S, int[] freq, int[] index, int start, int end, int k) {
                Severity: Minor
                Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 45 mins to fix

                  Method partitionByMedian has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                    protected int partitionByMedian(double[] S, int[] freq, int[] indices, int low, int high) {
                      final int arraysize = high - low;
                      double[] subList = new double[(arraysize + 4) / 5];
                      int[] subListFreq = null;
                      if (freq != null) {
                  Severity: Minor
                  Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 45 mins 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 cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    public <T> T[] cycle(T[] S, int first, int second, int third, int fourth, int fifth) {
                  Severity: Minor
                  Found in src/main/java/com/trickl/math/StandardPermutator.java - About 45 mins to fix

                    Method cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                      public short[] cycle(short[] S, int first, int second, int third, int fourth, int fifth) {
                    Severity: Minor
                    Found in src/main/java/com/trickl/math/IntArrayPermutator.java - About 45 mins to fix

                      Method cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        public double[] cycle(double[] S, int first, int second, int third, int fourth, int fifth) {
                      Severity: Minor
                      Found in src/main/java/com/trickl/math/ChainPermutator.java - About 45 mins to fix

                        Method cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          public short[] cycle(short[] S, int first, int second, int third, int fourth, int fifth) {
                        Severity: Minor
                        Found in src/main/java/com/trickl/math/StandardPermutator.java - About 45 mins to fix

                          Method cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            public float[] cycle(float[] S, int first, int second, int third, int fourth, int fifth) {
                          Severity: Minor
                          Found in src/main/java/com/trickl/math/IntArrayPermutator.java - About 45 mins to fix

                            Method cycle has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              char[] cycle(char[] S, int first, int second, int third, int fourth, int fifth);
                            Severity: Minor
                            Found in src/main/java/com/trickl/math/Permutator.java - About 45 mins to fix
                              Severity
                              Category
                              Status
                              Source
                              Language