Method processIndexWithOffset
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
private static List<Integer> processIndexWithOffset(final String[] indexArray, final int offset, final int startIndex, final int endIndex) {
final List<Integer> indexList = new ArrayList<>();
String[] range;
if (indexArray != null) {
for (String index : indexArray) {
- 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 compareNumericValue
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static boolean compareNumericValue(double value1, double value2, final String operator) {
boolean result = false;
switch (operator) {
case "==":
if (value1 == value2) result = true;
- 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 processIndex
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static List<Integer> processIndex(final String index) {
final List<Integer> result = new ArrayList<>();
final String[] temp = index.split(",");
String[] tempArray;
- 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 validateIndex
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static List<Integer> validateIndex(final List<Integer> indexList,
final int firstIndex,
final int lastIndex,
final boolean isRow) throws Exception {
final List<Integer> resultList = new ArrayList<>();
- 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 getCellType
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static String getCellType(final Cell cell) {
final String result;
final double cellValueNumeric;
final CellType cellType = cell.getCellType();
- 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 processIndex
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
public static List<Integer> processIndex(final String index, final Sheet worksheet, final String rowData, final String rowDelimiter,
final String columnDelimiter, final boolean isRow, final boolean hasHeader) {
Method compareStringValue
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static boolean compareStringValue(final String s1, final String s2, final String operator) {
boolean result = false;
if (operator.equals("==")) {
if (s1.equals(s2))
result = true;
- 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 getLastColumnIndex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static int getLastColumnIndex(final Sheet worksheet, final int firstRowIndex, final int lastRowIndex) {
//get the last column index in a sheet
int tempLastColumnIndex;
int lastColumnIndex = 0;
for (int i = firstRowIndex; i <= lastRowIndex; i++) {
- 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"