deeplearning4j/deeplearning4j

View on GitHub
nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java

Summary

Maintainability
F
1 wk
Test Coverage

File ObjectUtils.java has 560 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 *  ******************************************************************************
 *  *
 *  *
 *  * This program and the accompanying materials are made available under the
Severity: Major
Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 1 day to fix

    Method nullSafeEquals has a Cognitive Complexity of 56 (exceeds 5 allowed). Consider refactoring.
    Open

        public static boolean nullSafeEquals(Object o1, Object o2) {
            if (o1 == o2) {
                return true;
            } else if (o1 != null && o2 != null) {
                if (o1.equals(o2)) {
    Severity: Minor
    Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 1 day 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 nullSafeHashCode has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
    Open

        public static int nullSafeHashCode(Object obj) {
            if (obj == null) {
                return 0;
            } else {
                if (obj.getClass().isArray()) {
    Severity: Minor
    Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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

    ObjectUtils has 39 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public abstract class ObjectUtils {
        private static final int INITIAL_HASH = 7;
        private static final int MULTIPLIER = 31;
        private static final String EMPTY_STRING = "";
        private static final String NULL_STRING = "null";
    Severity: Minor
    Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 5 hrs to fix

      Method nullSafeToString has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
      Open

          public static String nullSafeToString(Object obj) {
              if (obj == null) {
                  return "null";
              } else if (obj instanceof String) {
                  return (String) obj;
      Severity: Minor
      Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeEquals has 40 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static boolean nullSafeEquals(Object o1, Object o2) {
              if (o1 == o2) {
                  return true;
              } else if (o1 != null && o2 != null) {
                  if (o1.equals(o2)) {
      Severity: Minor
      Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 1 hr to fix

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

            public static String nullSafeToString(char[] array) {
                if (array == null) {
                    return "null";
                } else {
                    int length = array.length;
        Severity: Minor
        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeToString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public static String nullSafeToString(byte[] array) {
                if (array == null) {
                    return "null";
                } else {
                    int length = array.length;
        Severity: Minor
        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeToString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public static String nullSafeToString(int[] array) {
                if (array == null) {
                    return "null";
                } else {
                    int length = array.length;
        Severity: Minor
        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeToString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public static String nullSafeToString(float[] array) {
                if (array == null) {
                    return "null";
                } else {
                    int length = array.length;
        Severity: Minor
        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeToString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public static String nullSafeToString(double[] array) {
                if (array == null) {
                    return "null";
                } else {
                    int length = array.length;
        Severity: Minor
        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeToString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public static String nullSafeToString(long[] array) {
                if (array == null) {
                    return "null";
                } else {
                    int length = array.length;
        Severity: Minor
        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeToString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public static String nullSafeToString(Object[] array) {
                if (array == null) {
                    return "null";
                } else {
                    int length = array.length;
        Severity: Minor
        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeToString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public static String nullSafeToString(boolean[] array) {
                if (array == null) {
                    return "null";
                } else {
                    int length = array.length;
        Severity: Minor
        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeToString has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
        Open

            public static String nullSafeToString(short[] array) {
                if (array == null) {
                    return "null";
                } else {
                    int length = array.length;
        Severity: Minor
        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeHashCode has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static int nullSafeHashCode(Object obj) {
                if (obj == null) {
                    return 0;
                } else {
                    if (obj.getClass().isArray()) {
        Severity: Minor
        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 1 hr to fix

          Method isCompatibleWithThrowsClause has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              public static boolean isCompatibleWithThrowsClause(Throwable ex, Class[] declaredExceptions) {
                  if (!isCheckedException(ex)) {
                      return true;
                  } else {
                      if (declaredExceptions != null) {
          Severity: Minor
          Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 toObjectArray has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

              public static Object[] toObjectArray(Object source) {
                  if (source instanceof Object[]) {
                      return (Object[]) source;
                  } else if (source == null) {
                      return new Object[0];
          Severity: Minor
          Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeToString has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static String nullSafeToString(Object obj) {
                  if (obj == null) {
                      return "null";
                  } else if (obj instanceof String) {
                      return (String) obj;
          Severity: Minor
          Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 1 hr to fix

            Method containsConstant has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
            Open

                public static boolean containsConstant(Enum<?>[] enumValues, String constant, boolean caseSensitive) {
                    Enum[] arr$ = enumValues;
                    int len$ = enumValues.length;
                    int i$ = 0;
            
            
            Severity: Minor
            Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 55 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 containsElement has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
            Open

                public static boolean containsElement(Object[] array, Object element) {
                    if (array == null) {
                        return false;
                    } else {
                        Object[] arr$ = array;
            Severity: Minor
            Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.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 nullSafeHashCode((short[]) obj);
            Severity: Major
            Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                                      return Arrays.equals((short[]) o1, (short[]) o2);
              Severity: Major
              Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                                return true;
                Severity: Major
                Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                                      return nullSafeHashCode((int[]) obj);
                  Severity: Major
                  Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                                            return Arrays.equals((long[]) o1, (long[]) o2);
                    Severity: Major
                    Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                                  return nullSafeToString((boolean[]) obj);
                      Severity: Major
                      Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                            return nullSafeHashCode((double[]) obj);
                        Severity: Major
                        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                                  return Arrays.equals((float[]) o1, (float[]) o2);
                          Severity: Major
                          Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                    return Arrays.equals((int[]) o1, (int[]) o2);
                            Severity: Major
                            Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                              return false;
                              Severity: Major
                              Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                            return 0;
                                Severity: Major
                                Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                                          return Arrays.equals((char[]) o1, (char[]) o2);
                                  Severity: Major
                                  Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                                return obj.hashCode();
                                    Severity: Major
                                    Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                                  return nullSafeToString((Object[]) obj);
                                      Severity: Major
                                      Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                                    return true;
                                        Severity: Major
                                        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                      return nullSafeToString((double[]) obj);
                                          Severity: Major
                                          Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                        return nullSafeToString((char[]) obj);
                                            Severity: Major
                                            Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                          return nullSafeToString((float[]) obj);
                                              Severity: Major
                                              Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                                Avoid too many return statements within this method.
                                                Open

                                                                        return Arrays.equals((double[]) o1, (double[]) o2);
                                                Severity: Major
                                                Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                                  Avoid too many return statements within this method.
                                                  Open

                                                              return (String) obj;
                                                  Severity: Major
                                                  Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                                    Avoid too many return statements within this method.
                                                    Open

                                                                        return nullSafeHashCode((long[]) obj);
                                                    Severity: Major
                                                    Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                                      Avoid too many return statements within this method.
                                                      Open

                                                                  return nullSafeToString((byte[]) obj);
                                                      Severity: Major
                                                      Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                                        Avoid too many return statements within this method.
                                                        Open

                                                                    return "null";
                                                        Severity: Major
                                                        Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

                                                          Avoid too many return statements within this method.
                                                          Open

                                                                              return nullSafeHashCode((float[]) obj);
                                                          Severity: Major
                                                          Found in nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java - About 30 mins to fix

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

                                                                public static String nullSafeToString(long[] array) {
                                                                    if (array == null) {
                                                                        return "null";
                                                                    } else {
                                                                        int length = array.length;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 491..515
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 517..541
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 569..593
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 595..619
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 621..645
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 673..697

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

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

                                                                public static String nullSafeToString(int[] array) {
                                                                    if (array == null) {
                                                                        return "null";
                                                                    } else {
                                                                        int length = array.length;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 491..515
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 517..541
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 569..593
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 595..619
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 647..671
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 673..697

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

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

                                                                public static String nullSafeToString(float[] array) {
                                                                    if (array == null) {
                                                                        return "null";
                                                                    } else {
                                                                        int length = array.length;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 491..515
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 517..541
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 569..593
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 621..645
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 647..671
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 673..697

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

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

                                                                public static String nullSafeToString(boolean[] array) {
                                                                    if (array == null) {
                                                                        return "null";
                                                                    } else {
                                                                        int length = array.length;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 517..541
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 569..593
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 595..619
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 621..645
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 647..671
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 673..697

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

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

                                                                public static String nullSafeToString(short[] array) {
                                                                    if (array == null) {
                                                                        return "null";
                                                                    } else {
                                                                        int length = array.length;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 491..515
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 517..541
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 569..593
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 595..619
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 621..645
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 647..671

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

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

                                                                public static String nullSafeToString(byte[] array) {
                                                                    if (array == null) {
                                                                        return "null";
                                                                    } else {
                                                                        int length = array.length;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 491..515
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 569..593
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 595..619
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 621..645
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 647..671
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 673..697

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

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

                                                                public static String nullSafeToString(double[] array) {
                                                                    if (array == null) {
                                                                        return "null";
                                                                    } else {
                                                                        int length = array.length;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 491..515
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 517..541
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 595..619
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 621..645
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 647..671
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 673..697

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

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

                                                                public static int nullSafeHashCode(float[] array) {
                                                                    if (array == null) {
                                                                        return 0;
                                                                    } else {
                                                                        int hash = 7;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 268..281
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 283..296
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 328..341
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 373..386

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

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

                                                                public static int nullSafeHashCode(long[] array) {
                                                                    if (array == null) {
                                                                        return 0;
                                                                    } else {
                                                                        int hash = 7;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 268..281
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 283..296
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 328..341
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 343..356

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

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

                                                                public static int nullSafeHashCode(double[] array) {
                                                                    if (array == null) {
                                                                        return 0;
                                                                    } else {
                                                                        int hash = 7;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 268..281
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 283..296
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 343..356
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 373..386

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

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

                                                                public static int nullSafeHashCode(boolean[] array) {
                                                                    if (array == null) {
                                                                        return 0;
                                                                    } else {
                                                                        int hash = 7;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 268..281
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 328..341
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 343..356
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 373..386

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

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

                                                                public static int nullSafeHashCode(Object[] array) {
                                                                    if (array == null) {
                                                                        return 0;
                                                                    } else {
                                                                        int hash = 7;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 283..296
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 328..341
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 343..356
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 373..386

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

                                                            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

                                                                public static int nullSafeHashCode(char[] array) {
                                                                    if (array == null) {
                                                                        return 0;
                                                                    } else {
                                                                        int hash = 7;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 298..311
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 358..371
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 388..401

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

                                                            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

                                                                public static int nullSafeHashCode(byte[] array) {
                                                                    if (array == null) {
                                                                        return 0;
                                                                    } else {
                                                                        int hash = 7;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 313..326
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 358..371
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 388..401

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

                                                            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

                                                                public static int nullSafeHashCode(short[] array) {
                                                                    if (array == null) {
                                                                        return 0;
                                                                    } else {
                                                                        int hash = 7;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 298..311
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 313..326
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 358..371

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

                                                            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

                                                                public static int nullSafeHashCode(int[] array) {
                                                                    if (array == null) {
                                                                        return 0;
                                                                    } else {
                                                                        int hash = 7;
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 298..311
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 313..326
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ObjectUtils.java on lines 388..401

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

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

                                                                        for (int i$ = 0; i$ < len$; ++i$) {
                                                                            Object arrayEle = arr$[i$];
                                                                            if (nullSafeEquals(arrayEle, element)) {
                                                                                return true;
                                                                            }
                                                            nd4j/nd4j-common/src/main/java/org/nd4j/common/io/ReflectionUtils.java on lines 201..206

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

                                                            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