Program: 3310
Project: 3310
Buggy source:
private void doTransformOp(TransformOp op){
  INDArray x=op.x();
  INDArray y=op.y();
  INDArray z=op.z();
  if (y != null) {
    if (!(x instanceof IComplexNDArray) && !(z instanceof IComplexNDArray)) {
      boolean canDoDirectly;
      if (x == z) {
        if (y == null)         canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x);
 else         canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x,y);
      }
 else {
        if (y == null)         canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x,z);
 else         canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x,y,z);
      }
      if (canDoDirectly) {
        op.getTransformOpDataBufferAction(PARALLEL_THRESHOLD,op.n(),x.data(),y.data(),z.data(),x.offset(),y.offset(),z.offset(),x.elementWiseStride(),y.elementWiseStride(),z.elementWiseStride()).invoke();
      }
 else {
        new TransformViaTensorDataBufferTask(op,PARALLEL_THRESHOLD,x,y,z).invoke();
      }
    }
 else {
      if (z instanceof IComplexNDArray) {
        IComplexNDArray cz=(IComplexNDArray)z;
        if (x instanceof IComplexNDArray) {
          IComplexNDArray cx=(IComplexNDArray)x;
          if (y instanceof IComplexNDArray) {
            IComplexNDArray cy=(IComplexNDArray)y;
            for (int i=0; i < op.n(); i++) {
              cz.putScalar(i,op.op(cx.getComplex(i),cy.getComplex(i)));
            }
          }
 else {
            for (int i=0; i < op.n(); i++) {
              cz.putScalar(i,op.op(cx.getComplex(i),y.getDouble(i)));
            }
          }
        }
      }
 else {
        throw new UnsupportedOperationException("String_Node_Str" + x.getClass().getName() + "String_Node_Str"+ y.getClass().getName());
      }
    }
  }
 else {
    if (!(x instanceof IComplexNDArray) && !(z instanceof IComplexNDArray)) {
      boolean canDoDirectly;
      if (x == z)       canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x);
 else       canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x,z);
      if (canDoDirectly) {
        op.getTransformOpDataBufferAction(PARALLEL_THRESHOLD,x.length(),x.data(),null,z.data(),x.offset(),0,z.offset(),x.elementWiseStride(),0,z.elementWiseStride()).invoke();
        return;
      }
 else {
        new TransformViaTensorDataBufferTask(op,PARALLEL_THRESHOLD,x,null,z).invoke();
        return;
      }
    }
 else {
      if (z instanceof IComplexNDArray) {
        IComplexNDArray cz=(IComplexNDArray)z;
        if (x instanceof IComplexNDArray) {
          IComplexNDArray cx=(IComplexNDArray)x;
          for (int i=0; i < op.n(); i++) {
            cz.putScalar(i,op.op(cx.getComplex(i)));
          }
        }
 else {
          for (int i=0; i < op.n(); i++) {
            cz.putScalar(i,op.op(x.getDouble(i)));
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
private void doTransformOp(TransformOp op){
  INDArray x=op.x();
  INDArray y=op.y();
  INDArray z=op.z();
  if (y != null) {
    if (!(x instanceof IComplexNDArray) && !(z instanceof IComplexNDArray)) {
      boolean canDoDirectly;
      if (x == z) {
        if (y == null)         canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x);
 else         canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x,y);
      }
 else {
        if (y == null)         canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x,z);
 else         canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x,y,z);
      }
      if (canDoDirectly) {
        op.getTransformOpDataBufferAction(PARALLEL_THRESHOLD,op.n(),x.data(),y.data(),z.data(),x.offset(),y.offset(),z.offset(),x.elementWiseStride(),y.elementWiseStride(),z.elementWiseStride()).invoke();
      }
 else {
        new TransformViaTensorDataBufferAction(op,PARALLEL_THRESHOLD,x,y,z).invoke();
      }
    }
 else {
      if (z instanceof IComplexNDArray) {
        IComplexNDArray cz=(IComplexNDArray)z;
        if (x instanceof IComplexNDArray) {
          IComplexNDArray cx=(IComplexNDArray)x;
          if (y instanceof IComplexNDArray) {
            IComplexNDArray cy=(IComplexNDArray)y;
            for (int i=0; i < op.n(); i++) {
              cz.putScalar(i,op.op(cx.getComplex(i),cy.getComplex(i)));
            }
          }
 else {
            for (int i=0; i < op.n(); i++) {
              cz.putScalar(i,op.op(cx.getComplex(i),y.getDouble(i)));
            }
          }
        }
      }
 else {
        throw new UnsupportedOperationException("String_Node_Str" + x.getClass().getName() + "String_Node_Str"+ y.getClass().getName());
      }
    }
  }
 else {
    if (!(x instanceof IComplexNDArray) && !(z instanceof IComplexNDArray)) {
      boolean canDoDirectly;
      if (x == z)       canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x);
 else       canDoDirectly=OpExecutionerUtil.canDoTransformOpDirectly(x,z);
      if (canDoDirectly) {
        op.getTransformOpDataBufferAction(PARALLEL_THRESHOLD,x.length(),x.data(),null,z.data(),x.offset(),0,z.offset(),x.elementWiseStride(),0,z.elementWiseStride()).invoke();
        return;
      }
 else {
        new TransformViaTensorDataBufferAction(op,PARALLEL_THRESHOLD,x,null,z).invoke();
        return;
      }
    }
 else {
      if (z instanceof IComplexNDArray) {
        IComplexNDArray cz=(IComplexNDArray)z;
        if (x instanceof IComplexNDArray) {
          IComplexNDArray cx=(IComplexNDArray)x;
          for (int i=0; i < op.n(); i++) {
            cz.putScalar(i,op.op(cx.getComplex(i)));
          }
        }
 else {
          for (int i=0; i < op.n(); i++) {
            cz.putScalar(i,op.op(x.getDouble(i)));
          }
        }
      }
    }
  }
}