zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java

Summary

Maintainability
F
2 wks
Test Coverage

File ELSupport.java has 631 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
Severity: Major
Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 1 day to fix

    Method compare has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
    Open

        public static final int compare(final Object obj0, final Object obj1)
                throws ELException {
            if (obj0 == obj1 || equals(obj0, obj1)) {
                return 0;
            }
    Severity: Minor
    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 6 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 coerceToType has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
    Open

        public static final Object coerceToType(final Object obj,
                Class<?> type) throws ELException {
    
            if (type == null || Object.class.equals(type) ||
                    (obj != null && type.isAssignableFrom(obj.getClass()))) {
    Severity: Minor
    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 5 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 coerceToTypeForSetValue has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
    Open

        protected static final Object coerceToTypeForSetValue(final Object obj,
                Class<?> type) throws ELException {
            if (type == null || Object.class.equals(type) ||
                    (obj != null && type.isAssignableFrom(obj.getClass()))) {
                return obj;
    Severity: Minor
    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 5 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 coerceToCollection has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
    Open

        @SuppressWarnings({ "rawtypes", "unchecked" })
        private static Object coerceToCollection(Object obj, Class<?> type) {
            if(obj==null) return null;
            // since 8.0.0 support proxy form binding
            if (ProxyFactory.isProxyClass(type)) {
    Severity: Minor
    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 3 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 23 (exceeds 5 allowed). Consider refactoring.
    Open

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

        public static final boolean equals(final Object obj0, final Object obj1)
                throws ELException {
            if (obj0 == obj1) {
                return true;
            } else if (obj0 == null || obj1 == null) {
    Severity: Minor
    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 3 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 coerceToType has 68 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public static final Object coerceToType(final Object obj,
                Class<?> type) throws ELException {
    
            if (type == null || Object.class.equals(type) ||
                    (obj != null && type.isAssignableFrom(obj.getClass()))) {
    Severity: Major
    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 2 hrs to fix

      Method compare has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static final int compare(final Object obj0, final Object obj1)
                  throws ELException {
              if (obj0 == obj1 || equals(obj0, obj1)) {
                  return 0;
              }
      Severity: Major
      Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 2 hrs to fix

        ELSupport has 24 methods (exceeds 20 allowed). Consider refactoring.
        Open

        public class ELSupport {
            //20120418, henrichen: moved from org.zkoss.zel.impl.parser.AstValue (ZK-1062)
            private static final boolean IS_SECURITY_ENABLED =
                (System.getSecurityManager() != null);
            
        Severity: Minor
        Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 2 hrs to fix

          Method coerceToNumber has 66 lines of code (exceeds 25 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: Major
          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 2 hrs to fix

            Method coerceToTypeForSetValue has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                protected static final Object coerceToTypeForSetValue(final Object obj,
                        Class<?> type) throws ELException {
                    if (type == null || Object.class.equals(type) ||
                            (obj != null && type.isAssignableFrom(obj.getClass()))) {
                        return obj;
            Severity: Minor
            Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 1 hr to fix

              Method coerceToNumber has 41 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  protected static final Number coerceToNumber(final Number number,
                          final Class<?> type) throws ELException {
                      if (Long.TYPE == type || Long.class.equals(type)) {
                          return Long.valueOf(number.longValue());
                      }
              Severity: Minor
              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 1 hr to fix

                Method coerceToNumber has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                    public static final Number coerceToNumber(final Object obj,
                            final Class<?> type) throws ELException {
                
                        if (!COERCE_TO_ZERO) {
                            if (obj == null && !type.isPrimitive()) {
                Severity: Minor
                Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 1 hr 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 coerceToCollection has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    @SuppressWarnings({ "rawtypes", "unchecked" })
                    private static Object coerceToCollection(Object obj, Class<?> type) {
                        if(obj==null) return null;
                        // since 8.0.0 support proxy form binding
                        if (ProxyFactory.isProxyClass(type)) {
                Severity: Minor
                Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 1 hr to fix

                  Method equals has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static final boolean equals(final Object obj0, final Object obj1)
                              throws ELException {
                          if (obj0 == obj1) {
                              return true;
                          } else if (obj0 == null || obj1 == null) {
                  Severity: Minor
                  Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 1 hr to fix

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

                        public static final Boolean coerceToBoolean(final Object obj,
                                boolean primitive) throws ELException {
                    
                            if (!COERCE_TO_ZERO && !primitive) {
                                if (obj == null) {
                    Severity: Minor
                    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.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 coerceToDateTime has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                        @SuppressWarnings("unchecked")
                        public static final java.util.Date coerceToDateTime(final Object obj,
                                @SuppressWarnings("rawtypes") Class type) throws ELException {
                            if (obj == null || "".equals(obj)) {
                                return null;
                    Severity: Minor
                    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 35 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 too many return statements within this method.
                    Open

                                    return (bi1 == null) ? 0 : -1;
                    Severity: Major
                    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                          return new ArrayList((Collection)obj);
                      Severity: Major
                      Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                            return new TreeSet((Collection)obj);
                        Severity: Major
                        Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                          return editor.getValue();
                          Severity: Major
                          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                        return coerceToNumber(obj, type);
                            Severity: Major
                            Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                                  return new HashSet((Collection)obj);
                              Severity: Major
                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                            return Objects.equals(d0, d1);
                                Severity: Major
                                Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                              return Objects.equals(bd0, bd1);
                                  Severity: Major
                                  Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                return BigDecimal.valueOf(number.doubleValue());
                                    Severity: Major
                                    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                  return number;
                                      Severity: Major
                                      Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                        return 1;
                                        Severity: Major
                                        Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                          return number;
                                          Severity: Major
                                          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                        return number.floatValue();
                                            Severity: Major
                                            Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                          return coerceToNumber(Short.valueOf((short) ((Character) obj)
                                                                  .charValue()), type);
                                              Severity: Major
                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                            return coerceToDateTime(obj, type);
                                                Severity: Major
                                                Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                              return coerceToDateTime(obj, type);
                                                  Severity: Major
                                                  Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                return l0.compareTo(l1);
                                                    Severity: Major
                                                    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                      return comparisonResult;
                                                      Severity: Major
                                                      Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                    return false;
                                                        Severity: Major
                                                        Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                          return null;
                                                          Severity: Major
                                                          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                            Avoid too many return statements within this method.
                                                            Open

                                                                        return coerceToCollection(obj, type);
                                                            Severity: Major
                                                            Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                              Avoid too many return statements within this method.
                                                              Open

                                                                                  return editor.getValue();
                                                              Severity: Major
                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                            return bi0.compareTo(bi1);
                                                                Severity: Major
                                                                Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                  return Byte.valueOf(val);
                                                                  Severity: Major
                                                                  Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                return coerceToEnum(obj, type);
                                                                    Severity: Major
                                                                    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                                      return 1;
                                                                      Severity: Major
                                                                      Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                    return true;
                                                                        Severity: Major
                                                                        Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                          return Short.valueOf(val);
                                                                          Severity: Major
                                                                          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                        return coerceToArray(obj, type);
                                                                            Severity: Major
                                                                            Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                          return coerceToString(obj0).compareTo(coerceToString(obj1));
                                                                              Severity: Major
                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                            return number.shortValue();
                                                                                Severity: Major
                                                                                Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                                  return Float.valueOf(val);
                                                                                  Severity: Major
                                                                                  Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                return null;
                                                                                    Severity: Major
                                                                                    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                                          return null;
                                                                                      Severity: Major
                                                                                      Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                        return (d1 == null) ? 0 : -1;
                                                                                        Severity: Major
                                                                                        Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                      return d0.compareTo(d1);
                                                                                          Severity: Major
                                                                                          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                            return new BigDecimal(val);
                                                                                            Severity: Major
                                                                                            Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                              return -1;
                                                                                              Severity: Major
                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                            return Objects.equals(coerceToBoolean(obj0, false), coerceToBoolean(obj1, false));
                                                                                                Severity: Major
                                                                                                Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                              return Objects.equals(l0, l1);
                                                                                                  Severity: Major
                                                                                                  Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                return coerceToEnum(obj, type);
                                                                                                    Severity: Major
                                                                                                    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                  return null;
                                                                                                      Severity: Major
                                                                                                      Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                                    return coerceToBoolean(obj, Boolean.TYPE == type);
                                                                                                        Severity: Major
                                                                                                        Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                      return Collections.EMPTY_MAP;
                                                                                                          Severity: Major
                                                                                                          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                            return new LinkedList((Collection)obj);
                                                                                                            Severity: Major
                                                                                                            Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                          return (obj1 != null) ? comparable.compareTo(obj1) : 1;
                                                                                                              Severity: Major
                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                                return new BigDecimal((BigInteger) number);
                                                                                                                Severity: Major
                                                                                                                Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                  Avoid too many return statements within this method.
                                                                                                                  Open

                                                                                                                              return (obj == null || "".equals(obj)) && !type.isPrimitive() && COERCE_NULL_TO_NULL ? null : coerceToCharacter(obj);
                                                                                                                  Severity: Major
                                                                                                                  Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                    Avoid too many return statements within this method.
                                                                                                                    Open

                                                                                                                                        return new LinkedList((Collection)obj);
                                                                                                                    Severity: Major
                                                                                                                    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                      Avoid too many return statements within this method.
                                                                                                                      Open

                                                                                                                                          return new LinkedHashSet((Collection)obj);
                                                                                                                      Severity: Major
                                                                                                                      Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                        Avoid too many return statements within this method.
                                                                                                                        Open

                                                                                                                                        return new LinkedHashSet((Collection)obj);
                                                                                                                        Severity: Major
                                                                                                                        Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                          Avoid too many return statements within this method.
                                                                                                                          Open

                                                                                                                                          return (l1 == null) ? 0 : -1;
                                                                                                                          Severity: Major
                                                                                                                          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                            Avoid too many return statements within this method.
                                                                                                                            Open

                                                                                                                                                    return null;
                                                                                                                            Severity: Major
                                                                                                                            Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                              Avoid too many return statements within this method.
                                                                                                                              Open

                                                                                                                                              return 1;
                                                                                                                              Severity: Major
                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                                Avoid too many return statements within this method.
                                                                                                                                Open

                                                                                                                                                return number;
                                                                                                                                Severity: Major
                                                                                                                                Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                                  Avoid too many return statements within this method.
                                                                                                                                  Open

                                                                                                                                              return coerceToCharacter(obj);
                                                                                                                                  Severity: Major
                                                                                                                                  Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                                    Avoid too many return statements within this method.
                                                                                                                                    Open

                                                                                                                                                return Objects.equals(bi0, bi1);
                                                                                                                                    Severity: Major
                                                                                                                                    Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                                      Avoid too many return statements within this method.
                                                                                                                                      Open

                                                                                                                                                  return BigInteger.valueOf(number.longValue());
                                                                                                                                      Severity: Major
                                                                                                                                      Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                                        Avoid too many return statements within this method.
                                                                                                                                        Open

                                                                                                                                                    return coerceToCollection(obj, type);
                                                                                                                                        Severity: Major
                                                                                                                                        Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                                          Avoid too many return statements within this method.
                                                                                                                                          Open

                                                                                                                                                      return number.byteValue();
                                                                                                                                          Severity: Major
                                                                                                                                          Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                                            Avoid too many return statements within this method.
                                                                                                                                            Open

                                                                                                                                                        return (obj == null || "".equals(obj)) && !type.isPrimitive() && COERCE_NULL_TO_NULL ? null : coerceToBoolean(obj, true);
                                                                                                                                            Severity: Major
                                                                                                                                            Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 30 mins to fix

                                                                                                                                              Method isStringFloat has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                  public static final boolean isStringFloat(final String str) {
                                                                                                                                                      int len = str.length();
                                                                                                                                                      if (len > 1) {
                                                                                                                                                          for (int i = 0; i < len; i++) {
                                                                                                                                                              switch (str.charAt(i)) {
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java - About 25 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

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

                                                                                                                                                      if (isDoubleOp(obj0, obj1)) {
                                                                                                                                                          Double d0 = (Double) coerceToNumber(obj0, Double.class);
                                                                                                                                                          Double d1 = (Double) coerceToNumber(obj1, Double.class);
                                                                                                                                                          if (d0 == null) {
                                                                                                                                                              return (d1 == null) ? 0 : -1;
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 3 other locations - About 1 hr to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 155..164
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 175..184
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 185..194

                                                                                                                                              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 88.

                                                                                                                                              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 4 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (isLongOp(obj0, obj1)) {
                                                                                                                                                          Long l0 = (Long) coerceToNumber(obj0, Long.class);
                                                                                                                                                          Long l1 = (Long) coerceToNumber(obj1, Long.class);
                                                                                                                                                          if (l0 == null) {
                                                                                                                                                              return (l1 == null) ? 0 : -1;
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 3 other locations - About 1 hr to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 155..164
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 165..174
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 175..184

                                                                                                                                              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 88.

                                                                                                                                              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 4 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (isBigIntegerOp(obj0, obj1)) {
                                                                                                                                                          BigInteger bi0 = (BigInteger) coerceToNumber(obj0, BigInteger.class);
                                                                                                                                                          BigInteger bi1 = (BigInteger) coerceToNumber(obj1, BigInteger.class);
                                                                                                                                                          if (bi0 == null) {
                                                                                                                                                              return (bi1 == null) ? 0 : -1;
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 3 other locations - About 1 hr to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 155..164
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 165..174
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 185..194

                                                                                                                                              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 88.

                                                                                                                                              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 4 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (isBigDecimalOp(obj0, obj1)) {
                                                                                                                                                          BigDecimal bd0 = (BigDecimal) coerceToNumber(obj0, BigDecimal.class);
                                                                                                                                                          BigDecimal bd1 = (BigDecimal) coerceToNumber(obj1, BigDecimal.class);
                                                                                                                                                          if (bd0 == null) {
                                                                                                                                                              return (bd1 == null) ? 0 : -1;
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 3 other locations - About 1 hr to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 165..174
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 175..184
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 185..194

                                                                                                                                              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 88.

                                                                                                                                              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 2 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                          if(Set.class.isAssignableFrom(type)){
                                                                                                                                                              if(Set.class.equals(type) || LinkedHashSet.class.isAssignableFrom(type)){
                                                                                                                                                                  return new LinkedHashSet((Collection)obj);
                                                                                                                                                              }else if(HashSet.class.isAssignableFrom(type)){
                                                                                                                                                                  return new HashSet((Collection)obj);
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 1 other location - About 1 hr to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 717..727

                                                                                                                                              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 72.

                                                                                                                                              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 2 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                          }else if(List.class.isAssignableFrom(type)){
                                                                                                                                                              if(List.class.equals(type) || LinkedList.class.isAssignableFrom(type)){
                                                                                                                                                                  return new LinkedList((Collection)obj);
                                                                                                                                                              }else if(ArrayList.class.isAssignableFrom(type)){
                                                                                                                                                                  return new ArrayList((Collection)obj);
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 1 other location - About 1 hr to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 707..717

                                                                                                                                              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 72.

                                                                                                                                              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 3 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                  static {
                                                                                                                                                      if (IS_SECURITY_ENABLED) {
                                                                                                                                                          COERCE_NULL_TO_NULL = AccessController.doPrivileged(
                                                                                                                                                                  new PrivilegedAction<Boolean>(){
                                                                                                                                                                      public Boolean run() {
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 2 other locations - About 55 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 100..118
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/util/Validation.java on lines 41..58

                                                                                                                                              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 63.

                                                                                                                                              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 3 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                  static {
                                                                                                                                                      if (IS_SECURITY_ENABLED) {
                                                                                                                                                          COERCE_TO_ZERO = AccessController.doPrivileged(
                                                                                                                                                                  new PrivilegedAction<Boolean>(){
                                                                                                                                                                      
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 2 other locations - About 55 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 76..93
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/util/Validation.java on lines 41..58

                                                                                                                                              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 63.

                                                                                                                                              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 6 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (Short.TYPE == type || Short.class.equals(type)) {
                                                                                                                                                          try {
                                                                                                                                                              return Short.valueOf(val);
                                                                                                                                                          } catch (NumberFormatException nfe) {
                                                                                                                                                              throw new ELException(MessageFactory.get("error.convert",
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 5 other locations - About 40 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 427..434
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 435..442
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 443..450
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 467..474
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 483..490

                                                                                                                                              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 52.

                                                                                                                                              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 6 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (Integer.TYPE == type || Integer.class.equals(type)) {
                                                                                                                                                          try {
                                                                                                                                                              return Integer.valueOf(val);
                                                                                                                                                          } catch (NumberFormatException nfe) {
                                                                                                                                                              throw new ELException(MessageFactory.get("error.convert",
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 5 other locations - About 40 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 427..434
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 443..450
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 467..474
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 475..482
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 483..490

                                                                                                                                              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 52.

                                                                                                                                              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 6 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (Double.TYPE == type || Double.class.equals(type)) {
                                                                                                                                                          try {
                                                                                                                                                              return Double.valueOf(val);
                                                                                                                                                          } catch (NumberFormatException nfe) {
                                                                                                                                                              throw new ELException(MessageFactory.get("error.convert",
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 5 other locations - About 40 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 427..434
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 435..442
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 467..474
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 475..482
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 483..490

                                                                                                                                              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 52.

                                                                                                                                              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 6 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (Long.TYPE == type || Long.class.equals(type)) {
                                                                                                                                                          try {
                                                                                                                                                              return Long.valueOf(val);
                                                                                                                                                          } catch (NumberFormatException nfe) {
                                                                                                                                                              throw new ELException(MessageFactory.get("error.convert",
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 5 other locations - About 40 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 435..442
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 443..450
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 467..474
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 475..482
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 483..490

                                                                                                                                              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 52.

                                                                                                                                              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 6 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (Float.TYPE == type || Float.class.equals(type)) {
                                                                                                                                                          try {
                                                                                                                                                              return Float.valueOf(val);
                                                                                                                                                          } catch (NumberFormatException nfe) {
                                                                                                                                                              throw new ELException(MessageFactory.get("error.convert",
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 5 other locations - About 40 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 427..434
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 435..442
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 443..450
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 467..474
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 475..482

                                                                                                                                              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 52.

                                                                                                                                              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 6 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (Byte.TYPE == type || Byte.class.equals(type)) {
                                                                                                                                                          try {
                                                                                                                                                              return Byte.valueOf(val);
                                                                                                                                                          } catch (NumberFormatException nfe) {
                                                                                                                                                              throw new ELException(MessageFactory.get("error.convert",
                                                                                                                                              Severity: Major
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 5 other locations - About 40 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 427..434
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 435..442
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 443..450
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 475..482
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 483..490

                                                                                                                                              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 52.

                                                                                                                                              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 (ProxyFactory.isProxyClass(type)) {
                                                                                                                                                          type = type.getSuperclass();
                                                                                                                                                          if (obj != null && type.isAssignableFrom(obj.getClass()))
                                                                                                                                                              return obj;
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 2 other locations - About 30 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 590..594
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 688..692

                                                                                                                                              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 42.

                                                                                                                                              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 (ProxyFactory.isProxyClass(type)) {
                                                                                                                                                          type = type.getSuperclass();
                                                                                                                                                          if (obj != null && type.isAssignableFrom(obj.getClass()))
                                                                                                                                                              return obj;
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 2 other locations - About 30 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 524..528
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 590..594

                                                                                                                                              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 42.

                                                                                                                                              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 (ProxyFactory.isProxyClass(type)) {
                                                                                                                                                          type = type.getSuperclass();
                                                                                                                                                          if (obj != null && type.isAssignableFrom(obj.getClass()))
                                                                                                                                                              return obj;
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 2 other locations - About 30 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 524..528
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 688..692

                                                                                                                                              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 42.

                                                                                                                                              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 2 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (type == null || Object.class.equals(type) ||
                                                                                                                                                              (obj != null && type.isAssignableFrom(obj.getClass()))) {
                                                                                                                                                          return obj;
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 1 other location - About 30 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 574..577

                                                                                                                                              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 42.

                                                                                                                                              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 2 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (type == null || Object.class.equals(type) ||
                                                                                                                                                              (obj != null && type.isAssignableFrom(obj.getClass()))) {
                                                                                                                                                          return obj;
                                                                                                                                                      }
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 1 other location - About 30 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 516..519

                                                                                                                                              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 42.

                                                                                                                                              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 (isBigDecimalOp(obj0, obj1)) {
                                                                                                                                                          BigDecimal bd0 = (BigDecimal) coerceToNumber(obj0, BigDecimal.class);
                                                                                                                                                          BigDecimal bd1 = (BigDecimal) coerceToNumber(obj1, BigDecimal.class);
                                                                                                                                                          return Objects.equals(bd0, bd1);
                                                                                                                                                      } else if (isDoubleOp(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 245..249

                                                                                                                                              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 (isBigIntegerOp(obj0, obj1)) {
                                                                                                                                                          BigInteger bi0 = (BigInteger) coerceToNumber(obj0, BigInteger.class);
                                                                                                                                                          BigInteger bi1 = (BigInteger) coerceToNumber(obj1, BigInteger.class);
                                                                                                                                                          return Objects.equals(bi0, bi1);
                                                                                                                                                      } else         if (isLongOp(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 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 (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

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

                                                                                                                                                      if (BigDecimal.class.equals(type)) {
                                                                                                                                                          try {
                                                                                                                                                              return new BigDecimal(val);
                                                                                                                                                          } catch (NumberFormatException nfe) {
                                                                                                                                                              throw new ELException(MessageFactory.get("error.convert",
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 1 other location - About 30 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 451..458

                                                                                                                                              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 2 locations. Consider refactoring.
                                                                                                                                              Open

                                                                                                                                                      if (BigInteger.class.equals(type)) {
                                                                                                                                                          try {
                                                                                                                                                              return new BigInteger(val);
                                                                                                                                                          } catch (NumberFormatException nfe) {
                                                                                                                                                              throw new ELException(MessageFactory.get("error.convert",
                                                                                                                                              Severity: Minor
                                                                                                                                              Found in zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java and 1 other location - About 30 mins to fix
                                                                                                                                              zel/src/main/java/org/zkoss/zel/impl/lang/ELSupport.java on lines 459..466

                                                                                                                                              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

                                                                                                                                              There are no issues that match your filters.

                                                                                                                                              Category
                                                                                                                                              Status