Showing 7,775 of 7,775 total issues

Method getAuExtension has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static final AuExtension getAuExtension(WebApp wapp, String prefix) {
        DHtmlUpdateServlet upsv = DHtmlUpdateServlet.getUpdateServlet(wapp);
        if (upsv == null) {
            synchronized (DHtmlUpdateServlet.class) {
                upsv = DHtmlUpdateServlet.getUpdateServlet(wapp);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/au/http/DHtmlUpdateServlet.java - About 35 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 setProlog has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static final void setProlog(CreateInfo ci, Component comp, NativeInfo compInfo) {
        final Native nc = (Native) comp;
        final Native.Helper helper = nc.getHelper();
        StringBuffer sb = null;
        final List<NodeInfo> prokids = compInfo.getPrologChildren();
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 35 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 getFileuploadMetaPerWebApp has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static  Map<String, Object> getFileuploadMetaPerWebApp(WebApp webApp) {
        final Map<String, Object> params = new HashMap<String, Object>();

        final Configuration conf = webApp.getConfiguration();
        int thrs = conf.getFileSizeThreshold();
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/au/http/AuMultipartUploader.java - About 35 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 sendRedirect has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public void sendRedirect(String uri, boolean respRedirect) {
        if (!respRedirect) {
            sendRedirect(uri);
            return;
        } else {
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/ui/impl/AbstractExecution.java - About 35 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 addAuExtension has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static final AuExtension addAuExtension(WebApp wapp, String prefix, AuExtension extension)
            throws ServletException {
        DHtmlUpdateServlet upsv = DHtmlUpdateServlet.getUpdateServlet(wapp);
        if (upsv == null) {
            synchronized (DHtmlUpdateServlet.class) {
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/au/http/DHtmlUpdateServlet.java - About 35 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 activate has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public void activate() throws ComponentNotFoundException {
        if (_uuid != null) {
            _comp = _desktop.getComponentByUuidIfAny(_uuid);

            if (_comp != null) {
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/au/AuRequest.java - About 35 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 set has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    protected void set(Scope scope, String name, Object val) {
        if (scope != null) {
            final NameSpace bshns = prepareNS(scope);
            //note: we have to create NameSpace (with prepareNS)
            //to have the correct chain
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/scripting/bsh/BSHInterpreter.java - About 35 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 get has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

        public IRubyObject get(String name) {
            IRubyObject ro = super.get(name);
            if (ro == _runtime.getNil()) {
                if (name.length() > 1 && name.charAt(0) == '$') //just in case
                    name = name.substring(1);
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/scripting/jruby/JRubyInterpreter.java - About 35 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 contains has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    protected boolean contains(Scope scope, String name) {
        if (scope != null) {
            final NameSpace bshns = prepareNS(scope);
            //note: we have to create NameSpace (with prepareNS)
            //to have the correct chain
Severity: Minor
Found in zk/src/main/java/org/zkoss/zk/scripting/bsh/BSHInterpreter.java - About 35 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 7 (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();
        }
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/xel/zel/ListModelELResolver.java - About 35 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 getType has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public Class<?> getType(ELContext context, Object base, Object property)
            throws NullPointerException, PropertyNotFoundException, ELException {
        if (context == null) {
            throw new NullPointerException();
        }
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/xel/zel/ListModelELResolver.java - About 35 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 visitNode has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    protected void visitNode(Node node) {
        if (_ctx.getBinding() == null)
            return; //no need to build tracker, we are not in binding expression

        final List<String> path = new ArrayList<String>();
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/xel/zel/BindExpressionBuilder.java - About 35 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 isAttribute has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public static boolean isAttribute(Method method) {
        if (!Modifier.isPublic(method.getModifiers()))
            return false;

        final String nm = method.getName();
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/proxy/ProxyHelper.java - About 35 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 coerce has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private static final int[] coerce(Object property) {

        if (INTEGER_ARRAY.isInstance(property)) { //quick casting for int[]
            return (int[]) property;
        }
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/xel/zel/TreeModelELResolver.java - About 35 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 lookupParameterNames has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    @Override
    public String[] lookupParameterNames(AccessibleObject methodOrConstructor,
                                         boolean throwExceptionIfMissing) {
        final String[] names;
        if (methodOrConstructor instanceof Executable) {

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

    public ExpressionX parseExpressionX(BindContext ctx, String expression, Class<?> expectedType) throws XelException {
        Component comp = null;
        if (ctx != null) {
            comp = ctx.getComponent();
            if (comp == null) {
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/BindEvaluatorXImpl.java - About 35 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 processChildrenBindings has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    private void processChildrenBindings(Component comp) {
        final ComponentCtrl compCtrl = (ComponentCtrl) comp;
        ExpressionAnnoInfo converterInfo = parseConverter(comp, CHILDREN_ATTR);
        //scan init first
        Collection<Annotation> initannos = compCtrl.getAnnotations(CHILDREN_ATTR, INIT_ANNO);
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/AnnotateBinderHelper.java - About 35 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 addMessages has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public void addMessages(Component comp, String attr, String key, String[] messages, Object value) {
        List<Message> compMsgs = _compMsgsMap.get(comp);
        if (compMsgs == null) {
            _compMsgsMap.put(comp, compMsgs = new ArrayList<Message>());
        }
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationMessagesImpl.java - About 35 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 clearKeyMessages has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public void clearKeyMessages(String key) {
        List<Message> keyMsgs = _keyMsgsMap.get(key);
        if (keyMsgs == null || keyMsgs.size() == 0) {
            return;
        }
Severity: Minor
Found in zkbind/src/main/java/org/zkoss/bind/impl/ValidationMessagesImpl.java - About 35 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 load has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

    public void load(BindContext ctx) {
        final Component comp = getComponent(); //ctx.getComponent();
        final BindEvaluatorX eval = getBinder().getEvaluatorX();
        final BindingExecutionInfoCollector collector = ((BinderCtrl) getBinder()).getBindingExecutionInfoCollector();

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