Showing 7,775 of 7,775 total issues
Method getUuid
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public String getUuid() {
if (_uuid == null) {
Execution exec = null; // ZK-2606: if parent has _page, child is in the same component tree
for (Component comp = this; comp != null; comp = comp.getParent()) {
if (comp.getPage() != 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 destroy
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public void destroy() {
final ExecutionMonitor execmon = _wapp != null //just in case
? _wapp.getConfiguration().getExecutionMonitor() : null;
_rque = null; //denote it is destroyed
- 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 removeListener
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public boolean removeListener(Object listener) {
boolean found = false;
if (listener instanceof EventInterceptor && _eis.removeEventInterceptor((EventInterceptor) listener))
found = 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 writeObject
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private synchronized void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
s.defaultWriteObject();
s.writeObject(_langdef != null ? _langdef.getName() : null);
s.writeObject(_owner != null ? _owner.getUuid() : 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 endUpdate
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public void endUpdate(Execution exec) throws IOException {
final Desktop desktop = exec.getDesktop();
final DesktopCtrl desktopCtrl = (DesktopCtrl) desktop;
final Configuration config = desktop.getWebApp().getConfiguration();
final ExecutionCtrl execCtrl = (ExecutionCtrl) exec;
- 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 getCharset
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private static String getCharset(String ctype) {
final String ctypelc = ctype.toLowerCase(java.util.Locale.ENGLISH);
for (int j = 0; (j = ctypelc.indexOf("charset", j)) >= 0; j += 7) {
int k = org.zkoss.lang.Strings.skipWhitespacesBackward(ctype, j - 1);
if (k < 0 || ctype.charAt(k) == ';') {
- 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 create
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public Component[] create(Component parent, Component insertBefore, VariableResolver resolver,
Composer composer) {
final Execution exec = Executions.getCurrent();
final ExecutionCtrl execCtrl = (ExecutionCtrl) exec;
final Component[] cs;
- 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 getRetryTimeout
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
private static final int getRetryTimeout() {
if (_retryTimeout == null) {
int v = 0;
final String s = Library.getProperty(Attributes.ACTIVATE_RETRY_DELAY);
if (s != 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 wait
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public void wait(Object mutex) throws InterruptedException, SuspendNotAllowedException {
if (mutex == null)
throw new IllegalArgumentException("null mutex");
final Thread thd = Thread.currentThread();
- 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 lastIndexOf
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public int lastIndexOf(Object o) {
final int size = size();
if (o == null) {
for (int i = size - 1; i >= 0; i--)
if (testEquals(get(i), 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 newInterpreter
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public static final Interpreter newInterpreter(String zslang, Page owner) {
if (zslang == null || zslang.length() == 0 || owner == null)
throw new IllegalArgumentException("empty or null");
final String zsl = zslang.toLowerCase(java.util.Locale.ENGLISH);
- 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 indexOf
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public int indexOf(Object o) {
final int size = size();
if (o == null) {
for (int i = 0; i < size; i++)
if (testEquals(get(i), 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 isHandled
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public boolean isHandled(Method m) {
if (m.isAnnotationPresent(Transient.class))
return false;
final String name = m.getName();
if ("hashCode".equals(name) || "equals".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
Method contains
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public boolean contains(Object o) {
Iterator<E> e = iterator();
if (o == null) {
while (e.hasNext())
if (testEquals(e.next(), 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 lastIndexOf
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public int lastIndexOf(Object o) {
final int size = size();
if (o == null) {
for (int i = size - 1; i >= 0; i--)
if (testEquals(get(i), 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 contains
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public boolean contains(Object o) {
Iterator<E> e = iterator();
if (o == null) {
while (e.hasNext())
if (testEquals(e.next(), 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 lookupParameterNames
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public String[] lookupParameterNames(AccessibleObject methodOrCtor, boolean throwExceptionIfMissing) {
Class<?>[] types = null;
Class<?> declaringClass = null;
String name = 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 isFormDirty
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public boolean isFormDirty() {
if (_dirty) {
return true;
} else {
for (Map.Entry<K, V> me : getCache().entrySet()) {
- 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 testEquals
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
protected static boolean testEquals(Object e, Object o) {
if (e == o) {
return true;
}
if (e instanceof FormProxyObject) {
- 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 indexOf
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
public int indexOf(Object o) {
final int size = size();
if (o == null) {
for (int i = 0; i < size; i++)
if (testEquals(get(i), 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"