File EntityUtil.java
has 1097 lines of code (exceeds 250 allowed). Consider refactoring. Open
package de.uniks.networkparser;
import java.io.File;
/*
NetworkParser
Method compareEntity
has a Cognitive Complexity of 85 (exceeds 5 allowed). Consider refactoring. Open
public static final boolean compareEntity(Object entityA, Object entityB, TextDiff diffList, BaseItem sameObject) {
if (sameObject == null) {
if (entityA instanceof Entity) {
sameObject = ((BaseItem) entityA).getNewList(true);
} else if (entityB instanceof Entity) {
- 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
EntityUtil
has 60 methods (exceeds 20 allowed). Consider refactoring. Open
public class EntityUtil {
public static final String CLASS = "class";
public static final String NON_FILE_CHARSSIMPLE = "[\\\\/\\:\\;\\*\\?\"<>\\|!&', \u001F\u0084\u0093\u0094\u0096\u2013\u201E\u201C\u03B1 ]";
public static final String emfTypes = " EOBJECT EBIG_DECIMAL EBOOLEAN EBYTE EBYTE_ARRAY ECHAR EDATE EDOUBLE EFLOAT EINT EINTEGER ELONG EMAP ERESOURCE ESHORT ESTRING ";
/**
Method getStringType
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
public static final String getStringType(byte type) {
if (type == ByteTokener.DATATYPE_NULL) {
return "DATATYPE_NULL";
}
if (type == ByteTokener.DATATYPE_FIXED) {
- 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 compareEntity
has 118 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final boolean compareEntity(Object entityA, Object entityB, TextDiff diffList, BaseItem sameObject) {
if (sameObject == null) {
if (entityA instanceof Entity) {
sameObject = ((BaseItem) entityA).getNewList(true);
} else if (entityB instanceof Entity) {
Method getStringType
has 91 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final String getStringType(byte type) {
if (type == ByteTokener.DATATYPE_NULL) {
return "DATATYPE_NULL";
}
if (type == ByteTokener.DATATYPE_FIXED) {
Method decode
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
public static String decode(String str) {
if (str == null) {
return null;
}
StringBuilder buf = new StringBuilder();
- 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 containsAny
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
public static final boolean containsAny(CharSequence cs, char[] searchChars) {
if (isEmpty(cs) || searchChars == null || searchChars.length == 0) {
return false;
}
- 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 writeByteHeader
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
public static final void writeByteHeader(ByteBuffer buffer, byte type, int valueLength) {
if (buffer == null) {
return;
}
if (valueLength > 0) {
- 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
Consider simplifying this complex logical expression. Open
if (object instanceof AbstractArray || object instanceof Byte || object instanceof Character
|| object instanceof Short || object instanceof Integer || object instanceof Long
|| object instanceof Boolean || object instanceof Float || object instanceof Double
|| object instanceof String) {
return object;
Method unQuote
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
public static final String unQuote(CharSequence value) {
if (value == null || value.length() == 0) {
return "";
}
StringBuilder sb = new StringBuilder(value.length());
- 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 compareValue
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
protected static final Object compareValue(String key, Object valueA, Object valueB, TextDiff diffList,
BaseItem sameElement) {
BaseItem sameObject = null;
if (diffList == null) {
return null;
- 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 getValidChars
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static final String getValidChars(String source, int maxLen) {
if (source == null) {
return null;
}
int i = source.length() - 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 getType
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static final byte getType(byte type, int len, boolean isLast) {
if (isGroup(type)) {
if (isLast) {
return getType(type, ByteTokener.LEN_LAST);
}
- 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 valueToString
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
public static final String valueToString(Object value, boolean simpleText, BaseItem reference,
Converter converter) {
if (value == null) {
return "null";
}
- 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 isValidJavaId
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static boolean isValidJavaId(String myRoleName) {
if (myRoleName == null || isModifier(myRoleName)) {
return false;
}
if (myRoleName.endsWith(".") || myRoleName.startsWith(".")) {
- 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 quote
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
public static final String quote(String string) {
if (string == null || string.length() == 0) {
return "\"\"";
}
- 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 valueToString
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final String valueToString(Object value, boolean simpleText, BaseItem reference,
Converter converter) {
if (value == null) {
return "null";
}
Method decode
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static String decode(String str) {
if (str == null) {
return null;
}
StringBuilder buf = new StringBuilder();
Method getRelativePath
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static String getRelativePath(String targetPath, String basePath, String separator) {
if (targetPath == null || basePath == null) {
return null;
}
String[] base = basePath.split(separator);
- 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 getTypeLen
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static final int getTypeLen(byte type, int len, boolean isLast) {
if (isGroup(type)) {
int ref = type % 16 - 10;
if (ref == 0) {
type = getType(type, len, isLast);
- 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 getDefaultValue
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static final String getDefaultValue(String datatype) {
if (EntityUtil.isNumericType(datatype)) {
if ("Long".equals(datatype)) {
return "0L";
} else if ("Float".equals(datatype)) {
- 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 basicUnQuote
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
public static final String basicUnQuote(String value) {
if (value == null || value.length() == 0) {
return "";
}
StringBuilder sb = new StringBuilder(value.length());
- 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 unQuote
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final String unQuote(CharSequence value) {
if (value == null || value.length() == 0) {
return "";
}
StringBuilder sb = new StringBuilder(value.length());
Method compareValue
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected static final Object compareValue(String key, Object valueA, Object valueB, TextDiff diffList,
BaseItem sameElement) {
BaseItem sameObject = null;
if (diffList == null) {
return null;
Method getRelativePath
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static String getRelativePath(String targetPath, String basePath, String separator) {
if (targetPath == null || basePath == null) {
return null;
}
String[] base = basePath.split(separator);
Method getValidChars
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final String getValidChars(String source, int maxLen) {
if (source == null) {
return null;
}
int i = source.length() - 1;
Method quote
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final String quote(String string) {
if (string == null || string.length() == 0) {
return "\"\"";
}
Method getPath
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
public static String getPath(String path, String separator) {
if (path == null) {
return null;
}
String[] base = path.split(separator);
- 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 replaceAll
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static final CharacterBuffer replaceAll(String text, Object... args) {
CharacterBuffer value = new CharacterBuffer().with(text);
if (args == null || args[0] == null) {
return value;
}
Method wrap
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static final Object wrap(Object object, BaseItem reference) {
try {
if (object == null) {
return null;
}
- 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 encode
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public static String encode(String str) {
if (str == null) {
return "";
}
StringBuilder buf = new StringBuilder(); /* the output string buffer */
- 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 replaceAll
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final CharacterBuffer replaceAll(String text, Object... args) {
CharacterBuffer value = new CharacterBuffer().with(text);
if (args == null || args[0] == null) {
return value;
}
- 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
Avoid deeply nested control flow statements. Open
if (sameObject != null) {
sameObject.add(key, oldValue);
}
Avoid deeply nested control flow statements. Open
if (i < csLast && searchChars[j + 1] == cs.charAt(i + 1)) {
return true;
}
Avoid deeply nested control flow statements. Open
if (type == ByteTokener.DATATYPE_CLAZZNAME || getSubGroup(type) == ByteTokener.LEN_LITTLE) {
buffer.put((byte) (valueLength + ByteTokener.SPLITTER));
} else {
buffer.put((byte) valueLength);
}
Method getExcelRange
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final SimpleList<Pos> getExcelRange(String tag) {
SimpleList<Pos> range = new SimpleList<Pos>();
if (tag == null) {
return range;
}
- 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
Avoid deeply nested control flow statements. Open
if (j == searchLast) {
/* missing low surrogate, fine, like String.indexOf(String) */
return true;
}
Method doubleToString
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public static final String doubleToString(double d) {
if (Double.isInfinite(d) || Double.isNaN(d)) {
return "null";
}
/* Shave off trailing zeros and decimal point, if possible. */
- 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 compareValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
protected static final Object compareValue(String key, Object valueA, Object valueB, TextDiff diffList,
BaseItem sameElement) {
Method valueToString
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
public static final String valueToString(Number number) {
if (number == null) {
return "";
}
/* Shave off trailing zeros and decimal point, if possible. */
- 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
Avoid too many return
statements within this method. Open
return ((BaseItem) item).toString(converter);
Avoid too many return
statements within this method. Open
return item.toString(converter);
Avoid too many return
statements within this method. Open
return value.toString();
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return "DATATYPE_CLAZZTYPELONG";
Avoid too many return
statements within this method. Open
return datatype.substring(0, datatype.length() - 2);
Avoid too many return
statements within this method. Open
return object.toString();
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return ((XMLEntity) xmlA).getTag().equals(((XMLEntity) xmlB).getTag());
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return "DATATYPE_ASSOC";
Avoid too many return
statements within this method. Open
return "DATATYPE_CLAZZNAME";
Avoid too many return
statements within this method. Open
return "DATATYPE_CLAZZSTREAM";
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return "DATATYPE_CLAZZID";
Avoid too many return
statements within this method. Open
return datatype.substring(0, datatype.length() - 3);
Avoid too many return
statements within this method. Open
return "DATATYPE_DOUBLE";
Avoid too many return
statements within this method. Open
return "DATATYPE_DATE";
Avoid too many return
statements within this method. Open
return "DATATYPE_UNSIGNEDBYTE";
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return 0;
Avoid too many return
statements within this method. Open
return "DATATYPE_ASSOCLONG";
Avoid too many return
statements within this method. Open
return result;
Avoid too many return
statements within this method. Open
return "null";
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return "DATATYPE_FLOAT";
Avoid too many return
statements within this method. Open
return true;
Avoid too many return
statements within this method. Open
return 1;
Avoid too many return
statements within this method. Open
return false;
Avoid too many return
statements within this method. Open
return valueA;
Avoid too many return
statements within this method. Open
return type;
Avoid too many return
statements within this method. Open
return ((XMLEntity) xmlA).getTag().equals(((XMLEntity) xmlB).getTag());
Avoid too many return
statements within this method. Open
return "DATATYPE_LONG";
Avoid too many return
statements within this method. Open
return getType(type, ByteTokener.LEN_LITTLE);
Avoid too many return
statements within this method. Open
return 4;
Avoid too many return
statements within this method. Open
return "DATATYPE_CHAR";
Avoid too many return
statements within this method. Open
return quote(new String((byte[]) value));
Avoid too many return
statements within this method. Open
return "false";
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return "DATATYPE_CLAZZTYPE";
Avoid too many return
statements within this method. Open
return "DATATYPE_BYTE";
Avoid too many return
statements within this method. Open
return ((SimpleKeyValueList<?, ?>) reference.getNewList(false)).withMap((Map<?, ?>) object);
Avoid too many return
statements within this method. Open
return colectionA.size() < 1 && colectionB.size() < 1;
Avoid too many return
statements within this method. Open
return null;
Avoid too many return
statements within this method. Open
return item.toString(converter);
Avoid too many return
statements within this method. Open
return quote(value.toString());
Avoid too many return
statements within this method. Open
return "DATATYPE_CLAZZNAMELONG";
Avoid too many return
statements within this method. Open
return "void";
Avoid too many return
statements within this method. Open
return "DATATYPE_CLAZZPACKAGE";
Method strZero
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static final String strZero(String value, int length, int max) {
if (max > 0 && max < length) {
length = max;
}
if (value == null) {
- 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 isNumericTypeContainer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public static final boolean isNumericTypeContainer(String typeA, String typeB) {
if (typeA == null || typeB == null) {
return typeA == typeB;
}
if (typeA.startsWith(javaLang)) {
- 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"