Showing 4,835 of 7,777 total issues

Method parse0 has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
Open

    private static final Map
    parse0(Map map, String src, char pairSeparator, char separator, char quote, boolean asValue,
    boolean parenthesis, boolean multiple)
    throws IllegalSyntaxException {
        if (separator == (char)0)
Severity: Minor
Found in zcommon/src/main/java/org/zkoss/util/Maps.java - About 1 day 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 getNextToken has a Cognitive Complexity of 70 (exceeds 5 allowed). Consider refactoring.
Open

public Token getNextToken()
{
  Token matchedToken;
  int curPos = 0;
Severity: Minor
Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParserTokenManager.java - About 1 day 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

File flex.ts has 627 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* flex.ts

Purpose:

Description:
Severity: Major
Found in zk/src/main/resources/web/js/zk/flex.ts - About 1 day to fix

    File BytecodeReadingParanamer.java has 626 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /***
     *
     * Portions Copyright (c) 2007 Paul Hammant
     * Portions copyright (c) 2000-2007 INRIA, France Telecom
     * All rights reserved.

      LanguageDefinition has 74 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public class LanguageDefinition {
          private static final Logger log = LoggerFactory.getLogger(LanguageDefinition.class);
          //static//
          /** A map of (String name or namespace, LanguageDefinition). */
          private static final Map<String, LanguageDefinition> _ldefByName = new HashMap<String, LanguageDefinition>();
      Severity: Major
      Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/LanguageDefinition.java - About 1 day to fix

        AbstractExecution has 74 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public abstract class AbstractExecution implements Execution, ExecutionCtrl {
            private static final Logger _zklog = LoggerFactory.getLogger("org.zkoss.zk.log");
        
            private Desktop _desktop;
            private Page _curpage;
        Severity: Major
        Found in zk/src/main/java/org/zkoss/zk/ui/impl/AbstractExecution.java - About 1 day to fix

          File WeakIdentityMap.java has 619 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          /* WeakIdentityMap.java
          
              Purpose:
                  
              Description:
          Severity: Major
          Found in zkbind/src/main/java/org/zkoss/bind/impl/WeakIdentityMap.java - About 1 day to fix

            File InputElement.java has 619 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            /* InputElement.java
            
                Purpose:
                    
                Description:
            Severity: Major
            Found in zul/src/main/java/org/zkoss/zul/impl/InputElement.java - About 1 day to fix

              HtmlShadowElement has 73 methods (exceeds 20 allowed). Consider refactoring.
              Open

              public abstract class HtmlShadowElement extends AbstractComponent implements ShadowElement, ShadowElementCtrl {
                  private static final Logger log = LoggerFactory.getLogger(HtmlShadowElement.class);
                  private static final long serialVersionUID = 20141022145906L;
                  private Component _firstInsertion;
                  private Component _lastInsertion;
              Severity: Major
              Found in zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java - About 1 day to fix

                Chart has 73 methods (exceeds 20 allowed). Consider refactoring.
                Open

                public class Chart extends Imagemap {
                    private static final long serialVersionUID = 20091008183601L;
                    //chart type
                    public static final String PIE = "pie";
                    public static final String FUNNEL = "funnel";
                Severity: Major
                Found in zul/src/main/java/org/zkoss/zul/Chart.java - About 1 day to fix

                  Method parse has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
                  Open

                      public void parse(Element root, Configuration config, Locator locator) throws Exception {
                          l_out: for (Iterator it = root.getElements().iterator(); it.hasNext();) {
                              final Element el = (Element) it.next();
                              final String elnm = el.getName();
                              // B65-ZK-1671: ThemeProvider specified in metainfo/zk/zk.xml may get overridden by default
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/ui/sys/ConfigParser.java - About 1 day 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 execCreate0 has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private static final Component[] execCreate0(CreateInfo ci, NodeInfo parentInfo, Component parent,
                              Component insertBefore) {
                          final List<Component> created = new LinkedList<Component>();
                          final Page page = ci.page;
                          final PageDefinition pagedef = parentInfo.getPageDefinition();
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.java - About 1 day 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 processItem has a Cognitive Complexity of 68 (exceeds 5 allowed). Consider refactoring.
                  Open

                      private static final Media processItem(Desktop desktop, FileItem fi, boolean alwaysNative,
                              org.zkoss.zk.ui.sys.DiskFileItemFactory factory) throws IOException {
                          String name = getBaseName(fi);
                          if (name != null) {
                              //Not sure whether a name might contain ;jsessionid or similar
                  Severity: Minor
                  Found in zk/src/main/java/org/zkoss/zk/au/http/AuMultipartUploader.java - About 1 day 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 onEvent has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                  Open

                          public void onEvent(Event event) {
                              if (inPagingMold() && event instanceof PagingEvent) {
                                  PagingEvent pe = (PagingEvent) event;
                                  if (_model instanceof Pageable) {
                                      ((Pageable) _model).setPageSize(pe.getPageable().getPageSize());
                  Severity: Minor
                  Found in zul/src/main/java/org/zkoss/zul/Tree.java - About 1 day 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

                  Function sendNow has a Cognitive Complexity of 67 (exceeds 5 allowed). Consider refactoring.
                  Open

                          export function sendNow(dt: zk.Desktop): boolean {
                              if (zAu.disabledRequest) {
                                  if (zk.processing)
                                      zk.endProcessing();
                                  return false;
                  Severity: Minor
                  Found in zk/src/main/resources/web/js/zk/au.ts - About 1 day 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

                  Input has 71 methods (exceeds 20 allowed). Consider refactoring.
                  Open

                  public class Input extends AbstractTag {
                      private transient boolean _byClient;
                  
                      static {
                          addClientEvent(Input.class, Events.ON_CHANGE, 0);
                  Severity: Major
                  Found in zhtml/src/main/java/org/zkoss/zhtml/Input.java - About 1 day to fix

                    Window has 71 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    public class Window extends XulElement implements Framable, IdSpace {
                        private static final Logger log = LoggerFactory.getLogger(Window.class);
                        private static final long serialVersionUID = 20100721L;
                    
                        private transient Caption _caption;
                    Severity: Major
                    Found in zul/src/main/java/org/zkoss/zul/Window.java - About 1 day to fix

                      AbstractTreeModel has 71 methods (exceeds 20 allowed). Consider refactoring.
                      Open

                      public abstract class AbstractTreeModel<E> implements TreeModel<E>, TreeSelectableModel, TreeOpenableModel,
                              Selectable<E>, Openable<E>, java.io.Serializable, PageableModel {
                      
                          private static final Logger log = LoggerFactory.getLogger(AbstractTreeModel.class);
                      
                      Severity: Major
                      Found in zul/src/main/java/org/zkoss/zul/AbstractTreeModel.java - About 1 day to fix

                        File Datebox.java has 603 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        /* Datebox.java
                        
                            Purpose:
                        
                            Description:
                        Severity: Major
                        Found in zul/src/main/java/org/zkoss/zul/Datebox.java - About 1 day to fix

                          Method toNumberOnly has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
                          Open

                              protected Object[] toNumberOnly(String val) {
                                  if (val == null)
                                      return new Object[] { null, null };
                          
                                  final DecimalFormatSymbols symbols = new DecimalFormatSymbols(getDefaultLocale());
                          Severity: Minor
                          Found in zul/src/main/java/org/zkoss/zul/impl/NumberInputElement.java - About 1 day 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