Showing 4,841 of 7,782 total issues

Method addValue0 has 7 arguments (exceeds 4 allowed). Consider refactoring.
Open

    private int addValue0(Date date, Number open, Number high, Number low, Number close, Number volume, int index) {
Severity: Major
Found in zul/src/main/java/org/zkoss/zul/SimpleHiLoModel.java - About 50 mins to fix

    Method setValue has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        public void setValue(Date date, Number open, Number high, Number low, Number close, Number volume, int index) {
    Severity: Major
    Found in zul/src/main/java/org/zkoss/zul/SimpleHiLoModel.java - About 50 mins to fix

      Method interpret has 7 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          public final void interpret(ServletContext ctx, HttpServletRequest request, HttpServletResponse response,
                  Writer out, String content, String ctype, Locator locator) throws DspException, IOException, XelException {
      Severity: Major
      Found in zweb/src/main/java/org/zkoss/web/servlet/dsp/Interpreter.java - About 50 mins to fix

        Function e has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

                    e = function(a, b, e, k, l, m, n) {
        Severity: Major
        Found in zktest/src/main/webapp/test2/js/zk-3913-PDF417lib.js - About 50 mins to fix

          Function access has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
          Severity: Major
          Found in zk/src/main/resources/web/js/zk/ext/jquery.js - About 50 mins to fix

            Function createDate has 7 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                function createDate(y, m, d, h, M, s, ms) {
            Severity: Major
            Found in zk/src/main/resources/web/js/zk/ext/moment.js - About 50 mins to fix

              Function zkpb has 7 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  export function zkpb(pguid: string, dtid: string, contextURI: string, updateURI: string, resourceURI: string, reqURI: string, props: Record<string, string>): void {
              Severity: Major
              Found in zk/src/main/resources/web/js/zk/mount.ts - About 50 mins to fix

                Function parseDate has 7 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        txt: string,
                        fmt: string,
                        nonLenient?: boolean,
                        refval?: DateImpl,
                        localizedSymbols?: zk.LocalizedSymbols,
                Severity: Major
                Found in zul/src/main/resources/web/js/zul/db/datefmt.ts - About 50 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                          if ("none".equals(val)) {
                                              String newstyle = style.substring(0, j);
                                              final int k = style.indexOf(';', j + 7);
                                              if (k >= 0)
                                                  newstyle += style.substring(k + 1);
                  Severity: Major
                  Found in zhtml/src/main/java/org/zkoss/zhtml/impl/AbstractTag.java - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if (expStr.endsWith(".$"))
                                                expStr = expStr.substring(0, expStr.length() - 2);
                    Severity: Major
                    Found in zcommon/src/main/java/org/zkoss/util/resource/impl/LabelLoaderImpl.java - About 45 mins to fix

                      Method parseMultiple has 6 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          parseMultiple(Map<? super String, Collection<String>> map,
                          String src, char separator, char quote, boolean asValue,
                          boolean parenthesis) throws IllegalSyntaxException {
                      Severity: Minor
                      Found in zcommon/src/main/java/org/zkoss/util/Maps.java - About 45 mins to fix

                        Method resolveVariable has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public Object resolveVariable(String name) throws XelException {
                                if (_vars != null) {
                                    final Object o = _vars.get(name);
                                    if (o != null)
                                        return o;
                        Severity: Minor
                        Found in zcommon/src/main/java/org/zkoss/xel/util/SimpleResolver.java - About 45 mins 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

                        Avoid deeply nested control flow statements.
                        Open

                                                if (buf.charAt(j) == '>') {
                                                    buf.insert(j + 1, zktags);
                                                    return; // done
                                                }
                        Severity: Major
                        Found in zhtml/src/main/java/org/zkoss/zhtml/Utils.java - About 45 mins to fix

                          Method parse has 6 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              parse(Map<? super String, ? super String> map,
                              String src, char separator, char quote, boolean asValue,
                              boolean parenthesis) throws IllegalSyntaxException {
                          Severity: Minor
                          Found in zcommon/src/main/java/org/zkoss/util/Maps.java - About 45 mins to fix

                            Method toArray has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                @SuppressWarnings("unchecked")
                                public static final <T> T[] toArray(Collection<? extends T> col, T[] dst, int from, int to) {
                                    int sz = col.size();
                                    if (to > sz) to = sz;
                                    if (from < 0) from = 0;
                            Severity: Minor
                            Found in zcommon/src/main/java/org/zkoss/util/CollectionsX.java - About 45 mins 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 hasNext has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public boolean hasNext() {
                                    //Note: we cannot just check hasNext() since it does not throw
                                    //ConcurrentModificationException, so if _col is cleared, hasNext()
                                    //might still return true! Moreover, hasNext() might return false
                                    //while there is more
                            Severity: Minor
                            Found in zcommon/src/main/java/org/zkoss/util/ComodifiableIterator.java - About 45 mins 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 convertSubversion has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                private static final int convertSubversion(String subver) {
                                    try {
                                        return Integer.parseInt(subver);
                                    } catch (Throwable ex) { //eat
                                    }
                            Severity: Minor
                            Found in zcommon/src/main/java/org/zkoss/util/Utils.java - About 45 mins 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 load0 has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                private void load0(String prefix, TaglibDefinition loaded) {
                                    if (!loaded.functions.isEmpty()) {
                                        if (_mtds == null)
                                            _mtds = new HashMap<String, Function>(8);
                                        for (Map.Entry<String, Function> me: loaded.functions.entrySet())
                            Severity: Minor
                            Found in zcommon/src/main/java/org/zkoss/xel/util/TaglibMapper.java - About 45 mins 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 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                public void render(Page page, Writer out) throws IOException {
                                    final Execution exec = Executions.getCurrent();
                                    final String ctl = ExecutionsCtrl.getPageRedrawControl(exec);
                                    boolean au = exec.isAsyncUpdate(null);
                                    if (!au && (page.isComplete() || "complete".equals(ctl))) {
                            Severity: Minor
                            Found in zhtml/src/main/java/org/zkoss/zhtml/impl/PageRenderer.java - About 45 mins 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 getName has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                            Open

                                private static String getName(URL url) {
                                    String name = url.getPath();
                                    if (name != null) {
                                        {
                                            final int j = name.lastIndexOf(File.pathSeparatorChar);
                            Severity: Minor
                            Found in zcommon/src/main/java/org/zkoss/image/AImage.java - About 45 mins 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