deeplearning4j/deeplearning4j

View on GitHub
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java

Summary

Maintainability
F
1 mo
Test Coverage

File Shape.java has 2479 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/*
 *  ******************************************************************************
 *  *
 *  *
 *  * This program and the accompanying materials are made available under the

    Shape has 229 methods (exceeds 20 allowed). Consider refactoring.
    Open

    public class Shape {
    
    
        private Shape() {}
    
    

      Method elementWiseStride has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
      Open

          public static long elementWiseStride(long[] shape, long[] stride, boolean isFOrder) {
              if(shape == null)
                  return 0;
              // 0D edge case
              if (shape.length == 0 || stride == null && stride.length == 0)

      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 elementWiseStride has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring.
      Open

          public static int elementWiseStride(int[] shape, int[] stride, boolean isFOrder) {
              // 0D edge case
              if (shape.length == 0 && stride.length == 0)
                  return 1;
      
      

      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 newShapeNoCopy has a Cognitive Complexity of 43 (exceeds 5 allowed). Consider refactoring.
      Open

          public static INDArray newShapeNoCopy(INDArray arr, long[] newShape, boolean isFOrder) {
              int oldnd;
              long[] olddims = ArrayUtil.copy(arr.shape());
              long[] oldstrides = ArrayUtil.copy(arr.stride());
              long np, op, last_stride;

      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 ableToReshapeWithView has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring.
      Open

          public static boolean ableToReshapeWithView(INDArray arr,boolean isFOrder, long[] newShape) {
              int oldnd;
              if(arr == null || arr.shape() == null)
                  return false;
              long[] olddims = ArrayUtil.copy(arr.shape());

      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 reductionShape has a Cognitive Complexity of 37 (exceeds 5 allowed). Consider refactoring.
      Open

          public static long[] reductionShape(INDArray x, long[] dimension, boolean newFormat, boolean keepDims){
              boolean wholeArray = Shape.wholeArrayDimension(dimension) || dimension.length == x.rank();
              for(int i = 0; i < dimension.length; i++) {
                  if(dimension[i] < 0)
                      dimension[i] += x.rank();

      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 iterate has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          public static void iterate(int dimension, int n, long[] size, long[] res, int dimension2, int n2, long[] size2,
                                     long[] res2, CoordinateFunction func) {
              if (dimension >= n || dimension2 >= n2) {
                  // stop clause
                  func.process(res, res2);

      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 iterate has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
      Open

          public static void iterate(int dimension, int n, int[] size, int[] res, int dimension2, int n2, int[] size2,
                                     int[] res2, CoordinateFunction func) {
              if (dimension >= n || dimension2 >= n2) {
                  // stop clause
                  func.process(ArrayUtil.toLongArray(res), ArrayUtil.toLongArray(res2));

      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 elementWiseStride has 91 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          public static long elementWiseStride(long[] shape, long[] stride, boolean isFOrder) {
              if(shape == null)
                  return 0;
              // 0D edge case
              if (shape.length == 0 || stride == null && stride.length == 0)

        Method elementWiseStride has 89 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            public static int elementWiseStride(int[] shape, int[] stride, boolean isFOrder) {
                // 0D edge case
                if (shape.length == 0 && stride.length == 0)
                    return 1;
        
        

          Method getMatrixMultiplyShape has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
          Open

              public static long[] getMatrixMultiplyShape(long[] left, long[] right) {
                  if(Shape.shapeIsScalar(left)) {
                      return right;
                  }
          
          

          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 newShapeNoCopy has 82 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              public static INDArray newShapeNoCopy(INDArray arr, long[] newShape, boolean isFOrder) {
                  int oldnd;
                  long[] olddims = ArrayUtil.copy(arr.shape());
                  long[] oldstrides = ArrayUtil.copy(arr.stride());
                  long np, op, last_stride;

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

                public static int[] resolveNegativeShapeIfNeccessary(int[] newShape,int[] shape) {
                    int numberNegativesOnes = 0;
                    for (int i = 0; i < shape.length; i++) {
                        if (shape[i] < 0) {
                            if (numberNegativesOnes >= 1)

            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 ableToReshapeWithView has 74 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                public static boolean ableToReshapeWithView(INDArray arr,boolean isFOrder, long[] newShape) {
                    int oldnd;
                    if(arr == null || arr.shape() == null)
                        return false;
                    long[] olddims = ArrayUtil.copy(arr.shape());

              Method areShapesBroadcastable has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static boolean areShapesBroadcastable(@NonNull long[] left, @NonNull long[] right){
                      if(left.length == 1 && right.length > 1) {
                          for(int i = 0; i < right.length; i++) {
                              if(right[i] == left[0])
                                  return true;

              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 shapeEqualWithSqueeze has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static boolean shapeEqualWithSqueeze(long[] shape1, long[] shape2){
                      if(shape1 == null)
                          return shape2 == null;
                      if(shape2 == null)
                          return false;   //Shape 1 must be non-null by this point

              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 strideDescendingCAscendingF has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static boolean strideDescendingCAscendingF(INDArray array) {
                      if(array.rank() <= 1)
                          return true;
                      long[] strides = array.stride();
                      if (array.isVector() && strides[0] == 1 && strides[1] == 1)

              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 normalizeAxis has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static long[] normalizeAxis(long rank, long... axis) {
                      if (axis == null || axis.length == 0)
                          return new long[] {Integer.MAX_VALUE};
              
                      if(rank == 0) {

              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 getReducedShape has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static long[] getReducedShape(long[] wholeShape, long[] dimensions, boolean keepDims, boolean newFormat) {
                      // we need to normalize dimensions, in case they have negative values or unsorted, or whatever
                      dimensions = Shape.normalizeAxis(wholeShape.length, dimensions);
              
                      // strip leading keepDims argument

              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 broadcastOutputShape has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static long[] broadcastOutputShape(long[] left,long[] right) {
                      if(left.length == 1  && right.length > 1) {
                          return right;
                      } else if(right.length == 1 && left.length > 1) {
                          return left;

              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 getOrder has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static char getOrder(int[] shape, int[] stride, int elementStride) {
                      int sd;
                      int dim;
                      int i;
                      boolean cContiguous = true;

              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 getOrder has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static char getOrder(long[] shape, long[] stride, long elementStride) {
                      long sd;
                      long dim;
                      int i;
                      boolean cContiguous = true;

              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 getMatrixMultiplyShape has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static int[] getMatrixMultiplyShape(int[] left, int[] right) {
                      if(Shape.shapeIsScalar(left)) {
                          return right;
                      }
              
              

              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 pickPairwiseDataType has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
              Open

                  public static DataType pickPairwiseDataType(@NonNull DataType typeX, @NonNull DataType typeY) {
                      if (typeX == typeY)
                          return typeX;
              
                      val rX = isR(typeX);

              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 getMatrixMultiplyShape has 40 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  public static long[] getMatrixMultiplyShape(long[] left, long[] right) {
                      if(Shape.shapeIsScalar(left)) {
                          return right;
                      }
              
              

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

                    public static boolean shapeEquals(int[] shape1, int[] shape2) {
                        if (isColumnVectorShape(shape1) && isColumnVectorShape(shape2)) {
                            return Arrays.equals(shape1, shape2);
                        }
                
                

                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 shapeEquals has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                    public static boolean shapeEquals(long[] shape1, long[] shape2) {
                        if (isColumnVectorShape(shape1) && isColumnVectorShape(shape2)) {
                            return Arrays.equals(shape1, shape2);
                        }
                
                

                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 pickPairwiseDataType has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
                Open

                    public static DataType pickPairwiseDataType(@NonNull DataType typeX, @NonNull Number number) {
                        if (number instanceof Double) {
                            return pickPairwiseDataType(typeX, DataType.DOUBLE);
                        } else if (number instanceof Float) {
                            return pickPairwiseDataType(typeX, DataType.FLOAT);

                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 getOrder has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    public static char getOrder(long[] shape, long[] stride, long elementStride) {
                        long sd;
                        long dim;
                        int i;
                        boolean cContiguous = true;

                  Method reductionShape has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static long[] reductionShape(INDArray x, long[] dimension, boolean newFormat, boolean keepDims){
                          boolean wholeArray = Shape.wholeArrayDimension(dimension) || dimension.length == x.rank();
                          for(int i = 0; i < dimension.length; i++) {
                              if(dimension[i] < 0)
                                  dimension[i] += x.rank();

                    Method broadcastOutputShape has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        public static long[] broadcastOutputShape(long[] left,long[] right) {
                            if(left.length == 1  && right.length > 1) {
                                return right;
                            } else if(right.length == 1 && left.length > 1) {
                                return left;

                      Method getOrder has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          public static char getOrder(int[] shape, int[] stride, int elementStride) {
                              int sd;
                              int dim;
                              int i;
                              boolean cContiguous = true;

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

                            public static long[] getMaxShape(INDArray...inputs) {
                                if(inputs == null)
                                    return null;
                                else if(inputs.length < 2)
                                    return inputs[0].shape();

                        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 cOrFortranOrder has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static boolean cOrFortranOrder(long[] shape, long[] stride, long elementStride) {
                                long sd;
                                long dim;
                                int i;
                                boolean cContiguous = true;

                        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 shapeMatchesPlaceholder has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                        Open

                            public static boolean shapeMatchesPlaceholder(long[] phShape, long[] arrShape) {
                                if (phShape == null && arrShape == null)
                                    return true;    //Rank 0?
                                if (phShape == null || arrShape == null)
                                    return false;

                        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 cOrFortranOrder has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            public static boolean cOrFortranOrder(long[] shape, long[] stride, long elementStride) {
                                long sd;
                                long dim;
                                int i;
                                boolean cContiguous = true;

                          Method iterate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public static void iterate(int dimension, int n, int[] size, int[] res, int dimension2, int n2, int[] size2,
                                                         int[] res2, CoordinateFunction func) {
                                  if (dimension >= n || dimension2 >= n2) {
                                      // stop clause
                                      func.process(ArrayUtil.toLongArray(res), ArrayUtil.toLongArray(res2));

                            Method iterate has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public static void iterate(int dimension, int n, long[] size, long[] res, int dimension2, int n2, long[] size2,
                                                           long[] res2, CoordinateFunction func) {
                                    if (dimension >= n || dimension2 >= n2) {
                                        // stop clause
                                        func.process(res, res2);

                              Method iterate has 9 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  public static void iterate(int dimension, int n, int[] size, int[] res, int dimension2, int n2, int[] size2,
                                                             int[] res2, CoordinateFunction func) {

                                Method iterate has 9 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    public static void iterate(int dimension, int n, long[] size, long[] res, int dimension2, int n2, long[] size2,
                                                               long[] res2, CoordinateFunction func) {

                                  Method resolveNegativeShapeIfNeccessary has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      public static int[] resolveNegativeShapeIfNeccessary(int[] newShape,int[] shape) {
                                          int numberNegativesOnes = 0;
                                          for (int i = 0; i < shape.length; i++) {
                                              if (shape[i] < 0) {
                                                  if (numberNegativesOnes >= 1)

                                    Method getMatrixMultiplyShape has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static int[] getMatrixMultiplyShape(int[] left, int[] right) {
                                            if(Shape.shapeIsScalar(left)) {
                                                return right;
                                            }
                                    
                                    

                                      Method shapeEqualWithSqueeze has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          public static boolean shapeEqualWithSqueeze(long[] shape1, long[] shape2){
                                              if(shape1 == null)
                                                  return shape2 == null;
                                              if(shape2 == null)
                                                  return false;   //Shape 1 must be non-null by this point

                                        Method broadcastOutputShape has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            public static int[] broadcastOutputShape(int[] left,int[] right) {
                                                assertBroadcastable(left, right);
                                                if(Arrays.equals(left,right))
                                                    return left;
                                                int n = Math.max(left.length,right.length);

                                          Method toOffsetZero has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                              public static INDArray toOffsetZero(INDArray arr) {
                                                  if (arr.offset() < 1 && arr.data().length() == arr.length())
                                                      if (arr.ordering() == 'f' && arr.stride(-1) != 1
                                                              || arr.ordering() == 'c' && arr.stride(0) != 1)
                                                          return arr;

                                          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 broadcastOutputShape has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                              public static int[] broadcastOutputShape(int[] left,int[] right) {
                                                  assertBroadcastable(left, right);
                                                  if(Arrays.equals(left,right))
                                                      return left;
                                                  int n = Math.max(left.length,right.length);

                                          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 isPlaceholderShape has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
                                          Open

                                              public static boolean isPlaceholderShape(long[] shape) {
                                                  if(shape == null)
                                                      return true;
                                                  else {
                                                      if(shape.length == 1 && shape[0] == Long.MIN_VALUE){

                                          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 getReducedShape has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                          Open

                                              public static long[] getReducedShape(long[] wholeShape, long[] dimensions, boolean keepDims, boolean newFormat) {
                                                  // we need to normalize dimensions, in case they have negative values or unsorted, or whatever
                                                  dimensions = Shape.normalizeAxis(wholeShape.length, dimensions);
                                          
                                                  // strip leading keepDims argument

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

                                                public static DataBuffer createShapeInformation(long[] shape, long[] stride, long elementWiseStride, char order, DataType dataType, boolean empty) {

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

                                                  public static INDArray toMmulCompatible(INDArray input) {
                                                      if (input.rank() != 2)
                                                          throw new IllegalArgumentException("Input must be rank 2 (matrix)");
                                                      //Same conditions as GemmParams.copyIfNecessary()
                                                      boolean doCopy = false;

                                              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 iterate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                              Open

                                                  public static void iterate(int dimension, int n, long[] size, long[] res, CoordinateFunction func) {

                                                Method getOffsetUnsafe has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                Open

                                                    public static long getOffsetUnsafe(int[] shapeInformation, int dim0, int dim1, int dim2, int dim3) {

                                                  Method getOffset has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                  Open

                                                      public static long getOffset(IntBuffer shapeInformation, int dim0, int dim1, int dim2, int dim3) {

                                                    Method getOffsetUnsafe has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                    Open

                                                        public static long getOffsetUnsafe(DataBuffer shapeInformation, int dim0, int dim1, int dim2, int dim3) {

                                                      Method createShapeInformation has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                      Open

                                                          public static DataBuffer createShapeInformation(long[] shape, long[] stride, long elementWiseStride, char order, long extras) {

                                                        Method getOffsetUnsafe has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                        Open

                                                            public static long getOffsetUnsafe(long[] shapeInformation, long dim0, long dim1, long dim2, long dim3) {

                                                          Method iterate has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                          Open

                                                              public static void iterate(int dimension, int n, int[] size, int[] res, CoordinateFunction func) {

                                                            Method getOffset has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                                            Open

                                                                public static long getOffset(DataBuffer shapeInformation, int dim0, int dim1, int dim2, int dim3) {

                                                              Method isPlaceholderShape has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                  public static boolean isPlaceholderShape(int[] shape) {
                                                                      if(shape == null)
                                                                          return true;
                                                                      else {
                                                                          for(int i = 0; i < shape.length; i++) {

                                                              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 getOffset has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                  public static long getOffset(IntBuffer shapeInformation, int dim0, int dim1, int dim2, int dim3) {
                                                                      int rank = rank(shapeInformation);
                                                                      if (rank != 4)
                                                                          throw new IllegalArgumentException(
                                                                                  "Cannot use this getOffset method on arrays of rank != 4 (rank is: " + rank + ")");

                                                              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 getBroadcastDimensions has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                  public static long[] getBroadcastDimensions(long[] left, long[] right) {
                                                                      if(Arrays.equals(left,right))
                                                                          return null;
                                                              
                                                                      int n = Math.min(left.length,right.length);

                                                              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 getOffset has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                  public static long getOffset(long baseOffset, int[] shape, int[] stride, int... indices) {
                                                                      //int ret =  mappers[shape.length].getOffset(baseOffset, shape, stride, indices);
                                                                      if (shape.length != stride.length || indices.length != shape.length)
                                                                          throw new IllegalArgumentException("Indexes, shape, and stride must be the same length");
                                                                      long offset = baseOffset;

                                                              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 getBroadcastDimensions has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                                              Open

                                                                  public static int[] getBroadcastDimensions(int[] left,int[] right) {
                                                                      if(Arrays.equals(left,right))
                                                                          return null;
                                                              
                                                                      int n = Math.min(left.length,right.length);

                                                              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 ret;

                                                                Avoid too many return statements within this method.
                                                                Open

                                                                        return typeX;

                                                                  Avoid too many return statements within this method.
                                                                  Open

                                                                                          return 0;

                                                                    Avoid too many return statements within this method.
                                                                    Open

                                                                                    return max(typeX, typeY);

                                                                      Avoid too many return statements within this method.
                                                                      Open

                                                                              return result;

                                                                        Avoid too many return statements within this method.
                                                                        Open

                                                                                return scalarEquals(shape1, shape2) || Arrays.equals(shape1, shape2);

                                                                          Avoid too many return statements within this method.
                                                                          Open

                                                                                  return newStrides[newShapeRank - 1];

                                                                            Avoid too many return statements within this method.
                                                                            Open

                                                                                    return Longs.toArray(dims);

                                                                              Avoid too many return statements within this method.
                                                                              Open

                                                                                                  return false;

                                                                                Avoid too many return statements within this method.
                                                                                Open

                                                                                            return pickPairwiseDataType(typeX, DataType.FLOAT);

                                                                                  Avoid too many return statements within this method.
                                                                                  Open

                                                                                              return pickPairwiseDataType(typeX, DataType.DOUBLE);

                                                                                    Avoid too many return statements within this method.
                                                                                    Open

                                                                                                    return max(typeX, typeY);

                                                                                      Avoid too many return statements within this method.
                                                                                      Open

                                                                                              return true;

                                                                                        Avoid too many return statements within this method.
                                                                                        Open

                                                                                                return pos1 == shape1.length && pos2 == shape2.length;

                                                                                          Avoid too many return statements within this method.
                                                                                          Open

                                                                                                                  return 0;

                                                                                            Avoid too many return statements within this method.
                                                                                            Open

                                                                                                    return (int) newStrides[newShapeRank - 1];

                                                                                              Avoid too many return statements within this method.
                                                                                              Open

                                                                                                          return 0;

                                                                                                Avoid too many return statements within this method.
                                                                                                Open

                                                                                                            return true;

                                                                                                  Avoid too many return statements within this method.
                                                                                                  Open

                                                                                                              return left;

                                                                                                    Avoid too many return statements within this method.
                                                                                                    Open

                                                                                                                return result;

                                                                                                      Avoid too many return statements within this method.
                                                                                                      Open

                                                                                                                              return 0;

                                                                                                        Avoid too many return statements within this method.
                                                                                                        Open

                                                                                                                return true;

                                                                                                          Avoid too many return statements within this method.
                                                                                                          Open

                                                                                                                                  return false;

                                                                                                            Avoid too many return statements within this method.
                                                                                                            Open

                                                                                                                    return scalarEquals(shape1, shape2) || Arrays.equals(shape1, shape2);

                                                                                                              Avoid too many return statements within this method.
                                                                                                              Open

                                                                                                                              return typeX;

                                                                                                                Avoid too many return statements within this method.
                                                                                                                Open

                                                                                                                                        return 0;

                                                                                                                  Avoid too many return statements within this method.
                                                                                                                  Open

                                                                                                                              return true;

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

                                                                                                                        public static long getOffsetUnsafe(int[] shapeInformation, int dim0, int dim1, int dim2, int dim3) {
                                                                                                                            long offset = 0;
                                                                                                                            int size_0 = sizeUnsafe(shapeInformation, 0);
                                                                                                                            int size_1 = sizeUnsafe(shapeInformation, 1);
                                                                                                                            int size_2 = sizeUnsafe(shapeInformation, 2);

                                                                                                                    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 getReducedShape has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public static long[] getReducedShape(long[] wholeShape, long[] dimensions) {
                                                                                                                            if (isWholeArray(wholeShape, dimensions))
                                                                                                                                return new long[] {};
                                                                                                                            else if (dimensions.length == 1 && wholeShape.length == 2) {
                                                                                                                                val ret = new long[2];

                                                                                                                    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 getOffset has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public static long getOffset(DataBuffer shapeInformation, long... indices) {
                                                                                                                            int rank = rank(shapeInformation);
                                                                                                                            if (indices.length != rank)
                                                                                                                                throw new IllegalArgumentException("Indexes must be same length as array rank");
                                                                                                                            long offset = 0;

                                                                                                                    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 getOffset has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public static long getOffset(IntBuffer shapeInformation, int dim0, int dim1, int dim2) {
                                                                                                                            int rank = rank(shapeInformation);
                                                                                                                            if (rank != 3)
                                                                                                                                throw new IllegalArgumentException(
                                                                                                                                        "Cannot use this getOffset method on arrays of rank != 3 (rank is: " + rank + ")");

                                                                                                                    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 getOffsetUnsafe has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public static long getOffsetUnsafe(long[] shapeInformation, long dim0, long dim1, long dim2, long dim3) {
                                                                                                                            long offset = 0;
                                                                                                                            long size_0 = sizeUnsafe(shapeInformation, 0);
                                                                                                                            long size_1 = sizeUnsafe(shapeInformation, 1);
                                                                                                                            long size_2 = sizeUnsafe(shapeInformation, 2);

                                                                                                                    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 createShapeInformation has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public static DataBuffer createShapeInformation(long[] shape, long[] stride, long elementWiseStride, char order, DataType dataType, boolean empty) {
                                                                                                                            boolean isEmpty = empty;
                                                                                                                            if (!empty)
                                                                                                                                for (val v:shape) {
                                                                                                                                    if (v == 0) {

                                                                                                                    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 getOffsetUnsafe has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public static long getOffsetUnsafe(DataBuffer shapeInformation, int dim0, int dim1, int dim2, int dim3) {
                                                                                                                            long offset = 0;
                                                                                                                            int size_0 = sizeUnsafe(shapeInformation, 0);
                                                                                                                            int size_1 = sizeUnsafe(shapeInformation, 1);
                                                                                                                            int size_2 = sizeUnsafe(shapeInformation, 2);

                                                                                                                    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 shapeToString has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public static String shapeToString(LongBuffer buffer) {
                                                                                                                            int length = buffer.capacity();
                                                                                                                            long options = buffer.get(length -3);
                                                                                                                            val shapeBuff = shapeOf(buffer);
                                                                                                                            int rank = Shape.rank(buffer);

                                                                                                                    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 shapeToString has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                                                                                                    Open

                                                                                                                        public static String shapeToString(IntBuffer buffer) {
                                                                                                                            val shapeBuff = shapeOf(buffer);
                                                                                                                            int rank = Shape.rank(buffer);
                                                                                                                            val strideBuff = stride(buffer);
                                                                                                                            StringBuilder sb = new StringBuilder();

                                                                                                                    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

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

                                                                                                                            while (ni < newShapeRank && oi < oldnd) {
                                                                                                                                np = newShape[ni];
                                                                                                                                op = olddims[oi];
                                                                                                                    
                                                                                                                                while (np != op) {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1752..1796

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

                                                                                                                    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

                                                                                                                            while (ni < newShapeRank && oi < oldnd) {
                                                                                                                                np = newShape[ni];
                                                                                                                                op = olddims[oi];
                                                                                                                    
                                                                                                                                while (np != op) {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1876..1920

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

                                                                                                                    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 (size2.length != size.length) {
                                                                                                                                if (dimension >= size.length)
                                                                                                                                    return;
                                                                                                                                for (int i = 0; i < size[dimension]; i++) {
                                                                                                                                    if (dimension2 >= size2.length)
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 734..761

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

                                                                                                                    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 (size2.length != size.length) {
                                                                                                                                if (dimension >= size.length)
                                                                                                                                    return;
                                                                                                                                for (int i = 0; i < size[dimension]; i++) {
                                                                                                                                    if (dimension2 >= size2.length)
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 772..799

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

                                                                                                                    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

                                                                                                                        public static long getOffsetUnsafe(int[] shapeInformation, int dim0, int dim1, int dim2, int dim3) {
                                                                                                                            long offset = 0;
                                                                                                                            int size_0 = sizeUnsafe(shapeInformation, 0);
                                                                                                                            int size_1 = sizeUnsafe(shapeInformation, 1);
                                                                                                                            int size_2 = sizeUnsafe(shapeInformation, 2);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1212..1232
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1257..1277

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

                                                                                                                    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

                                                                                                                        public static long getOffsetUnsafe(DataBuffer shapeInformation, int dim0, int dim1, int dim2, int dim3) {
                                                                                                                            long offset = 0;
                                                                                                                            int size_0 = sizeUnsafe(shapeInformation, 0);
                                                                                                                            int size_1 = sizeUnsafe(shapeInformation, 1);
                                                                                                                            int size_2 = sizeUnsafe(shapeInformation, 2);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1235..1255
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1257..1277

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

                                                                                                                    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

                                                                                                                        public static long getOffsetUnsafe(long[] shapeInformation, long dim0, long dim1, long dim2, long dim3) {
                                                                                                                            long offset = 0;
                                                                                                                            long size_0 = sizeUnsafe(shapeInformation, 0);
                                                                                                                            long size_1 = sizeUnsafe(shapeInformation, 1);
                                                                                                                            long size_2 = sizeUnsafe(shapeInformation, 2);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1212..1232
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1235..1255

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

                                                                                                                    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

                                                                                                                            for(int i = n - 1; i >= 0; i--) {
                                                                                                                                if(leftIdx < 0) {
                                                                                                                                    dims.add(right[rightIdx]);
                                                                                                                                }
                                                                                                                                else if(rightIdx < 0) {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 303..322

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

                                                                                                                    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

                                                                                                                            for(int i = n - 1; i >= 0; i--) {
                                                                                                                                if(leftIdx < 0) {
                                                                                                                                    dims.add(right[rightIdx]);
                                                                                                                                }
                                                                                                                                else if(rightIdx < 0) {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 217..236

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

                                                                                                                    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

                                                                                                                        public static boolean shapeEquals(int[] shape1, int[] shape2) {
                                                                                                                            if (isColumnVectorShape(shape1) && isColumnVectorShape(shape2)) {
                                                                                                                                return Arrays.equals(shape1, shape2);
                                                                                                                            }
                                                                                                                    
                                                                                                                    
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1537..1564

                                                                                                                    Duplicated Code

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

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

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

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 177.

                                                                                                                    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

                                                                                                                        public static boolean shapeEquals(long[] shape1, long[] shape2) {
                                                                                                                            if (isColumnVectorShape(shape1) && isColumnVectorShape(shape2)) {
                                                                                                                                return Arrays.equals(shape1, shape2);
                                                                                                                            }
                                                                                                                    
                                                                                                                    
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1499..1526

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

                                                                                                                    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

                                                                                                                        public static long getOffsetUnsafe(int[] shapeInformation, int row, int col) {
                                                                                                                            long offset = 0;
                                                                                                                            int size_0 = sizeUnsafe(shapeInformation, 0);
                                                                                                                            int size_1 = sizeUnsafe(shapeInformation, 1);
                                                                                                                            if (row >= size_0 || col >= size_1 && !Shape.isVector(Shape.shape(shapeInformation)) && !Shape.shapeIsScalar(Shape.shape(shapeInformation)))
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1029..1043

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

                                                                                                                    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

                                                                                                                        public static long getOffsetUnsafe(long[] shapeInformation, long row, long col) {
                                                                                                                            long offset = 0;
                                                                                                                            long size_0 = sizeUnsafe(shapeInformation, 0);
                                                                                                                            long size_1 = sizeUnsafe(shapeInformation, 1);
                                                                                                                            if (row >= size_0 || col >= size_1 && !Shape.isVector(Shape.shape(shapeInformation)) && !Shape.shapeIsScalar(Shape.shape(shapeInformation)))
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1013..1027

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

                                                                                                                    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

                                                                                                                        public static long getOffset(int[] shapeInformation, int... indices) {
                                                                                                                            int rank = rank(shapeInformation);
                                                                                                                            long offset = 0;
                                                                                                                            for (int i = 0; i < Math.min(rank,indices.length); i++) {
                                                                                                                                int size_dimi = size(shapeInformation, i);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 948..961
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 963..976

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

                                                                                                                    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

                                                                                                                        public static long getOffset(long[] shapeInformation, int... indices) {
                                                                                                                            int rank = rank(shapeInformation);
                                                                                                                            long offset = 0;
                                                                                                                            for (int i = 0; i < Math.min(rank,indices.length); i++) {
                                                                                                                                long size_dimi = size(shapeInformation, i);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 933..946
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 963..976

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

                                                                                                                    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

                                                                                                                        public static long getOffset(long[] shapeInformation, long... indices) {
                                                                                                                            int rank = rank(shapeInformation);
                                                                                                                            long offset = 0;
                                                                                                                            for (int i = 0; i < Math.min(rank,indices.length); i++) {
                                                                                                                                long size_dimi = size(shapeInformation, i);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 933..946
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 948..961

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

                                                                                                                    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

                                                                                                                        public static long lengthOfBuffer(@NonNull long[] shape, @NonNull long[] stride){
                                                                                                                            Preconditions.checkArgument(shape.length == stride.length, "Shape and strides must be same length: shape %s, stride %s",
                                                                                                                                    shape, stride);
                                                                                                                            //Length is simply 1 + the buffer index of the last element
                                                                                                                            long length = 1;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3700..3709

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

                                                                                                                    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

                                                                                                                        public static long lengthOfBuffer(@NonNull int[] shape, @NonNull int[] stride){
                                                                                                                            Preconditions.checkArgument(shape.length == stride.length, "Shape and strides must be same length: shape %s, stride %s",
                                                                                                                                    shape, stride);
                                                                                                                            //Length is simply 1 + the buffer index of the last element
                                                                                                                            long length = 1;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3682..3691

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

                                                                                                                    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

                                                                                                                        public static boolean isVector(IntBuffer shapeInfo) {
                                                                                                                            int rank = Shape.rank(shapeInfo);
                                                                                                                            if (rank > 2 || rank < 1)
                                                                                                                                return false;
                                                                                                                            else {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1310..1319
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1327..1336

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

                                                                                                                    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

                                                                                                                        public static boolean isVector(DataBuffer shapeInfo) {
                                                                                                                            int rank = Shape.rank(shapeInfo);
                                                                                                                            if (rank > 2 || rank < 1)
                                                                                                                                return false;
                                                                                                                            else {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1299..1308
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1310..1319

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

                                                                                                                    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

                                                                                                                        public static boolean isVector(LongBuffer shapeInfo) {
                                                                                                                            int rank = Shape.rank(shapeInfo);
                                                                                                                            if (rank > 2 || rank < 1)
                                                                                                                                return false;
                                                                                                                            else {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1299..1308
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1327..1336

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

                                                                                                                    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

                                                                                                                        public static boolean scalarEquals(long[] shape1, long[] shape2) {
                                                                                                                            if (shape1.length == 0 && shape2.length == 1 && shape2[0] == 1) {
                                                                                                                                return true;
                                                                                                                            } else if (shape2.length == 0 && shape1.length == 1 && shape1[0] == 1) {
                                                                                                                                return true;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1574..1582

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

                                                                                                                    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

                                                                                                                        public static boolean scalarEquals(int[] shape1, int[] shape2) {
                                                                                                                            if (shape1.length == 0 && shape2.length == 1 && shape2[0] == 1) {
                                                                                                                                return true;
                                                                                                                            } else if (shape2.length == 0 && shape1.length == 1 && shape1[0] == 1) {
                                                                                                                                return true;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1584..1592

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

                                                                                                                    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

                                                                                                                        public static void assertShapeLessThan(int[] shape, int[] lessThan) {
                                                                                                                            if (shape.length != lessThan.length) {
                                                                                                                                throw new IllegalArgumentException("Shape length must be == less than length");
                                                                                                                            }
                                                                                                                            for (int i = 0; i < shape.length; i++) {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2516..2524

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

                                                                                                                    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

                                                                                                                        public static void assertShapeLessThan(long[] shape, long[] lessThan) {
                                                                                                                            if (shape.length != lessThan.length) {
                                                                                                                                throw new IllegalArgumentException("Shape length must be == less than length");
                                                                                                                            }
                                                                                                                            for (int i = 0; i < shape.length; i++) {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2506..2514

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

                                                                                                                    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

                                                                                                                            for (i = shape.length - 1; i >= 0; --i) {
                                                                                                                                dim = shape[i];
                                                                                                                    
                                                                                                                                if (stride[i] != sd) {
                                                                                                                                    cContiguous = false;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2234..2247
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2284..2297

                                                                                                                    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

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

                                                                                                                            for (i = shape.length - 1; i >= 0; --i) {
                                                                                                                                dim = shape[i];
                                                                                                                    
                                                                                                                                if (stride[i] != sd) {
                                                                                                                                    cContiguous = false;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2182..2195
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2284..2297

                                                                                                                    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

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

                                                                                                                            for (i = shape.length - 1; i >= 0; --i) {
                                                                                                                                dim = shape[i];
                                                                                                                    
                                                                                                                                if (stride[i] != sd) {
                                                                                                                                    cContiguous = false;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2182..2195
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2234..2247

                                                                                                                    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

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

                                                                                                                            for (i = 0; i < shape.length; ++i) {
                                                                                                                                dim = shape[i];
                                                                                                                                if (stride[i] != sd) {
                                                                                                                                    isFortran = false;
                                                                                                                                }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2252..2262
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2302..2312

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

                                                                                                                    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

                                                                                                                            for (i = 0; i < shape.length; ++i) {
                                                                                                                                dim = shape[i];
                                                                                                                                if (stride[i] != sd) {
                                                                                                                                    isFortran = false;
                                                                                                                                }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2200..2210
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2302..2312

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

                                                                                                                    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

                                                                                                                            for (i = 0; i < shape.length; ++i) {
                                                                                                                                dim = shape[i];
                                                                                                                                if (stride[i] != sd) {
                                                                                                                                    isFortran = false;
                                                                                                                                }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2200..2210
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2252..2262

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

                                                                                                                    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

                                                                                                                            for (oi = 0; oi < shape.length; oi++) {
                                                                                                                                if (shape[oi] != 1) {
                                                                                                                                    olddims[oldnd] = shape[oi];
                                                                                                                                    oldstrides[oldnd] = stride[oi];
                                                                                                                                    oldnd++;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1721..1727

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

                                                                                                                    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

                                                                                                                            for (oi = 0; oi < shape.length; oi++) {
                                                                                                                                if (shape[oi] != 1) {
                                                                                                                                    olddims[oldnd] = shape[oi];
                                                                                                                                    oldstrides[oldnd] = stride[oi];
                                                                                                                                    oldnd++;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1845..1851

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

                                                                                                                    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

                                                                                                                            for (oi = 0; oi < arr.rank(); oi++) {
                                                                                                                                if (arr.size(oi) != 1) {
                                                                                                                                    olddims[oldnd] = arr.size(oi);
                                                                                                                                    oldstrides[oldnd] = arr.stride(oi);
                                                                                                                                    oldnd++;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1961..1967

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

                                                                                                                    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

                                                                                                                            for (oi = 0; oi < arr.rank(); oi++) {
                                                                                                                                if (arr.size(oi) != 1) {
                                                                                                                                    olddims[oldnd] = arr.size(oi);
                                                                                                                                    oldstrides[oldnd] = arr.stride(oi);
                                                                                                                                    oldnd++;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2068..2074

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

                                                                                                                    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

                                                                                                                        public static int[] squeeze(int[] shape) {
                                                                                                                            if (isColumnVectorShape(shape))
                                                                                                                                return shape;
                                                                                                                    
                                                                                                                            List<Integer> ret = new ArrayList<>();
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1434..1445

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

                                                                                                                    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

                                                                                                                        public static long[] squeeze(long[] shape) {
                                                                                                                            if (isColumnVectorShape(shape))
                                                                                                                                return shape;
                                                                                                                    
                                                                                                                            List<Long> ret = new ArrayList<>();
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1415..1426

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

                                                                                                                    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

                                                                                                                        public static long[] stride(long[] buffer) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            long[] ret = new long[rank];
                                                                                                                            for (int i = 0; i < rank; i++)
                                                                                                                                ret[i] = buffer[1 + rank + i];
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2896..2903

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

                                                                                                                        public static int[] stride(int[] buffer) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            int[] ret = new int[rank];
                                                                                                                            for (int i = 0; i < rank; i++)
                                                                                                                                ret[i] = buffer[1 + rank + i];
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2906..2913

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

                                                                                                                        public static int length(IntBuffer buffer) {
                                                                                                                            int ret = 1;
                                                                                                                            IntBuffer shape = Shape.shapeOf(buffer);
                                                                                                                            int rank = Shape.rank(buffer);
                                                                                                                            for (int i = 0; i < rank; i++)
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2583..2590

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

                                                                                                                    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

                                                                                                                        public static int length(LongBuffer buffer) {
                                                                                                                            int ret = 1;
                                                                                                                            val shape = Shape.shapeOf(buffer);
                                                                                                                            int rank = Shape.rank(buffer);
                                                                                                                            for (int i = 0; i < rank; i++)
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2574..2581

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

                                                                                                                    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

                                                                                                                        public static boolean contentEquals(long[] arr, LongBuffer other) {
                                                                                                                            for (int i = 0; i < arr.length; i++) {
                                                                                                                                val t = arr[i];
                                                                                                                                val o = other.get(i);
                                                                                                                                if (t != o) {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3506..3515

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

                                                                                                                    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

                                                                                                                        public static boolean contentEquals(long[] arr, IntBuffer other) {
                                                                                                                            for (int i = 0; i < arr.length; i++) {
                                                                                                                                val t = arr[i];
                                                                                                                                val o = other.get(i);
                                                                                                                                if (t != o) {
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3517..3526

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

                                                                                                                    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 (dim0 >= size_0 || dim1 >= size_1 || dim2 >= size_2)
                                                                                                                                throw new IllegalArgumentException("Invalid indices: cannot get [" + dim0 + "," + dim1 + "," + dim2
                                                                                                                                        + "] from a " + Arrays.toString(shape(shapeInformation)) + " NDArray");
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1127..1129

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

                                                                                                                    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 (dim0 >= size_0 || dim1 >= size_1 || dim2 >= size_2)
                                                                                                                                throw new IllegalArgumentException("Invalid indices: cannot get [" + dim0 + "," + dim1 + "," + dim2
                                                                                                                                        + "] from a " + Arrays.toString(shape(shapeInformation)) + " NDArray");
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1089..1091

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

                                                                                                                    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

                                                                                                                            if (left.length == 2) {
                                                                                                                                shape = new long[]{left[0], right[1]};
                                                                                                                            } else {
                                                                                                                                shape = new long[]{left[0], left[1], right[2]};
                                                                                                                            }
                                                                                                                    deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/core/KerasReshape.java on lines 114..118

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

                                                                                                                    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

                                                                                                                        public static boolean isWholeArray(long rank, long... dimension) {
                                                                                                                            return rank == 0 || dimension == null || dimension.length == 0 ||
                                                                                                                                    (dimension.length == 1 && dimension[0] == Integer.MAX_VALUE) || dimension.length == rank;
                                                                                                                        }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 405..408

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

                                                                                                                    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

                                                                                                                        public static boolean isWholeArray(int rank, int... dimension) {
                                                                                                                            return rank == 0 || dimension == null || dimension.length == 0 ||
                                                                                                                                    (dimension.length == 1 && dimension[0] == Integer.MAX_VALUE) || dimension.length == rank;
                                                                                                                        }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 421..424

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

                                                                                                                    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

                                                                                                                        public static boolean isVector(int[] shape) {
                                                                                                                            if (shape.length > 2 || shape.length < 1)
                                                                                                                                return false;
                                                                                                                            else {
                                                                                                                                long len = ArrayUtil.prodLong(shape);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1353..1360

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

                                                                                                                    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

                                                                                                                        public static boolean isVector(long[] shape) {
                                                                                                                            if (shape.length > 2 || shape.length < 1)
                                                                                                                                return false;
                                                                                                                            else {
                                                                                                                                long len = ArrayUtil.prodLong(shape);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1344..1351

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

                                                                                                                    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

                                                                                                                        public static int[] sizeForAxes(int[] axes, int[] shape) {
                                                                                                                            int[] ret = new int[shape.length];
                                                                                                                            for (int i = 0; i < axes.length; i++) {
                                                                                                                                ret[i] = shape[axes[i]];
                                                                                                                            }
                                                                                                                    nd4j/nd4j-common/src/main/java/org/nd4j/common/util/ArrayUtil.java on lines 2232..2239
                                                                                                                    nd4j/nd4j-common/src/main/java/org/nd4j/common/util/ArrayUtil.java on lines 2250..2257

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

                                                                                                                    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

                                                                                                                            for (int i = 0; i < shape.length; i++) {
                                                                                                                                denom /= shape[i];
                                                                                                                                if (index / denom >= Integer.MAX_VALUE)
                                                                                                                                    throw new IllegalArgumentException("Dimension can not be >= Integer.MAX_VALUE");
                                                                                                                                ret[i] = (int) (index / denom);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2370..2377

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

                                                                                                                    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

                                                                                                                            for (int i = ret.length - 1; i >= 0; i--) {
                                                                                                                                denom /= shape[i];
                                                                                                                                if (index / denom >= Integer.MAX_VALUE)
                                                                                                                                    throw new IllegalArgumentException("Dimension can not be >= Integer.MAX_VALUE");
                                                                                                                                ret[i] = (int) (index / denom);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2441..2448

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

                                                                                                                    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

                                                                                                                        public static long[] shape(IntBuffer buffer) {
                                                                                                                            val ret = new long[rank(buffer)];
                                                                                                                            for (int i = 0; i < ret.length; i++)
                                                                                                                                ret[i] = buffer.get(1 + i);
                                                                                                                            return ret;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2736..2741
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2748..2753

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

                                                                                                                    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

                                                                                                                        public static long[] shape(DataBuffer buffer) {
                                                                                                                            val ret = new long[rank(buffer)];
                                                                                                                            for (int i = 0; i < ret.length; i++)
                                                                                                                                ret[i] = buffer.getInt(1 + i);
                                                                                                                            return ret;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2729..2734
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2736..2741

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

                                                                                                                    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

                                                                                                                        public static long[] shape(LongBuffer buffer) {
                                                                                                                            val ret = new long[rank(buffer)];
                                                                                                                            for (int i = 0; i < ret.length; i++)
                                                                                                                                ret[i] = buffer.get(1 + i);
                                                                                                                            return ret;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2729..2734
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2748..2753

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

                                                                                                                    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

                                                                                                                        public static long length(long[] buffer) {
                                                                                                                            long ret = 1;
                                                                                                                            int limit = Shape.rank(buffer) + 1;
                                                                                                                            for (int i = 1; i < limit; i++)
                                                                                                                                ret *= buffer[i];
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2609..2615

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

                                                                                                                    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

                                                                                                                        public static long length(int[] buffer) {
                                                                                                                            long ret = 1;
                                                                                                                            int limit = Shape.rank(buffer) + 1;
                                                                                                                            for (int i = 1; i < limit; i++)
                                                                                                                                ret *= buffer[i];
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2617..2623

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

                                                                                                                    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

                                                                                                                        public static int stride(IntBuffer buffer, int dimension) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            if (dimension >= rank)
                                                                                                                                throw new IllegalArgumentException("Invalid dimension " + dimension + " for rank " + rank + " array");
                                                                                                                            return buffer.get(1 + rank + dimension);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2785..2790
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2798..2803

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

                                                                                                                    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

                                                                                                                        public static int stride(DataBuffer buffer, int dimension) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            if (dimension >= rank)
                                                                                                                                throw new IllegalArgumentException("Invalid dimension " + dimension + " for rank " + rank + " array");
                                                                                                                            return buffer.getInt(1 + rank + dimension);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2778..2783
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2785..2790

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

                                                                                                                    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

                                                                                                                        public static long stride(LongBuffer buffer, int dimension) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            if (dimension >= rank)
                                                                                                                                throw new IllegalArgumentException("Invalid dimension " + dimension + " for rank " + rank + " array");
                                                                                                                            return buffer.get(1 + rank + dimension);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2778..2783
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2798..2803

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

                                                                                                                    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

                                                                                                                        public static int stride(int[] buffer, int dimension) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            if (dimension >= rank)
                                                                                                                                throw new IllegalArgumentException("Invalid dimension " + dimension + " for rank " + rank + " array");
                                                                                                                            return buffer[1 + rank + dimension];
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2812..2817

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

                                                                                                                    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

                                                                                                                        public static long stride(long[] buffer, int dimension) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            if (dimension >= rank)
                                                                                                                                throw new IllegalArgumentException("Invalid dimension " + dimension + " for rank " + rank + " array");
                                                                                                                            return buffer[1 + rank + dimension];
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2805..2810

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

                                                                                                                    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

                                                                                                                                    for (int j = 0; j < shape.length; j++) {
                                                                                                                                        if (i != j) {
                                                                                                                                            thisNewShape[j] = shape[j];
                                                                                                                                        } else
                                                                                                                                            thisNewShape[j] = realShape;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ndarray/BaseNDArray.java on lines 3680..3685

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

                                                                                                                    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

                                                                                                                        public static boolean isRowVectorShape(DataBuffer shapeInfo) {
                                                                                                                            int rank = Shape.rank(shapeInfo);
                                                                                                                            DataBuffer shape = Shape.shapeOf(shapeInfo);
                                                                                                                            return (rank == 2 && shape.getInt(0) == 1) || rank == 1;
                                                                                                                    
                                                                                                                    
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1615..1620

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

                                                                                                                    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

                                                                                                                        public static boolean isRowVectorShape(IntBuffer shapeInfo) {
                                                                                                                            int rank = Shape.rank(shapeInfo);
                                                                                                                            IntBuffer shape = Shape.shapeOf(shapeInfo);
                                                                                                                            return (rank == 2 && shape.get(0) == 1) || rank == 1;
                                                                                                                    
                                                                                                                    
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1601..1606

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

                                                                                                                    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

                                                                                                                        public static int size(IntBuffer buffer, int dimension) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            if (dimension >= rank)
                                                                                                                                throw new IllegalArgumentException("Invalid dimension " + dimension + " for rank " + rank + " array");
                                                                                                                            return buffer.get(1 + dimension);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2672..2677
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2685..2690

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

                                                                                                                    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

                                                                                                                        public static int size(DataBuffer buffer, int dimension) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            if (dimension >= rank)
                                                                                                                                throw new IllegalArgumentException("Invalid dimension " + dimension + " for rank " + rank + " array");
                                                                                                                            return buffer.getInt(1 + dimension);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2665..2670
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2672..2677

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

                                                                                                                    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

                                                                                                                        public static long size(LongBuffer buffer, int dimension) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            if (dimension >= rank)
                                                                                                                                throw new IllegalArgumentException("Invalid dimension " + dimension + " for rank " + rank + " array");
                                                                                                                            return buffer.get(1 + dimension);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2665..2670
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2685..2690

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

                                                                                                                    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

                                                                                                                        public static long size(long[] buffer, int dimension) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            if (dimension >= rank)
                                                                                                                                throw new IllegalArgumentException("Invalid dimension " + dimension + " for rank " + rank + " array");
                                                                                                                            return buffer[1 + dimension];
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2692..2697

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

                                                                                                                    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

                                                                                                                        public static int size(int[] buffer, int dimension) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            if (dimension >= rank)
                                                                                                                                throw new IllegalArgumentException("Invalid dimension " + dimension + " for rank " + rank + " array");
                                                                                                                            return buffer[1 + dimension];
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2699..2704

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

                                                                                                                    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

                                                                                                                            for(int i = 0; i < left.length; i++) {
                                                                                                                                if(left[i] < 1)
                                                                                                                                    throw new ND4JIllegalStateException("Left shape contained value < 0 at index " + i + " - left shape " + Arrays.toString(left));
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 513..516
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 520..523
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 562..565

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

                                                                                                                    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(left[leftIdx] != right[rightIdx]) {
                                                                                                                                    throw new IllegalArgumentException("Unable to broadcast dimension " + i + " due to shape mismatch. Right shape must be 1. "
                                                                                                                                            + "Left array shape: " + Arrays.toString(left) + ", right array shape: " + Arrays.toString(right));
                                                                                                                                }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 184..187

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

                                                                                                                    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(left[leftIdx] != right[rightIdx]) {
                                                                                                                                    throw new IllegalArgumentException("Unable to broadcast dimension " + i + " due to shape mismatch. Right shape must be 1. "
                                                                                                                                            + "Left array shape: " + Arrays.toString(left) + ", right array shape: " + Arrays.toString(right));
                                                                                                                                }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 150..153

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

                                                                                                                    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

                                                                                                                            for(int i = 0; i < left.length; i++) {
                                                                                                                                if(left[i] < 1)
                                                                                                                                    throw new ND4JIllegalStateException("Left shape contained value < 0 at index " + i + " - left shape " + Arrays.toString(left));
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 520..523
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 557..560
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 562..565

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

                                                                                                                    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

                                                                                                                            for(int i = 0; i < right.length; i++) {
                                                                                                                                if(right[i] < 1)
                                                                                                                                    throw new ND4JIllegalStateException("Right shape contained value < 0 at index " + i + " - right shape " + Arrays.toString(right));
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 513..516
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 520..523
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 557..560

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

                                                                                                                    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

                                                                                                                            for(int i = 0; i < right.length; i++) {
                                                                                                                                if(right[i] < 1)
                                                                                                                                    throw new ND4JIllegalStateException("Right shape contained value < 0 at index " + i + " - right shape " + Arrays.toString(right));
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 513..516
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 557..560
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 562..565

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

                                                                                                                    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 < buffer.capacity(); i++) {
                                                                                                                                sb.append(buffer.get(i));
                                                                                                                                if (i < buffer.capacity() - 1)
                                                                                                                                    sb.append(",");
                                                                                                                            }
                                                                                                                    deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/embeddings/loader/WordVectorSerializer.java on lines 283..287

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

                                                                                                                    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

                                                                                                                        public static boolean contentEquals(int[] arr, DataBuffer other) {
                                                                                                                            for (int i = 0; i < arr.length; i++) {
                                                                                                                                if (other.getInt(i) != arr[i]) {
                                                                                                                                    return false;
                                                                                                                                }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3478..3485

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

                                                                                                                    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

                                                                                                                        public static boolean contentEquals(long[] arr, DataBuffer other) {
                                                                                                                            for (int i = 0; i < arr.length; i++) {
                                                                                                                                if (other.getLong(i) != arr[i]) {
                                                                                                                                    return false;
                                                                                                                                }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3460..3467

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

                                                                                                                    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

                                                                                                                            for (int i = 0; i < rank; i++) {
                                                                                                                                sb.append(strideBuff.get(i));
                                                                                                                                if (i < rank - 1)
                                                                                                                                    sb.append(",");
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/executioner/DefaultOpExecutioner.java on lines 647..652
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3029..3033
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3058..3062
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3066..3070

                                                                                                                    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

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

                                                                                                                            for (int i = 0; i < rank; i++) {
                                                                                                                                sb.append(shapeBuff.get(i));
                                                                                                                                if (i < rank - 1)
                                                                                                                                    sb.append(",");
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/executioner/DefaultOpExecutioner.java on lines 647..652
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3037..3041
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3058..3062
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3066..3070

                                                                                                                    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

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

                                                                                                                            for (int i = 0; i < rank; i++) {
                                                                                                                                sb.append(shapeBuff.get(i));
                                                                                                                                if (i < rank - 1)
                                                                                                                                    sb.append(",");
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/executioner/DefaultOpExecutioner.java on lines 647..652
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3029..3033
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3037..3041
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3066..3070

                                                                                                                    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

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

                                                                                                                            for (int i = 0; i < rank; i++) {
                                                                                                                                sb.append(strideBuff.get(i));
                                                                                                                                if (i < rank - 1)
                                                                                                                                    sb.append(",");
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/executioner/DefaultOpExecutioner.java on lines 647..652
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3029..3033
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3037..3041
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3058..3062

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

                                                                                                                            if (row >= size_0 || col >= size_1)
                                                                                                                                throw new IllegalArgumentException("Invalid indices: cannot get [" + row + "," + col + "] from a "
                                                                                                                                        + Arrays.toString(shape(shapeInformation)) + " NDArray");
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1000..1002

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

                                                                                                                            if (row >= size_0 || col >= size_1)
                                                                                                                                throw new IllegalArgumentException("Invalid indices: cannot get [" + row + "," + col + "] from a "
                                                                                                                                        + Arrays.toString(shape(shapeInformation)) + " NDArray");
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1060..1062

                                                                                                                    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

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

                                                                                                                        public static long[] uniquify(long[] array) {
                                                                                                                            if (array.length <= 1)
                                                                                                                                return array;
                                                                                                                    
                                                                                                                            Set<Long> ints = new LinkedHashSet<>();
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3405..3415

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

                                                                                                                    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

                                                                                                                        public static int[] uniquify(int[] array) {
                                                                                                                            if (array.length <= 1)
                                                                                                                                return array;
                                                                                                                    
                                                                                                                            Set<Integer> ints = new LinkedHashSet<>();
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3391..3402

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

                                                                                                                    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

                                                                                                                            } else if (order == 'f') {//Expect ascending. [1,10,100] etc
                                                                                                                                for (int i = 1; i < strides.length; i++)
                                                                                                                                    if (strides[i - 1] >= strides[i])
                                                                                                                                        return false;
                                                                                                                                return true;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2552..2557

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

                                                                                                                    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

                                                                                                                            if (order == 'c') { //Expect descending. [100,10,1] etc
                                                                                                                                for (int i = 1; i < strides.length; i++)
                                                                                                                                    if (strides[i - 1] <= strides[i])
                                                                                                                                        return false;
                                                                                                                                return true;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2557..2562

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

                                                                                                                    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(left.length < right.length) {
                                                                                                                                if(left[0] == right[0]) {
                                                                                                                                    return new int[] {1, right[1]};
                                                                                                                                }
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 572..576

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

                                                                                                                    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(left.length < right.length) {
                                                                                                                                if(left[0] == right[0]) {
                                                                                                                                    return new long[] {1, right[1]};
                                                                                                                                }
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 530..534

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

                                                                                                                    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

                                                                                                                        public static IntBuffer stride(IntBuffer buffer) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            val buffer2 = (Buffer) buffer;
                                                                                                                            val ret = (IntBuffer) buffer2.position(1 + rank);
                                                                                                                            return ret.slice();
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2878..2883

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

                                                                                                                    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 < dimension.length; i++) {
                                                                                                                                if(dimension[i] < 0)
                                                                                                                                    dimension[i] += x.rank();
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ndarray/BaseNDArray.java on lines 1305..1308

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

                                                                                                                    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

                                                                                                                            for(int i = 0; i < shape.length; i++) {
                                                                                                                                if(shape[i] == 0) {
                                                                                                                                    shape[i] = 1;
                                                                                                                                }
                                                                                                                            }
                                                                                                                    deeplearning4j/deeplearning4j-modelimport/src/main/java/org/deeplearning4j/nn/modelimport/keras/layers/TFOpLayerImpl.java on lines 140..144
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/DynamicCustomOp.java on lines 337..341

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

                                                                                                                    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

                                                                                                                        public static LongBuffer stride(LongBuffer buffer) {
                                                                                                                            int rank = rank(buffer);
                                                                                                                            val buffer2 = (Buffer) buffer;
                                                                                                                            val ret = (LongBuffer) buffer2.position(1 + rank);
                                                                                                                            return ret.slice();
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2871..2876

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

                                                                                                                    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 (ni >= 1) {
                                                                                                                                last_stride = newStrides[ni - 1];
                                                                                                                            } else {
                                                                                                                                last_stride = stride[shape.length - 1];
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1925..1929

                                                                                                                    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

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

                                                                                                                            if (ni >= 1) {
                                                                                                                                last_stride = newStrides[ni - 1];
                                                                                                                            } else {
                                                                                                                                last_stride = stride[shape.length - 1];
                                                                                                                            }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 1801..1805

                                                                                                                    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

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

                                                                                                                                    for (int j = 0; j < shape.length; j++)
                                                                                                                                        if (shape[j] >= 1)
                                                                                                                                            shapeLength *= shape[j];
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ndarray/BaseNDArray.java on lines 3675..3677

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

                                                                                                                    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(left.length == 1 && right.length > 1) {
                                                                                                                                for(int i = 0; i < right.length; i++) {
                                                                                                                                    if(right[i] == left[0])
                                                                                                                                        return true;
                                                                                                                                }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3636..3641

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

                                                                                                                    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(right.length == 1 && left.length > 1) {
                                                                                                                                for(int i = 0; i < left.length; i++) {
                                                                                                                                    if(left[i] == right[0])
                                                                                                                                        return true;
                                                                                                                                }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3631..3636

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

                                                                                                                    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

                                                                                                                            return arr == null || arr.length == 0 || (arr.length == 1 && arr[0] == Integer.MAX_VALUE);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/reduce3/EuclideanDistance.java on lines 115..115

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

                                                                                                                    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

                                                                                                                            return x == DataType.FLOAT || x == DataType.HALF || x == DataType.DOUBLE || x == DataType.BFLOAT16;
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ndarray/BaseNDArray.java on lines 5469..5469

                                                                                                                    Duplicated Code

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

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

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

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 40.

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

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

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

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

                                                                                                                    Refactorings

                                                                                                                    Further Reading

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

                                                                                                                        public static INDArray ndArrayDimFromInt(int... dimensions) {
                                                                                                                            if (dimensions == null || dimensions.length == 0)
                                                                                                                                return Nd4j.empty(DataType.INT);
                                                                                                                            else
                                                                                                                                return Nd4j.createFromArray(dimensions);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3843..3848

                                                                                                                    Duplicated Code

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

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

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

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 40.

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

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

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

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

                                                                                                                    Refactorings

                                                                                                                    Further Reading

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

                                                                                                                        public static INDArray ndArrayDimFromLong(long... dimensions) {
                                                                                                                            if (dimensions == null || dimensions.length == 0)
                                                                                                                                return Nd4j.empty(DataType.LONG);
                                                                                                                            else
                                                                                                                                return Nd4j.createFromArray(dimensions);
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 3830..3835

                                                                                                                    Duplicated Code

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

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

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

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 40.

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

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

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

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

                                                                                                                    Refactorings

                                                                                                                    Further Reading

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

                                                                                                                        public static long[] shape(long[] buffer) {
                                                                                                                            long[] ret = new long[rank(buffer)];
                                                                                                                            System.arraycopy(buffer, 1, ret, 0, ret.length);
                                                                                                                            return ret;
                                                                                                                        }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2760..2764

                                                                                                                    Duplicated Code

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

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

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

                                                                                                                    Tuning

                                                                                                                    This issue has a mass of 40.

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

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

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

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

                                                                                                                    Refactorings

                                                                                                                    Further Reading

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

                                                                                                                        public static int[] shape(int[] buffer) {
                                                                                                                            int[] ret = new int[rank(buffer)];
                                                                                                                            System.arraycopy(buffer, 1, ret, 0, ret.length);
                                                                                                                            return ret;
                                                                                                                        }
                                                                                                                    nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/shape/Shape.java on lines 2766..2770

                                                                                                                    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