Program: 52520
Project: 52520
Buggy source:
private TestResult wrapTest(int id,byte[] kek,byte[] in,byte[] out){
  Wrapper wrapper=new AESWrapEngine();
  wrapper.init(true,new KeyParameter(kek));
  try {
    byte[] cText=wrapper.wrap(in,0,in.length);
    if (!Arrays.areEqual(cText,out)) {
      return new SimpleTestResult(false,getName() + "String_Node_Str" + id+ "String_Node_Str"+ new String(Hex.encode(out))+ "String_Node_Str"+ new String(Hex.encode(cText)));
    }
  }
 catch (  Exception e) {
    return new SimpleTestResult(false,getName() + "String_Node_Str" + e.toString());
  }
  wrapper.init(false,new KeyParameter(kek));
  try {
    byte[] pText=wrapper.unwrap(out,0,out.length);
    if (!Arrays.areEqual(pText,in)) {
      return new SimpleTestResult(false,getName() + "String_Node_Str" + id+ "String_Node_Str"+ new String(Hex.encode(in))+ "String_Node_Str"+ new String(Hex.encode(pText)));
    }
  }
 catch (  Exception e) {
    return new SimpleTestResult(false,getName() + "String_Node_Str",e);
  }
  byte[] pText=new byte[5 + in.length];
  byte[] cText;
  System.arraycopy(in,0,pText,5,in.length);
  wrapper.init(true,new KeyParameter(kek));
  try {
    cText=wrapper.wrap(pText,5,in.length);
    if (!Arrays.areEqual(cText,out)) {
      return new SimpleTestResult(false,getName() + "String_Node_Str" + id+ "String_Node_Str"+ new String(Hex.encode(out))+ "String_Node_Str"+ new String(Hex.encode(cText)));
    }
  }
 catch (  Exception e) {
    return new SimpleTestResult(false,getName() + "String_Node_Str" + e.toString());
  }
  wrapper.init(false,new KeyParameter(kek));
  cText=new byte[6 + out.length];
  System.arraycopy(out,0,cText,6,out.length);
  try {
    pText=wrapper.unwrap(cText,6,out.length);
    if (!Arrays.areEqual(pText,in)) {
      return new SimpleTestResult(false,getName() + "String_Node_Str" + id+ "String_Node_Str"+ new String(Hex.encode(in))+ "String_Node_Str"+ new String(Hex.encode(pText)));
    }
  }
 catch (  Exception e) {
    return new SimpleTestResult(false,getName() + "String_Node_Str",e);
  }
  return new SimpleTestResult(true,getName() + "String_Node_Str");
}

Fixed version (ground truth):
private void wrapTest(int id,byte[] kek,byte[] in,byte[] out){
  Wrapper wrapper=new AESWrapEngine();
  wrapper.init(true,new KeyParameter(kek));
  try {
    byte[] cText=wrapper.wrap(in,0,in.length);
    if (!Arrays.areEqual(cText,out)) {
      fail("String_Node_Str" + id + "String_Node_Str"+ new String(Hex.encode(out))+ "String_Node_Str"+ new String(Hex.encode(cText)));
    }
  }
 catch (  Exception e) {
    fail("String_Node_Str" + e.toString());
  }
  wrapper.init(false,new KeyParameter(kek));
  try {
    byte[] pText=wrapper.unwrap(out,0,out.length);
    if (!Arrays.areEqual(pText,in)) {
      fail("String_Node_Str" + id + "String_Node_Str"+ new String(Hex.encode(in))+ "String_Node_Str"+ new String(Hex.encode(pText)));
    }
  }
 catch (  Exception e) {
    fail("String_Node_Str",e);
  }
  byte[] pText=new byte[5 + in.length];
  byte[] cText;
  System.arraycopy(in,0,pText,5,in.length);
  wrapper.init(true,new KeyParameter(kek));
  try {
    cText=wrapper.wrap(pText,5,in.length);
    if (!Arrays.areEqual(cText,out)) {
      fail("String_Node_Str" + id + "String_Node_Str"+ new String(Hex.encode(out))+ "String_Node_Str"+ new String(Hex.encode(cText)));
    }
  }
 catch (  Exception e) {
    fail("String_Node_Str" + e.toString());
  }
  wrapper.init(false,new KeyParameter(kek));
  cText=new byte[6 + out.length];
  System.arraycopy(out,0,cText,6,out.length);
  try {
    pText=wrapper.unwrap(cText,6,out.length);
    if (!Arrays.areEqual(pText,in)) {
      fail("String_Node_Str" + id + "String_Node_Str"+ new String(Hex.encode(in))+ "String_Node_Str"+ new String(Hex.encode(pText)));
    }
  }
 catch (  Exception e) {
    fail("String_Node_Str",e);
  }
}