Showing 4,841 of 7,782 total issues

File ComponentDefinitionImpl.java has 351 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* ComponentDefinitionImpl.java

    Purpose:
        
    Description:

    File domtouch.ts has 351 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* domtouch.ts
    
        Purpose:
            Enhance/fix ios dom event
        Description:
    Severity: Minor
    Found in zk/src/main/resources/web/js/zk/domtouch.ts - About 4 hrs to fix

      Method myGetCloseMethods has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          private static final Method[]
          myGetCloseMethods(final Class<?> cls, final String name,
          final Class<?>[] argTypes, final boolean bySubclass) {
      //        assert argTypes != null: "Caller shall handle null";
              final List<Method> mtds = new LinkedList<Method>();
      Severity: Minor
      Found in zcommon/src/main/java/org/zkoss/lang/Classes.java - About 4 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 coerceToNumber has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          protected static final Number coerceToNumber(final String val,
                  final Class<?> type) throws ELException {
              if (Long.TYPE == type || Long.class.equals(type)) {
                  try {
                      return Long.valueOf(val);
      Severity: Minor
      Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 4 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 parseSystemConfig has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          @SuppressWarnings("deprecation")
          private static void parseSystemConfig(Configuration config, Element el) throws Exception {
              String s = el.getElementValue("disable-event-thread", true);
              if (s != null) {
                  final boolean enable = "false".equals(s);
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/sys/ConfigParser.java - About 4 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 xmlfilter has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          private static String xmlfilter(StringBuffer sb) {
              for (int j = 0, len = sb.length(); j < len; ++j) {
                  char cc = sb.charAt(j);
                  if (cc == '<') {
                      if (++j < len && sb.charAt(j) == '!') {
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/http/DHtmlLayoutFilter.java - About 4 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 parseValueArray has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          private static String[] parseValueArray(String rval, Location loc) {
              final List<String> attrs = new ArrayList<String>();
              final int len = rval.length();
              char quot = (char) 0;
              final StringBuffer sb = new StringBuffer(len);
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/impl/AnnotationHelper.java - About 4 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 process has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          protected boolean process(Session sess, HttpServletRequest request, HttpServletResponse response, String originPath,
                  boolean bRichlet) throws ServletException, IOException {
      
              // Fix Server-Side Request Forgery (SSRF)
              String path = Https.sanitizePath(originPath);
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/http/DHtmlLayoutServlet.java - About 4 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 afterHostChildAdded has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          public void afterHostChildAdded(Component child, int indexOfChild) {
              if (log.isDebugEnabled()) {
                  log.debug("afterHostChildAdded {}, in this shadow {}", child,
                          ShadowElementsCtrl.getCurrentInfo());
              }
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/HtmlShadowElement.java - About 4 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 doCatch has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

              public boolean doCatch(Throwable t) {
                  if (_sysinitEx)
                      for (int j = 0; j < _sysinits.length; ++j) {
                          final Initiator init = _sysinits[j];
                          if (init instanceof InitiatorExt) {
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/impl/Initiators.java - About 4 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 read has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          /*package*/ static void read(NameSpace ns, ObjectInputStream s) throws IOException {
              for (;;) {
                  try {
                      final String nm = (String) s.readObject();
                      if (nm == null)
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/scripting/bsh/BSHInterpreter.java - About 4 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 renderProperties has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          protected void renderProperties(org.zkoss.zk.ui.sys.ContentRenderer renderer) throws java.io.IOException {
              super.renderProperties(renderer);
      
              setChildPage(null);
              render(renderer, "comment", _comment);
      Severity: Minor
      Found in zul/src/main/java/org/zkoss/zul/Include.java - About 4 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 fixGroupsInfoAfterInsert has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          private void fixGroupsInfoAfterInsert(Row newItem) {
              if (_isReplacingRow) //@see Grid.Renderer#render
                  return; //called by #insertBefore(), skip handling GroupInfo
      
              if (newItem instanceof Group) {
      Severity: Minor
      Found in zul/src/main/java/org/zkoss/zul/Rows.java - About 4 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 fixGroupsInfoAfterInsert has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          private void fixGroupsInfoAfterInsert(Listitem newItem) {
              if (_isReplacingItem) //@see Renderer#render
                  return; //called by #insertBefore(), skip handling GroupInfo
      
              if (newItem instanceof Listgroup) {
      Severity: Minor
      Found in zul/src/main/java/org/zkoss/zul/Listbox.java - About 4 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 render has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
      Open

          public void render(ActionContext ac, boolean nested) throws DspException, IOException {
              if (!isEffective())
                  return;
              if (nested)
                  throw new DspException(MWeb.DSP_NESTED_ACTION_NOT_ALLOWED,
      Severity: Minor
      Found in zweb/src/main/java/org/zkoss/web/servlet/dsp/action/Out.java - About 4 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

      ComponentDefinition has 34 methods (exceeds 20 allowed). Consider refactoring.
      Open

      public interface ComponentDefinition extends Cloneable {
          /** Returns the language definition, or null if it is a temporary definition
           * belonging to a page.
           */
          public LanguageDefinition getLanguageDefinition();
      Severity: Minor
      Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/ComponentDefinition.java - About 4 hrs to fix

        Tab has 34 methods (exceeds 20 allowed). Consider refactoring.
        Open

        @SuppressWarnings("serial")
        public class Tab extends LabelImageElement {
        
            private static final Logger log = LoggerFactory.getLogger(Tab.class);
        
        
        Severity: Minor
        Found in zul/src/main/java/org/zkoss/zul/Tab.java - About 4 hrs to fix

          Captcha has 34 methods (exceeds 20 allowed). Consider refactoring.
          Open

          public class Captcha extends org.zkoss.zul.Image {
              //control variable
              private boolean _smartDrawCaptcha; //whether post the smartDraw event already?
              private EventListener<Event> _smartDrawCaptchaListener; //the smartDrawListener
          
          
          Severity: Minor
          Found in zul/src/main/java/org/zkoss/zul/Captcha.java - About 4 hrs to fix

            Textbox has 34 methods (exceeds 20 allowed). Consider refactoring.
            Open

            public class Textbox extends InputElement {
                private AuxInfo _auxinf;
            
                public Textbox() {
                    setValueDirectly("");
            Severity: Minor
            Found in zul/src/main/java/org/zkoss/zul/Textbox.java - About 4 hrs to fix

              File SimpleCharStream.java has 345 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              /* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 5.0 */
              /* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
              package org.zkoss.zel.impl.parser;
              
              /**
              Severity: Minor
              Found in zel/src/main/java/org/zkoss/zel/impl/parser/SimpleCharStream.java - About 4 hrs to fix
                Severity
                Category
                Status
                Source
                Language