Showing 4,841 of 7,782 total issues

File Listheader.java has 541 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* Listheader.java

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

    Method parseItem has 223 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private Object parseItem(PageDefinition pgdef, NodeInfo parent, Element el, AnnotationHelper annHelper,
                boolean bNativeContent, ParsingState parsingState) throws Exception {
            final String nm = el.getLocalName();
            final Namespace ns = el.getNamespace();
            final String pref = ns != null ? ns.getPrefix() : "";
    Severity: Major
    Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.java - About 1 day to fix

      Method isAnnotation has a Cognitive Complexity of 57 (exceeds 5 allowed). Consider refactoring.
      Open

          public static boolean isAnnotation(String val) {
              int len = val.length();
              if (len >= 4) {
                  len = (val = val.trim()).length();
                  if (len >= 4 && val.charAt(0) == '@') {
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/impl/AnnotationHelper.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 Rows.java has 537 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

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

        File utl.ts has 537 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        // eslint-disable-next-line @typescript-eslint/triple-slash-reference
        /// <reference types="webrtc" />
        /* util.ts
        
            Purpose:
        Severity: Major
        Found in zk/src/main/resources/web/js/zk/utl.ts - About 1 day to fix

          File CarServiceImpl.java has 536 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          package org.zkoss.zktest.test2.B65_ZK_1969.tutorial;
          
          import java.util.LinkedList;
          import java.util.List;
          

            Element has 61 methods (exceeds 20 allowed). Consider refactoring.
            Open

            public class Element extends AbstractGroup
            implements Attributable, Namespaceable, org.w3c.dom.Element {
                /** The namespace. */
                protected Namespace _ns;
                /** The local name. */
            Severity: Major
            Found in zcommon/src/main/java/org/zkoss/idom/Element.java - About 1 day to fix

              Method getImplicit has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static Object getImplicit(Page page, Component comp, String name) {
                      if (comp != null && page == null)
                          page = getCurrentPage(comp);
              
                      if ("log".equals(name))
              Severity: Minor
              Found in zk/src/main/java/org/zkoss/zk/ui/Components.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 loadSymbols has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static Map loadSymbols(Locale locale) {
                      WaitLock lock = null;
                      for (;;) {
                          final Object o;
                          synchronized (_symbols) {
              Severity: Minor
              Found in zul/src/main/java/org/zkoss/zul/Datebox.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 renderProperties has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
              Open

                  protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
                      super.renderProperties(renderer);
              
                      // ZK-4970: reset invalidateListitems here.
                      Executions.getCurrent().removeAttribute("zkoss.Listbox.invalidateListitems" + getUuid());
              Severity: Minor
              Found in zul/src/main/java/org/zkoss/zul/Listbox.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 transformer has 217 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function transformer(file, api) {
                  const j = api.jscodeshift;
                  const root = j(file.source);
                  const aliases = new Map();
              
              
              Severity: Major
              Found in eslint-plugin-zk/src/transform.js - About 1 day to fix

                File Selectors.java has 527 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * 
                 */
                package org.zkoss.zk.ui.select;
                
                Severity: Major
                Found in zk/src/main/java/org/zkoss/zk/ui/select/Selectors.java - About 1 day to fix

                  File ClassWebResource.java has 526 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  /* ClassWebResource.java
                  
                      Purpose:
                  
                      Description:
                  Severity: Major
                  Found in zweb/src/main/java/org/zkoss/web/util/resource/ClassWebResource.java - About 1 day to fix

                    Radiogroup has 59 methods (exceeds 20 allowed). Consider refactoring.
                    Open

                    public class Radiogroup extends XulElement implements Disable {
                        private static final Logger log = LoggerFactory.getLogger(Radiogroup.class);
                    
                        private static final String ZUL_RADIOGROUP_ON_INITRENDER = "zul.Radiogroup.ON_INITRENDER";
                        private String _orient = "horizontal";
                    Severity: Major
                    Found in zul/src/main/java/org/zkoss/zul/Radiogroup.java - About 1 day to fix

                      Method addListener has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public void addListener(Class<?> klass) throws Exception {
                              boolean added = false;
                              Object listener = null;
                      
                              if (Monitor.class.isAssignableFrom(klass)) {
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.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 retrieve has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                      Open

                          protected byte[] retrieve(HttpServletRequest request, HttpServletResponse response, String path)
                                  throws ServletException, IOException {
                              byte[] data;
                              String pkg = null;
                              boolean sourceMapEnabled = sourceMapEnabled();
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/http/WpdExtendlet.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 getShadowVariable0 has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                      Open

                          protected Object getShadowVariable0(Component baseChild, String name, boolean recurse) {
                              try {
                                  _variableSeeking = true;
                                  Object val = getAttribute(name);
                                  if (val != null || hasAttribute(name))
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/AbstractComponent.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 updateVisibleCount has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private void updateVisibleCount(Listitem item, boolean isRemove) {
                              if (item instanceof Listgroup || item.isVisible()) {
                                  final Listgroup g = getListgroupAt(item.getIndex());
                      
                                  // We shall update the number of the visible item in the following
                      Severity: Minor
                      Found in zul/src/main/java/org/zkoss/zul/Listbox.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 fixGroupsInfoBeforeInsert has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private void fixGroupsInfoBeforeInsert(Component newChild, Component refChild, boolean isReorder) {
                              if (_isReplacingItem) //@see Renderer#render
                                  return; //called by #insertBefore(), skip handling GroupInfo
                      
                              if (newChild instanceof Listgroupfoot) {
                      Severity: Minor
                      Found in zul/src/main/java/org/zkoss/zul/Listbox.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 get has a Cognitive Complexity of 53 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static final <V> V get(ResourceCache<V> cache, ServletContext ctx, String path, Object extra) {
                              //20050905: Tom Yeh
                              //We don't need to handle the default name if user specifies only a dir
                              //because it is handled by the container directly
                              //And, web  developer has to specify <welcome-file> in web.xml
                      Severity: Minor
                      Found in zweb/src/main/java/org/zkoss/web/util/resource/ResourceCaches.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