Showing 4,841 of 7,782 total issues

Stream has 39 methods (exceeds 20 allowed). Consider refactoring.
Open

public class Stream {

    private final Iterator<Object> iterator;

Severity: Minor
Found in zel/src/main/java/org/zkoss/zel/impl/stream/Stream.java - About 5 hrs to fix

    Desktop has 39 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public interface Desktop extends Scope {
        /** Returns the device type that this desktop belongs to.
         *
         * <p>A device type identifies the type of a client. For example, "ajax"
         * represents the Web browsers with Ajax support,
    Severity: Minor
    Found in zk/src/main/java/org/zkoss/zk/ui/Desktop.java - About 5 hrs to fix

      Listheader has 39 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public class Listheader extends HeaderElement {
          private static final long serialVersionUID = 20080218L;
      
          private String _sortDir = "natural";
          private transient Comparator _sortAsc, _sortDsc;
      Severity: Minor
      Found in zul/src/main/java/org/zkoss/zul/Listheader.java - About 5 hrs to fix

        DateTimeFormatInputElement has 39 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public abstract class DateTimeFormatInputElement extends FormatInputElement {
            protected Locale _locale;
            protected TimeZone _tzone = TimeZones.getCurrent();
        
            /** Returns the locale associated with this component,
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/impl/DateTimeFormatInputElement.java - About 5 hrs to fix

          Method outPageContent has 129 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static final void outPageContent(Execution exec, Page page, Writer out, boolean au) throws IOException {
                  final Desktop desktop = page.getDesktop();
                  final PageCtrl pageCtrl = (PageCtrl) page;
                  final Component owner = pageCtrl.getOwner();
                  boolean contained = owner == null && exec.isIncluded();
          Severity: Major
          Found in zk/src/main/java/org/zkoss/zk/ui/sys/HtmlPageRenders.java - About 5 hrs to fix

            Function sendNow has 129 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    export function sendNow(dt: zk.Desktop): boolean {
                        if (zAu.disabledRequest) {
                            if (zk.processing)
                                zk.endProcessing();
                            return false;
            Severity: Major
            Found in zk/src/main/resources/web/js/zk/au.ts - About 5 hrs to fix

              File Stream.java has 380 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /*
               * Licensed to the Apache Software Foundation (ASF) under one or more
               * contributor license agreements.  See the NOTICE file distributed with
               * this work for additional information regarding copyright ownership.
               * The ASF licenses this file to You under the Apache License, Version 2.0
              Severity: Minor
              Found in zel/src/main/java/org/zkoss/zel/impl/stream/Stream.java - About 5 hrs to fix

                File ListModelMapProxy.java has 380 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /** ListModelMapProxy.java.
                
                 Purpose:
                
                 Description:
                Severity: Minor
                Found in zkbind/src/main/java/org/zkoss/bind/proxy/ListModelMapProxy.java - About 5 hrs to fix

                  Method loadLabels has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                  Open

                      @SuppressWarnings("unchecked")
                      private final Map<String, ExValue> loadLabels(Locale locale) {
                          WaitLock lock = null;
                          for (;;) {
                              final Object o;

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

                      static String escape(final String text,
                                           final JavaScriptEscapeType escapeType, final JavaScriptEscapeLevel escapeLevel) {
                  
                          if (text == null) {
                              return null;
                  Severity: Minor
                  Found in zcommon/src/main/java/org/zkoss/lang/JavaScriptEscapeUtil.java - About 5 hrs 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 Semicolon has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                  Open

                    final public void Semicolon() throws ParseException {
                      Assignment();
                      label_2:
                      while (true) {
                        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
                  Severity: Minor
                  Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java - About 5 hrs 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 Choice has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                  Open

                    final public void Choice() throws ParseException {
                      Or();
                      label_6:
                      while (true) {
                        if (jj_2_5(3)) {
                  Severity: Minor
                  Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java - About 5 hrs 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 Concatenation has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                  Open

                    final public void Concatenation() throws ParseException {
                      Math();
                      label_11:
                      while (true) {
                        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
                  Severity: Minor
                  Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java - About 5 hrs 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 getNotifys has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public static Set<Property> getNotifys(Method m, Object base, String prop, Object value, BindContext ctx) {
                          //TODO, Dennis, do we really need to pass value here?
                          final Set<Property> notifys = new LinkedHashSet<Property>();
                          if (m == null)
                              return notifys;
                  Severity: Minor
                  Found in zkbind/src/main/java/org/zkoss/bind/xel/zel/BindELContext.java - About 5 hrs 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 onListModelDataChange has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                  Open

                      @SuppressWarnings("unchecked")
                      private void onListModelDataChange(ListDataEvent event) {
                          final ListModel<?> model = event.getModel();
                          int type = event.getType();
                          int index0 = event.getIndex0();

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

                      private void addChildrenLoadBindings0(Component comp, String loadExpr, String[] beforeCmds, String[] afterCmds,
                              Map<String, Object> bindingArgs, String converterExpr, Map<String, Object> converterArgs) {
                          final boolean prompt = isPrompt(beforeCmds, afterCmds);
                          final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
                          if (prompt) {
                  Severity: Minor
                  Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.java - About 5 hrs 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 insertBefore has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public boolean insertBefore(Component child, Component refChild) {
                          boolean sel = !getChildren().stream().filter(Component::isVisible).findAny().isPresent(), desel = false;
                          final Tab newtab = (Tab) child;
                          if (!sel && newtab.isSelected()) {
                              if (newtab.getTabbox() != null) // B65-ZK-1597
                  Severity: Minor
                  Found in zul/src/main/java/org/zkoss/zul/Tabs.java - About 5 hrs 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 Multiplication has 127 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    final public void Multiplication() throws ParseException {
                      Unary();
                      label_13:
                      while (true) {
                        switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
                  Severity: Major
                  Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.java - About 5 hrs to fix

                    Function axis has 126 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    d3.svg.axis = function() {
                      var scale = d3.scale.linear(),
                          orient = "bottom",
                          tickMajorSize = 6,
                          tickMinorSize = 6,
                    Severity: Major
                    Found in zktest/src/main/webapp/js/d3.js - About 5 hrs to fix

                      File ThemeFns.java has 376 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /* ThemeFns.java
                      
                      {{IS_NOTE
                          Purpose:
                              
                      Severity: Minor
                      Found in zweb/src/main/java/org/zkoss/web/fn/ThemeFns.java - About 5 hrs to fix
                        Severity
                        Category
                        Status
                        Source
                        Language