Showing 7,775 of 7,775 total issues

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

    private void cleanup() {
        // Cleanup after cleared References.
        Entry[] tab = this.table;
        ReferenceQueue queue = this.queue;
        Reference ref;
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.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 get has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public V get(Object key) {
        if (key == null) {
            key = KeyFactory.NULL;
        }

Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.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 put has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public V put(K key, V value) {
        if (key == null) {
            key = (K) KeyFactory.NULL;
        }

Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.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 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

Method getEqualBeans has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

        public Set<Object> getEqualBeans(Object bean) {
            boolean doSync = false;
            EqualBeans equalBeans;
            if (bean instanceof Collection) {
                equalBeans = _identityMap.get(bean);
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/tracker/impl/TrackerImpl.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 render has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

        /*package*/ @SuppressWarnings("unchecked")
        void render(Row row, int index) throws Throwable {
            if (row.isLoaded())
                return; //nothing to do

Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Grid.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 getRegex has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private Pattern getRegex(String regex, String regexFlags) {
        if (regex == null || regex.length() == 0)
            return null;
        if (regexFlags.length() == 0) {
            return Pattern.compile(regex);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/SimpleConstraint.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 doSelectionChanged has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private void doSelectionChanged() {
        final Selectable<Object> smodel = getSelectableModel();
        if (smodel.isSelectionEmpty()) {
            if (_selItem != null)
                setSelectedItem(null);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Combobox.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 getClientConstraint has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public String getClientConstraint() {
        if (_raw != null)
            return '\'' + Encode.forJavaScript(_raw) + '\'';

        final StringBuffer sb = new StringBuffer("new zul.inp.SimpleConstraint(");
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/SimpleConstraint.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 removeItemFromSelection has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public void removeItemFromSelection(Treeitem item) {
        if (item.getTree() != this)
            throw new UiException("Not a child: " + item);

        if (item.isSelected()) {
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Tree.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 setModel has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    public void setModel(ListModel<?> model) {
        if (model != null) {
            if (!(model instanceof Selectable))
                throw new UiException(model.getClass() + " must implement " + Selectable.class);

Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Radiogroup.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 getGroupIndex has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private static int getGroupIndex(List<int[]> groupInfo, int index) {
        int j = 0, gindex = -1;
        int[] g = null;
        for (Iterator<int[]> it = groupInfo.iterator(); it.hasNext(); ++j) {
            g = it.next();
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Group.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 include has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

    private void include(Writer out) throws IOException {
        final Desktop desktop = getDesktop();
        final Execution exec = getExecution();
        final String src = exec.toAbsoluteURI(_src, false);
        final Map<String, Object> old = setupDynams(exec);
Severity: Minor
Found in zul/src/main/java/org/zkoss/zul/Include.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