src/main/java/com/trickl/selection/MedianOfMedians.java

Summary

Maintainability
F
1 wk
Test Coverage

File MedianOfMedians.java has 420 lines of code (exceeds 250 allowed). Consider refactoring.
Open

package com.trickl.selection;

import com.trickl.math.ChainPermutator;
import com.trickl.math.IntArrayPermutator;
import com.trickl.math.Permutator;
Severity: Minor
Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 6 hrs to fix

    MedianOfMedians has 23 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class MedianOfMedians implements SelectionAlgorithm {
    
      private static final QuickSort sorter = new QuickSort();
      private static final FiveElementSort fiveElementIndexPairedSorter = new FiveElementSort();
      private static final QuickSort indexPairedSorter = new QuickSort();
    Severity: Minor
    Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 2 hrs to fix

      Method select has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

        protected <T> int select(
            T[] S, int[] freq, int[] index, int start, int end, int k, Comparator<T> comparator) {
      
          if (end == (start + 1)) {
            return start;
      Severity: Minor
      Found in src/main/java/com/trickl/selection/MedianOfMedians.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 select has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

        protected int select(double[] S, int[] freq, int[] index, int start, int end, int k) {
      
          if (end == (start + 1)) {
            return start;
          } else {
      Severity: Minor
      Found in src/main/java/com/trickl/selection/MedianOfMedians.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 select has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

        protected int select(char[] S, int[] freq, int[] index, int start, int end, int k) {
      
          if (end == (start + 1)) {
            return start;
          } else {
      Severity: Minor
      Found in src/main/java/com/trickl/selection/MedianOfMedians.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 select has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

        protected int select(short[] S, int[] freq, int[] index, int start, int end, int k) {
      
          if (end == (start + 1)) {
            return start;
          } else {
      Severity: Minor
      Found in src/main/java/com/trickl/selection/MedianOfMedians.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 select has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

        protected int select(float[] S, int[] freq, int[] index, int start, int end, int k) {
      
          if (end == (start + 1)) {
            return start;
          } else {
      Severity: Minor
      Found in src/main/java/com/trickl/selection/MedianOfMedians.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 select has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
      Open

        protected int select(int[] S, int[] freq, int[] index, int start, int end, int k) {
      
          if (end == (start + 1)) {
            return start;
          } else {
      Severity: Minor
      Found in src/main/java/com/trickl/selection/MedianOfMedians.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 partitionByMedian has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        protected int partitionByMedian(char[] S, int[] freq, int[] indices, int low, int high) {
          final int arraysize = high - low;
          char[] subList = new char[(arraysize + 4) / 5];
          int[] subListFreq = null;
          if (freq != null) {
      Severity: Minor
      Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 1 hr to fix

        Method partitionByMedian has 28 lines of code (exceeds 25 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 1 hr to fix

          Method partitionByMedian has 28 lines of code (exceeds 25 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 1 hr to fix

            Method partitionByMedian has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              protected int partitionByMedian(int[] S, int[] freq, int[] indices, int low, int high) {
                final int arraysize = high - low;
                int[] subList = new int[(arraysize + 4) / 5];
                int[] subListFreq = null;
                if (freq != null) {
            Severity: Minor
            Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 1 hr to fix

              Method partitionByMedian has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                protected int partitionByMedian(short[] S, int[] freq, int[] indices, int low, int high) {
                  final int arraysize = high - low;
                  short[] subList = new short[(arraysize + 4) / 5];
                  int[] subListFreq = null;
                  if (freq != null) {
              Severity: Minor
              Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 1 hr to fix

                Method partitionByMedian has 28 lines of code (exceeds 25 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 1 hr to fix

                  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 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(short[] S, int[] freq, int[] indices, int low, int high) {
                          final int arraysize = high - low;
                          short[] subList = new short[(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 select has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                        protected int select(int[] 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 select has 6 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                          public <T> int select(T[] S, int[] freq, int start, int end, int k, Comparator<T> comparator) {
                        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(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 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 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 select has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                            protected int select(double[] 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(int[] S, int[] freq, int[] indices, int low, int high) {
                                final int arraysize = high - low;
                                int[] subList = new int[(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 select has 6 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                              protected int select(char[] 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(char[] S, int[] freq, int[] indices, int low, int high) {
                                  final int arraysize = high - low;
                                  char[] subList = new char[(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 6 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                    T[] S, int[] freq, int[] indices, int low, int high, Comparator<T> comparator) {
                              Severity: Minor
                              Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 45 mins to fix

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

                                  protected int select(float[] 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 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                    protected int partitionByMedian(int[] S, int[] freq, int[] indices, int low, int high) {
                                  Severity: Minor
                                  Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 35 mins to fix

                                    Method partitionByMedian has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                      protected int partitionByMedian(float[] S, int[] freq, int[] indices, int low, int high) {
                                    Severity: Minor
                                    Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 35 mins to fix

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

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

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

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

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

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

                                            Method partitionByMedian has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                            Open

                                              protected int partitionByMedian(short[] S, int[] freq, int[] indices, int low, int high) {
                                            Severity: Minor
                                            Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 35 mins to fix

                                              Method partitionByMedian has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                protected int partitionByMedian(char[] S, int[] freq, int[] indices, int low, int high) {
                                              Severity: Minor
                                              Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 35 mins to fix

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

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

                                                  Method partitionByMedian has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                    protected int partitionByMedian(double[] S, int[] freq, int[] indices, int low, int high) {
                                                  Severity: Minor
                                                  Found in src/main/java/com/trickl/selection/MedianOfMedians.java - About 35 mins to fix

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

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

                                                      Similar blocks of code found in 5 locations. 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: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 5 hrs to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 351..387
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 400..436
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 449..485
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 547..583

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

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

                                                        protected int partitionByMedian(int[] S, int[] freq, int[] indices, int low, int high) {
                                                          final int arraysize = high - low;
                                                          int[] subList = new int[(arraysize + 4) / 5];
                                                          int[] subListFreq = null;
                                                          if (freq != null) {
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 5 hrs to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 351..387
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 400..436
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 449..485
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 498..534

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

                                                      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 5 locations. 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: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 5 hrs to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 351..387
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 400..436
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 498..534
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 547..583

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

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

                                                        protected int partitionByMedian(short[] S, int[] freq, int[] indices, int low, int high) {
                                                          final int arraysize = high - low;
                                                          short[] subList = new short[(arraysize + 4) / 5];
                                                          int[] subListFreq = null;
                                                          if (freq != null) {
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 5 hrs to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 351..387
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 449..485
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 498..534
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 547..583

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

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

                                                        protected int partitionByMedian(char[] S, int[] freq, int[] indices, int low, int high) {
                                                          final int arraysize = high - low;
                                                          char[] subList = new char[(arraysize + 4) / 5];
                                                          int[] subListFreq = null;
                                                          if (freq != null) {
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 5 hrs to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 400..436
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 449..485
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 498..534
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 547..583

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

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

                                                        protected int select(float[] S, int[] freq, int[] index, int start, int end, int k) {
                                                      
                                                          if (end == (start + 1)) {
                                                            return start;
                                                          } else {
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 3 hrs to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 58..79
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 109..130
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 160..181
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 262..283

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

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

                                                        protected int select(int[] S, int[] freq, int[] index, int start, int end, int k) {
                                                      
                                                          if (end == (start + 1)) {
                                                            return start;
                                                          } else {
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 3 hrs to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 58..79
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 109..130
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 160..181
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 211..232

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

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

                                                        protected int select(char[] S, int[] freq, int[] index, int start, int end, int k) {
                                                      
                                                          if (end == (start + 1)) {
                                                            return start;
                                                          } else {
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 3 hrs to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 109..130
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 160..181
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 211..232
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 262..283

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

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

                                                        protected int select(short[] S, int[] freq, int[] index, int start, int end, int k) {
                                                      
                                                          if (end == (start + 1)) {
                                                            return start;
                                                          } else {
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 3 hrs to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 58..79
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 160..181
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 211..232
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 262..283

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

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

                                                        protected int select(double[] S, int[] freq, int[] index, int start, int end, int k) {
                                                      
                                                          if (end == (start + 1)) {
                                                            return start;
                                                          } else {
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 3 hrs to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 58..79
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 109..130
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 211..232
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 262..283

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

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

                                                        @Override
                                                        public int select(char[] S, int[] freq, int start, int end, int k) {
                                                          // Non-destructive selection
                                                          char[] copyS = Arrays.copyOf(S, S.length);
                                                          int[] index = new int[S.length];
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 1 hr to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 86..96
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 137..147
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 188..198
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 239..249

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

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

                                                        @Override
                                                        public int select(int[] S, int[] freq, int start, int end, int k) {
                                                          // Non-destructive selection
                                                          int[] copyS = Arrays.copyOf(S, S.length);
                                                          int[] index = new int[S.length];
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 1 hr to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 35..45
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 86..96
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 137..147
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 188..198

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

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

                                                        @Override
                                                        public int select(float[] S, int[] freq, int start, int end, int k) {
                                                          // Non-destructive selection
                                                          float[] copyS = Arrays.copyOf(S, S.length);
                                                          int[] index = new int[S.length];
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 1 hr to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 35..45
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 86..96
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 137..147
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 239..249

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

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

                                                        @Override
                                                        public int select(double[] S, int[] freq, int start, int end, int k) {
                                                          // Non-destructive selection
                                                          double[] copyS = Arrays.copyOf(S, S.length);
                                                          int[] index = new int[S.length];
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 1 hr to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 35..45
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 86..96
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 188..198
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 239..249

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

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

                                                        @Override
                                                        public int select(short[] S, int[] freq, int start, int end, int k) {
                                                          // Non-destructive selection
                                                          short[] copyS = Arrays.copyOf(S, S.length);
                                                          int[] index = new int[S.length];
                                                      Severity: Major
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 4 other locations - About 1 hr to fix
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 35..45
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 137..147
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 188..198
                                                      src/main/java/com/trickl/selection/MedianOfMedians.java on lines 239..249

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

                                                      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

                                                        private int accumulate(int[] freq, int first, int last) {
                                                          int freqSum = 0;
                                                          for (int i = first; i < last; ++i) {
                                                            freqSum += freq[i];
                                                          }
                                                      Severity: Minor
                                                      Found in src/main/java/com/trickl/selection/MedianOfMedians.java and 1 other location - About 40 mins to fix
                                                      src/main/java/com/trickl/selection/Selection.java on lines 535..541

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

                                                      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

                                                      There are no issues that match your filters.

                                                      Category
                                                      Status