Program: 52395
Project: 52395
Buggy source:
public byte[] unwrap(byte[] in,int inOff,int inLen) throws InvalidCipherTextException {
  if (forWrapping) {
    throw new IllegalStateException("String_Node_Str");
  }
  if ((in.length - inOff) % engine.getBlockSize() != 0) {
    throw new DataLengthException("String_Node_Str" + engine.getBlockSize() + "String_Node_Str");
  }
  int n=2 * inLen / engine.getBlockSize();
  int V=(n - 1) * 6;
  byte[] buffer=new byte[in.length - inOff];
  System.arraycopy(in,inOff,buffer,0,in.length - inOff);
  byte[] B=new byte[engine.getBlockSize() / 2];
  System.arraycopy(buffer,0,B,0,engine.getBlockSize() / 2);
  Btemp.clear();
  int bHalfBlocksLen=buffer.length - engine.getBlockSize() / 2;
  int bufOff=engine.getBlockSize() / 2;
  while (bHalfBlocksLen != 0) {
    byte[] temp=new byte[engine.getBlockSize() / 2];
    System.arraycopy(buffer,bufOff,temp,0,engine.getBlockSize() / 2);
    Btemp.add(temp);
    bHalfBlocksLen-=engine.getBlockSize() / 2;
    bufOff+=engine.getBlockSize() / 2;
  }
  for (int j=0; j < V; j++) {
    System.arraycopy(Btemp.get(n - 2),0,buffer,0,engine.getBlockSize() / 2);
    System.arraycopy(B,0,buffer,engine.getBlockSize() / 2,engine.getBlockSize() / 2);
    intToBytes(V - j,intArray,0);
    for (int byteNum=0; byteNum < BYTES_IN_INTEGER; byteNum++) {
      buffer[byteNum + engine.getBlockSize() / 2]^=intArray[byteNum];
    }
    engine.processBlock(buffer,0,buffer,0);
    System.arraycopy(buffer,0,B,0,engine.getBlockSize() / 2);
    for (int i=2; i < n; i++) {
      System.arraycopy(Btemp.get(n - i - 1),0,Btemp.get(n - i),0,engine.getBlockSize() / 2);
    }
    System.arraycopy(buffer,engine.getBlockSize() / 2,Btemp.get(0),0,engine.getBlockSize() / 2);
  }
  System.arraycopy(B,0,buffer,0,engine.getBlockSize() / 2);
  bufOff=engine.getBlockSize() / 2;
  for (int i=0; i < n - 1; i++) {
    System.arraycopy(Btemp.get(i),0,buffer,bufOff,engine.getBlockSize() / 2);
    bufOff+=engine.getBlockSize() / 2;
  }
  System.arraycopy(buffer,buffer.length - engine.getBlockSize(),checkSumArray,0,engine.getBlockSize());
  byte[] wrappedBuffer=new byte[buffer.length - engine.getBlockSize()];
  if (!Arrays.areEqual(checkSumArray,zeroArray)) {
    throw new InvalidCipherTextException("String_Node_Str");
  }
 else {
    System.arraycopy(buffer,0,wrappedBuffer,0,buffer.length - engine.getBlockSize());
  }
  return wrappedBuffer;
}

Fixed version (ground truth):
public byte[] unwrap(byte[] in,int inOff,int inLen) throws InvalidCipherTextException {
  if (forWrapping) {
    throw new IllegalStateException("String_Node_Str");
  }
  if ((inLen % engine.getBlockSize()) != 0) {
    throw new DataLengthException("String_Node_Str" + engine.getBlockSize() + "String_Node_Str");
  }
  int n=2 * inLen / engine.getBlockSize();
  int V=(n - 1) * 6;
  byte[] buffer=new byte[inLen];
  System.arraycopy(in,inOff,buffer,0,inLen);
  byte[] B=new byte[engine.getBlockSize() / 2];
  System.arraycopy(buffer,0,B,0,engine.getBlockSize() / 2);
  Btemp.clear();
  int bHalfBlocksLen=buffer.length - engine.getBlockSize() / 2;
  int bufOff=engine.getBlockSize() / 2;
  while (bHalfBlocksLen != 0) {
    byte[] temp=new byte[engine.getBlockSize() / 2];
    System.arraycopy(buffer,bufOff,temp,0,engine.getBlockSize() / 2);
    Btemp.add(temp);
    bHalfBlocksLen-=engine.getBlockSize() / 2;
    bufOff+=engine.getBlockSize() / 2;
  }
  for (int j=0; j < V; j++) {
    System.arraycopy(Btemp.get(n - 2),0,buffer,0,engine.getBlockSize() / 2);
    System.arraycopy(B,0,buffer,engine.getBlockSize() / 2,engine.getBlockSize() / 2);
    intToBytes(V - j,intArray,0);
    for (int byteNum=0; byteNum < BYTES_IN_INTEGER; byteNum++) {
      buffer[byteNum + engine.getBlockSize() / 2]^=intArray[byteNum];
    }
    engine.processBlock(buffer,0,buffer,0);
    System.arraycopy(buffer,0,B,0,engine.getBlockSize() / 2);
    for (int i=2; i < n; i++) {
      System.arraycopy(Btemp.get(n - i - 1),0,Btemp.get(n - i),0,engine.getBlockSize() / 2);
    }
    System.arraycopy(buffer,engine.getBlockSize() / 2,Btemp.get(0),0,engine.getBlockSize() / 2);
  }
  System.arraycopy(B,0,buffer,0,engine.getBlockSize() / 2);
  bufOff=engine.getBlockSize() / 2;
  for (int i=0; i < n - 1; i++) {
    System.arraycopy(Btemp.get(i),0,buffer,bufOff,engine.getBlockSize() / 2);
    bufOff+=engine.getBlockSize() / 2;
  }
  System.arraycopy(buffer,buffer.length - engine.getBlockSize(),checkSumArray,0,engine.getBlockSize());
  byte[] wrappedBuffer=new byte[buffer.length - engine.getBlockSize()];
  if (!Arrays.areEqual(checkSumArray,zeroArray)) {
    throw new InvalidCipherTextException("String_Node_Str");
  }
 else {
    System.arraycopy(buffer,0,wrappedBuffer,0,buffer.length - engine.getBlockSize());
  }
  return wrappedBuffer;
}