Showing 7,775 of 7,775 total issues

Avoid too many return statements within this function.
Open

                            return;
Severity: Major
Found in zul/src/main/resources/web/js/zul/db/datefmt.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                                return;//failed
    Severity: Major
    Found in zul/src/main/resources/web/js/zul/db/datefmt.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                                  return;
      Severity: Major
      Found in zul/src/main/resources/web/js/zul/db/datefmt.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    if (typeA == 'function' && typeB == 'function') return true; //ignore functions
        Severity: Major
        Found in zk/src/main/resources/web/js/zk/utl.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                                      return;
          Severity: Major
          Found in zul/src/main/resources/web/js/zul/db/datefmt.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return null;
            Severity: Major
            Found in eslint-plugin-zk/src/tree.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return true;
              Severity: Major
              Found in eslint-plugin-zk/src/tree.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return node === expr.alternate || node === expr.consequent;
                Severity: Major
                Found in eslint-plugin-zk/src/tree.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                                      return;
                  Severity: Major
                  Found in eslint-plugin-zk/src/rules/noLocationHrefAssign.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return node === expr.body;
                    Severity: Major
                    Found in eslint-plugin-zk/src/tree.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                  return isElement;
                      Severity: Major
                      Found in eslint-plugin-zk/src/tree.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return false;
                        Severity: Major
                        Found in eslint-plugin-zk/src/tree.ts - About 30 mins to fix

                          Identical blocks of code found in 4 locations. Consider refactoring.
                          Open

                                  } else         if (isLongOp(obj0, obj1)) {
                                      Long l0 = (Long) coerceToNumber(obj0, Long.class);
                                      Long l1 = (Long) coerceToNumber(obj1, Long.class);
                                      return Objects.equals(l0, l1);
                                  } else if (obj0 instanceof Boolean || obj1 instanceof Boolean) {
                          Severity: Major
                          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 3 other locations - About 30 mins to fix
                          zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 249..253
                          zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 245..249
                          zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 241..245

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 40.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 4 locations. Consider refactoring.
                          Open

                                  } else if (isDoubleOp(obj0, obj1)) {
                                      Double d0 = (Double) coerceToNumber(obj0, Double.class);
                                      Double d1 = (Double) coerceToNumber(obj1, Double.class);
                                      return Objects.equals(d0, d1);
                                  } else if (isBigIntegerOp(obj0, obj1)) {
                          Severity: Major
                          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 3 other locations - About 30 mins to fix
                          zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 253..257
                          zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 249..253
                          zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 241..245

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 40.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 9 locations. Consider refactoring.
                          Open

                              public void setSessionCacheClass(Class<?> cls) {
                                  if (cls != null && !SessionCache.class.isAssignableFrom(cls))
                                      throw new IllegalArgumentException("SessionCache not implemented: " + cls);
                                  _sesscachecls = cls;
                              }
                          Severity: Major
                          Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java and 8 other locations - About 30 mins to fix
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1385..1389
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1429..1433
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1452..1456
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1473..1477
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1494..1498
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1516..1520
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1560..1564
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1583..1587

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 40.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 3 locations. Consider refactoring.
                          Open

                                      if (min < 0)
                                          if (max < 0)
                                              min = 0;
                                          else
                                              min = max - cnt + 1;
                          Severity: Minor
                          Found in zul/src/main/java/org/zkoss/zul/impl/GridDataLoader.java and 2 other locations - About 30 mins to fix
                          zul/src/main/java/org/zkoss/zul/Combobox.java on lines 276..280
                          zul/src/main/java/org/zkoss/zul/impl/ListboxDataLoader.java on lines 130..134

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 40.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if (browser == Browser.Firefox || browser == Browser.WebKit) {
                                      sb.append("\t display:\t").append(browser.getPrefix()).append("box;\n");
                                  }
                          Severity: Minor
                          Found in zweb/src/main/java/org/zkoss/web/fn/ThemeFns.java and 2 other locations - About 30 mins to fix
                          zweb/src/main/java/org/zkoss/web/fn/ThemeFns.java on lines 294..296
                          zweb/src/main/java/org/zkoss/web/fn/ThemeFns.java on lines 312..314

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 40.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if (pkgFrom == null || pkgFrom.length() == 0 || pkgTo == null || pkgTo.length() == 0)
                                      throw new IllegalArgumentException();
                          zk/src/main/java/org/zkoss/zk/ui/metainfo/LanguageDefinition.java on lines 877..878
                          zk/src/main/java/org/zkoss/zk/ui/metainfo/LanguageDefinition.java on lines 1141..1142

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 40.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 9 locations. Consider refactoring.
                          Open

                              public void setAuDecoderClass(Class<?> cls) {
                                  if (cls != null && !AuDecoder.class.isAssignableFrom(cls))
                                      throw new IllegalArgumentException("AuDecoder not implemented: " + cls);
                                  _audeccls = cls;
                              }
                          Severity: Major
                          Found in zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java and 8 other locations - About 30 mins to fix
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1385..1389
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1429..1433
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1452..1456
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1473..1477
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1494..1498
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1516..1520
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1539..1543
                          zk/src/main/java/org/zkoss/zk/ui/util/Configuration.java on lines 1560..1564

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 40.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if (browser == Browser.Firefox || browser == Browser.WebKit) {
                                      sb.append("\t display:\t").append(browser.getPrefix()).append("box;\n");
                                  }
                          Severity: Minor
                          Found in zweb/src/main/java/org/zkoss/web/fn/ThemeFns.java and 2 other locations - About 30 mins to fix
                          zweb/src/main/java/org/zkoss/web/fn/ThemeFns.java on lines 278..280
                          zweb/src/main/java/org/zkoss/web/fn/ThemeFns.java on lines 294..296

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 40.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Severity
                          Category
                          Status
                          Source
                          Language