Showing 4,841 of 7,782 total issues

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) {
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 hr to fix

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))
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/FormProxyHandler.java - About 1 hr to fix

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))
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListProxy.java - About 1 hr to fix

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);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/scripting/Interpreters.java - About 1 hr to fix

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))
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListProxy.java - About 1 hr to fix

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))
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelSetProxy.java - About 1 hr to fix

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))
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelListProxy.java - About 1 hr to fix

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) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelArrayProxy.java - About 1 hr to fix

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))

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) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelMapProxy.java - About 1 hr to fix

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) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelSetProxy.java - About 1 hr to fix

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;

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 : _cache.entrySet()) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/MapProxy.java - About 1 hr to fix

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()) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelMapProxy.java - About 1 hr to fix

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))
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelListProxy.java - About 1 hr to fix

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 accept has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

        private void accept(final TypeCollector classVisitor) {
            char[] c = new char[maxStringLength]; // buffer used to read strings
            int i, j, k; // loop variables
            int u, v, w; // indexes in b

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) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelListProxy.java - About 1 hr to fix

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))
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelListProxy.java - About 1 hr to fix

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) {

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 processFormBindings has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private void processFormBindings(Component comp) {
        final ComponentCtrl compCtrl = (ComponentCtrl) comp;
        final BindEvaluatorX eval = _binder.getEvaluatorX();
        //validator information
        ExpressionAnnoInfo validatorInfo = parseValidator(comp, FORM_ATTR);
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 1 hr to fix

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

Severity
Category
Status
Source
Language