Showing 7,775 of 7,775 total issues

Method hasAttribute has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public boolean hasAttribute(String name, boolean recurse) {
        if (hasAttribute(name))
            return true;
        if (recurse) {
            if (_sess != null)
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/DesktopImpl.java - About 55 mins 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 getXelVariable has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public Object getXelVariable(XelContext ctx, Object base, Object name, boolean ignoreExec) {
        if (!ignoreExec) {
            final Execution exec = getExecution();
            if (exec != null)
                return Evaluators.resolveVariable(ctx, exec.getVariableResolver(), base, name);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/PageImpl.java - About 55 mins 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 removeAttribute has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public Object removeAttribute(String name, boolean recurse) {
        if (recurse && !hasAttribute(name)) {
            if (_desktop != null) {
                if (_desktop.hasAttribute(name, true))
                    return _desktop.removeAttribute(name, true);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/PageImpl.java - About 55 mins 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 destroy has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public void destroy() {
        super.destroy();
        try {
            if (_ips != null) {
                final List<Interpreter> ips = new ArrayList<Interpreter>(_ips.values());
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/PageImpl.java - About 55 mins 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 setAttribute has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public Object setAttribute(String name, Object value, boolean recurse) {
        if (recurse && !hasAttribute(name)) {
            if (_desktop != null) {
                if (_desktop.hasAttribute(name, true))
                    return _desktop.setAttribute(name, value, true);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/PageImpl.java - About 55 mins 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 removeAttribute has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public Object removeAttribute(String name, boolean recurse) {
        if (recurse && !hasAttribute(name)) {
            Desktop desktop = getDesktop();
            if (desktop != null) {
                if (desktop.hasAttribute(name, true))
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/AbstractExecution.java - About 55 mins 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 setAttribute has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public Object setAttribute(String name, Object value, boolean recurse) {
        if (recurse && !hasAttribute(name)) {
            Desktop desktop = getDesktop();
            if (desktop != null) {
                if (desktop.hasAttribute(name, true))
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/AbstractExecution.java - About 55 mins 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 toAbsoluteURI has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public String toAbsoluteURI(String uri, boolean skipInclude) {
        if (uri != null && uri.length() > 0) {
            final char cc = uri.charAt(0);
            if (cc != '/' && cc != '~' && !(skipInclude && isIncluded()) && !Servlets.isUniversalURL(uri)) {
                final String dir = getDesktop().getCurrentDirectory();
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/AbstractExecution.java - About 55 mins 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 meterAuStart has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    private static String meterAuStart(PerformanceMeter pfmeter, Execution exec, long startTime) {
        //Format of ZK-Client-Start:
        //    request-id=time
        String hdr = meterGetData(exec, "ZK-Client-Start");
        if (hdr != null) {
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 55 mins 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 createFormProxy has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    @SuppressWarnings({ "unchecked", "rawtypes" })
    public static <T> T createFormProxy(T origin, Class<?> type, Class[] interfaces) {

        if (origin instanceof Form)
            return origin;
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ProxyHelper.java - About 55 mins 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 getValue has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public Object getValue(ELContext context, Object base, Object property)
            throws NullPointerException, PropertyNotFoundException, ELException {
        if (context == null) {
            throw new NullPointerException();
        }

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

    private Map<String, Object> getViewModelInitArgs(BindEvaluatorX evalx, Component comp) {
        final ComponentCtrl compCtrl = (ComponentCtrl) comp;
        final Collection<Annotation> anncol = compCtrl.getAnnotations(VIEW_MODEL_ATTR, INIT_ANNO);
        if (anncol.size() == 0)
            return null;
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/BindComposer.java - About 55 mins 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 getInstance has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public static DebuggerFactory getInstance() {
        if (_instanceSet) {
            return _factory;
        }
        synchronized (DebuggerFactory.class) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/sys/debugger/DebuggerFactory.java - About 55 mins 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 readUTF has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

        private String readUTF(int index, final int utfLen, final char[] buf) {
            int endIndex = index + utfLen;
            byte[] b = this.b;
            int strLen = 0;
            int c;

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

        private static Type[] getArgumentTypes(final String methodDescriptor) {
            char[] buf = methodDescriptor.toCharArray();
            int off = 1;
            int size = 0;
            while (true) {

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

    public void setPath(String property, ProxyNode parent) {
        if (property == null && _node != null) { // means update
            _node.setParent(parent);
        } else {
            _node = new ProxyNodeImpl(property, parent);
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelSetProxy.java - About 55 mins 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 setPath has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public void setPath(String property, ProxyNode parent) {
        if (property == null && _node != null) { // means update
            _node.setParent(parent);
        } else {
            _node = new ProxyNodeImpl(property, parent);
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelListProxy.java - About 55 mins 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 setPath has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public void setPath(String property, ProxyNode parent) {
        if (property == null && _node != null) { // means update
            _node.setParent(parent);
        } else {
            _node = new ProxyNodeImpl(property, parent);
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/AbstractCollectionProxy.java - About 55 mins 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 setPath has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public void setPath(String property, ProxyNode parent) {
        if (property == null && _node != null) { // means update
            _node.setParent(parent);
        } else {
            _node = new ProxyNodeImpl(property, parent);
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelMapProxy.java - About 55 mins 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 setPath has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    public void setPath(String property, ProxyNode parent) {
        if (property == null && _node != null) { // means update
            _node.setParent(parent);
        } else {
            _node = new ProxyNodeImpl(property, parent);
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelArrayProxy.java - About 55 mins 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