Showing 4,841 of 7,782 total issues

Function CHILD has 122 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        "CHILD": function( type, what, _argument, first, last ) {
            var simple = type.slice( 0, 3 ) !== "nth",
                forward = type.slice( -4 ) !== "last",
                ofType = what === "of-type";

Severity: Major
Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 4 hrs to fix

    Function tree has 122 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    d3.layout.tree = function() {
      var hierarchy = d3.layout.hierarchy().sort(null).value(null),
          separation = d3_layout_treeSeparation,
          size = [1, 1]; // width, height
    
    
    Severity: Major
    Found in zktest/src/main/webapp/js/d3.layout.js - About 4 hrs to fix

      Function defaultPrefilter has 122 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function defaultPrefilter( elem, props, opts ) {
          var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display,
              isBox = "width" in props || "height" in props,
              anim = this,
              orig = {},
      Severity: Major
      Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 4 hrs to fix

        Function zkDefine has 122 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            function zkDefine(item) {
                if (item.type === 'ObjectMethod') {
                    item.value = j.functionExpression.from({
                        body: item.body,
                        params: item.params,
        Severity: Major
        Found in eslint-plugin-zk/src/transform.js - About 4 hrs to fix

          Function Callbacks has 121 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          jQuery.Callbacks = function( options ) {
          
              // Convert options from String-formatted to Object-formatted if needed
              // (we check in cache first)
              options = typeof options === "string" ?
          Severity: Major
          Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 4 hrs to fix

            Row has 37 methods (exceeds 20 allowed). Consider refactoring.
            Open

            public class Row extends XulElement {
                private static final long serialVersionUID = 20091111L;
            
                private transient Object _value;
                private String _align, _valign;
            Severity: Minor
            Found in zul/src/main/java/org/zkoss/zul/Row.java - About 4 hrs to fix

              Include has 37 methods (exceeds 20 allowed). Consider refactoring.
              Open

              public class Include extends XulElement implements Includer, DynamicPropertied, AfterCompose, IdSpace {
                  private static final Logger log = LoggerFactory.getLogger(Include.class);
                  private static final String ATTR_RENDERED = "org.zkoss.zul.Include.rendered";
                  private String _src;
                  private Map<String, Object> _dynams;
              Severity: Minor
              Found in zul/src/main/java/org/zkoss/zul/Include.java - About 4 hrs to fix

                File fetch.js has 367 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /* fetch.js
                
                    Purpose:
                
                    Description:
                Severity: Minor
                Found in zk/src/main/resources/web/js/zk/ext/fetch.js - About 4 hrs to fix

                  Function chord has 120 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  d3.layout.chord = function() {
                    var chord = {},
                        chords,
                        groups,
                        matrix,
                  Severity: Major
                  Found in zktest/src/main/webapp/js/d3.layout.js - About 4 hrs to fix

                    File Strings.java has 365 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    /* Strings.java
                    
                    
                        Purpose: String utilities and constants
                        Description:
                    Severity: Minor
                    Found in zcommon/src/main/java/org/zkoss/lang/Strings.java - About 4 hrs to fix

                      Method parseToMap has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public static final Map<String, String> parseToMap(Map<String, String> map, String rawData) {
                              if (rawData == null || rawData.trim().length() == 0) {
                                  if (map != null)
                                      return map;
                                  return Collections.emptyMap();
                      Severity: Minor
                      Found in zcommon/src/main/java/org/zkoss/idom/ProcessingInstruction.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 escape has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          static void escape(final char[] text, final int offset, final int len, final Writer writer,
                                             final JavaScriptEscapeType escapeType, final JavaScriptEscapeLevel escapeLevel)
                                             throws IOException {
                      
                              if (text == null || text.length == 0) {
                      Severity: Minor
                      Found in zcommon/src/main/java/org/zkoss/lang/JavaScriptEscapeUtil.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 CompositeExpression has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                        final public AstCompositeExpression CompositeExpression() throws ParseException {
                                                                                           /*@bgen(jjtree) CompositeExpression */
                        AstCompositeExpression jjtn000 = new AstCompositeExpression(JJTCOMPOSITEEXPRESSION);
                        boolean jjtc000 = true;
                        jjtree.openNodeScope(jjtn000);
                      Severity: Minor
                      Found in zel/src/main/java/org/zkoss/zel/impl/parser/ELParser.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 splitListenAnnotationValues has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private static String[][] splitListenAnnotationValues(String str) {
                              List<String[]> result = new ArrayList<String[]>();
                              int len = str.length();
                              boolean inSqBracket = false;
                              boolean inQuote = false;
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/select/Selectors.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 parse has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private void parse(PageDefinition pgdef, ProcessingInstruction pi) throws Exception {
                              final String target = pi.getTarget();
                              final Map<String, String> params = pi.parseData();
                              if ("page".equals(target)) {
                                  parsePageDirective(pgdef, pi, params);
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/metainfo/Parser.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 beforeHostChildRemoved has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public void beforeHostChildRemoved(Component child, int indexOfChild) {
                              if (log.isDebugEnabled()) {
                                  log.debug("beforeHostChildRemoved {}, 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 init has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          public void init(Object context, Configuration config) {
                              if (_config != null)
                                  throw new IllegalStateException("Cannot be initialized twice");
                              if (config == null)
                                  throw new IllegalArgumentException("null");
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/AbstractWebApp.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 handleError has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private static final void handleError(Throwable ex, UiVisualizer uv, List<Throwable> errs) {
                              final Throwable t = Exceptions.findCause(ex, Expectable.class);
                              if (t == null) {
                                  if (ex instanceof org.xml.sax.SAXException
                                          || ex instanceof org.zkoss.zk.ui.metainfo.PropertyNotFoundException)
                      Severity: Minor
                      Found in zk/src/main/java/org/zkoss/zk/ui/impl/UiEngineImpl.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 initBinder has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private AnnotateBinder initBinder(BindEvaluatorX evalx, Component comp) {
                              final ComponentCtrl compCtrl = (ComponentCtrl) comp;
                              final Annotation idanno = compCtrl.getAnnotation(BINDER_ATTR, ID_ANNO);
                              final Annotation initanno = compCtrl.getAnnotation(BINDER_ATTR, INIT_ANNO);
                              Object binder = null;
                      Severity: Minor
                      Found in zkbind/src/main/java/org/zkoss/bind/BindComposer.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 addFormLoadBindings0 has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring.
                      Open

                          private void addFormLoadBindings0(Component comp, String formId, String loadExpr, String[] beforeCmds,
                                  String[] afterCmds, Map<String, Object> bindingArgs) {
                              final boolean prompt = isPrompt(beforeCmds, afterCmds);
                              final String attr = formId;
                              final BindingExecutionInfoCollector collector = getBindingExecutionInfoCollector();
                      Severity: Minor
                      Found in zkbind/src/main/java/org/zkoss/bind/impl/BinderImpl.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

                      Severity
                      Category
                      Status
                      Source
                      Language