Showing 4,841 of 7,782 total issues
Avoid deeply nested control flow statements. Open
while (f < (i + 4) && f < max) {
final char cf = text.charAt(f);
if (!((cf >= '0' && cf <= '9') || (cf >= 'A' && cf <= 'F') || (cf >= 'a' && cf <= 'f'))) {
break;
}
Avoid deeply nested control flow statements. Open
while (f < (i + 4) && f < max) {
final char cf = text[f];
if (!((cf >= '0' && cf <= '9') || (cf >= 'A' && cf <= 'F') || (cf >= 'a' && cf <= 'f'))) {
break;
}
Method writeObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private synchronized void writeObject(ObjectOutputStream s)
throws IOException {
s.defaultWriteObject();
if (_m == 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 match
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static
Method match(Class<?> cls, String name, Object[] args, boolean loosely) {
final Method[] ms = cls.getMethods();
for (int j = 0; j < ms.length; ++j) {
if (!ms[j].getName().equals(name)
- 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 ((f - (i + 2)) < 2) {
// We weren't able to consume the required two hexa chars, leave it as slash+'x', which
// is invalid, and let the corresponding JavaScript engine fail.
i++;
continue;
Avoid deeply nested control flow statements. Open
if (node instanceof Element) {
eOther = (Element) node;
break;
}
Method nextSeparator
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
public static int nextSeparator(String src, int from, char[] separators,
boolean escBackslash, boolean escQuot, boolean quotAsSeparator) {
Method escape
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
static void escape(final char[] text, final int offset, final int len, final Writer writer,
final JavaScriptEscapeType escapeType, final JavaScriptEscapeLevel escapeLevel)
Method importClass
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public void importClass(String name) throws org.zkoss.zel.ELException {
if (!name.contains(".")) {
throw new ELException(Util.message(
null, "importHandler.invalidClassName", name));
}
- 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 coerce
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
private static final int coerce(Object property) {
if (property instanceof Number) {
return ((Number) property).intValue();
}
if (property instanceof Character) {
- 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 (kind > 10)
kind = 10;
Method isReadOnly
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
public boolean isReadOnly(ELContext context, Object base, Object property) {
if (context == null) {
throw new NullPointerException();
}
- 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 (kind > 57)
kind = 57;
Avoid deeply nested control flow statements. Open
if (kind > 1)
kind = 1;
Avoid deeply nested control flow statements. Open
if (kind > 56)
kind = 56;
Avoid deeply nested control flow statements. Open
if (kind > 10)
kind = 10;
Avoid deeply nested control flow statements. Open
if (c.gen < jj_gen) c.first = null;
Avoid deeply nested control flow statements. Open
if (kind > 57)
kind = 57;
Avoid deeply nested control flow statements. Open
if (kind > 56)
kind = 56;
Method LexicalError
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
protected static String LexicalError(boolean EOFSeen, int lexState, int errorLine, int errorColumn, String errorAfter, char curChar) {