Showing 147 of 294 total issues
Method selectFirst
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static <T> int[] selectFirst(
double[] S, int[] freq, int k, SelectionAlgorithm selectionAlgorithm) {
int[] results = new int[k];
if (k > 0) {
if (k == 1) {
- Read upRead up
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 selectFirst
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static <T> int[] selectFirst(
short[] S, int[] freq, int k, SelectionAlgorithm selectionAlgorithm) {
int[] results = new int[k];
if (k > 0) {
if (k == 1) {
- Read upRead up
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 selectFirst
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static <T> int[] selectFirst(
float[] S, int[] freq, int k, SelectionAlgorithm selectionAlgorithm) {
int[] results = new int[k];
if (k > 0) {
if (k == 1) {
- Read upRead up
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 selectFirst
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
public static <T> int[] selectFirst(
int[] S, int[] freq, int k, SelectionAlgorithm selectionAlgorithm) {
int[] results = new int[k];
if (k > 0) {
if (k == 1) {
- Read upRead up
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 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public <T> T[] sort(T[] arr, int start, int end, Comparator<T> comparator) {
if (comparator == null) {
comparator = naturalOrderingComparator;
}
Method sort
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public short[] sort(short[] arr, int start, int end) {
int i0 = start;
int i1 = start + 1;
int i2 = start + 2;
Method sort
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public double[] sort(double[] arr, int start, int end) {
int i0 = start;
int i1 = start + 1;
int i2 = start + 2;
Method sort
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public int[] sort(int[] arr, int start, int end) {
int i0 = start;
int i1 = start + 1;
int i2 = start + 2;
Method sort
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public float[] sort(float[] arr, int start, int end) {
int i0 = start;
int i1 = start + 1;
int i2 = start + 2;
Method sort
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
@Override
public char[] sort(char[] arr, int start, int end) {
int i0 = start;
int i1 = start + 1;
int i2 = start + 2;
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();
File IntArrayPermutator.java
has 254 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* This file is part of the Trickl Open Source Libraries.
*
* Trickl Open Source Libraries - http://open.trickl.com/
*
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;
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 {
- Read upRead up
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 medianOf3
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private int medianOf3(short[] arr, int a, int b, int c) {
return (arr[a] < arr[b]
? (arr[b] < arr[c] ? b : arr[a] < arr[c] ? c : a)
: (arr[b] > arr[c] ? b : arr[a] > arr[c] ? c : a));
}
- Read upRead up
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 medianOf3
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
private int medianOf3(double[] arr, int a, int b, int c) {
return (arr[a] < arr[b]
? (arr[b] < arr[c] ? b : arr[a] < arr[c] ? c : a)
: (arr[b] > arr[c] ? b : arr[a] > arr[c] ? c : a));
}
- Read upRead up
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"