Program: 33349
Project: 33349
Buggy source:
@Override public void read() throws IOException {
  int i=0;
  while ((i + 4) < data.length) {
    String _8bim=new String(data,i,4);
    i+=4;
    if (_8bim.equals("String_Node_Str")) {
      short id=IOUtils.readShortMM(data,i);
      i+=2;
      int nameLen=0;
      while (data[i + nameLen] != 0) {
        nameLen++;
      }
      nameLen++;
      if ((nameLen % 2) != 0)       nameLen++;
      String name=new String(data,i,nameLen).trim();
      i+=nameLen;
      int size=IOUtils.readIntMM(data,i);
      i+=4;
      ImageResourceID eId=ImageResourceID.fromShort(id);
      _8bims.add(new _8BIM(id,name,size,ArrayUtils.subArray(data,i,size)));
      if (eId == ImageResourceID.THUMBNAIL_RESOURCE_PS4 || eId == ImageResourceID.THUMBNAIL_RESOURCE_PS5) {
        containsThumbnail=true;
        int thumbnailFormat=IOUtils.readIntMM(data,i);
        int width=IOUtils.readIntMM(data,i + 4);
        int height=IOUtils.readIntMM(data,i + 8);
        int widthBytes=IOUtils.readIntMM(data,i + 12);
        int totalSize=IOUtils.readIntMM(data,i + 16);
        int sizeAfterCompression=IOUtils.readIntMM(data,i + 20);
        short bitsPerPixel=IOUtils.readShortMM(data,i + 24);
        short numOfPlanes=IOUtils.readShortMM(data,i + 26);
        byte[] thumbnailData=null;
        if (thumbnailFormat == IRBThumbnail.DATA_TYPE_KJpegRGB)         thumbnailData=ArrayUtils.subArray(data,i + 28,sizeAfterCompression);
 else         if (thumbnailFormat == IRBThumbnail.DATA_TYPE_KRawRGB)         thumbnailData=ArrayUtils.subArray(data,i + 28,totalSize);
        thumbnail=new IRBThumbnail(eId,thumbnailFormat,width,height,widthBytes,totalSize,sizeAfterCompression,bitsPerPixel,numOfPlanes,thumbnailData);
      }
      i+=size;
      if (size % 2 != 0)       i++;
    }
  }
  loaded=true;
}

Fixed version (ground truth):
@Override public void read() throws IOException {
  int i=0;
  while ((i + 4) < data.length) {
    String _8bim=new String(data,i,4);
    i+=4;
    if (_8bim.equals("String_Node_Str")) {
      short id=IOUtils.readShortMM(data,i);
      i+=2;
      int nameLen=data[i++] & 0xff;
      if ((nameLen % 2) == 0)       nameLen++;
      String name=new String(data,i,nameLen).trim();
      i+=nameLen;
      int size=IOUtils.readIntMM(data,i);
      i+=4;
      ImageResourceID eId=ImageResourceID.fromShort(id);
      _8bims.add(new _8BIM(id,name,size,ArrayUtils.subArray(data,i,size)));
      if (eId == ImageResourceID.THUMBNAIL_RESOURCE_PS4 || eId == ImageResourceID.THUMBNAIL_RESOURCE_PS5) {
        containsThumbnail=true;
        int thumbnailFormat=IOUtils.readIntMM(data,i);
        int width=IOUtils.readIntMM(data,i + 4);
        int height=IOUtils.readIntMM(data,i + 8);
        int widthBytes=IOUtils.readIntMM(data,i + 12);
        int totalSize=IOUtils.readIntMM(data,i + 16);
        int sizeAfterCompression=IOUtils.readIntMM(data,i + 20);
        short bitsPerPixel=IOUtils.readShortMM(data,i + 24);
        short numOfPlanes=IOUtils.readShortMM(data,i + 26);
        byte[] thumbnailData=null;
        if (thumbnailFormat == IRBThumbnail.DATA_TYPE_KJpegRGB)         thumbnailData=ArrayUtils.subArray(data,i + 28,sizeAfterCompression);
 else         if (thumbnailFormat == IRBThumbnail.DATA_TYPE_KRawRGB)         thumbnailData=ArrayUtils.subArray(data,i + 28,totalSize);
        thumbnail=new IRBThumbnail(eId,thumbnailFormat,width,height,widthBytes,totalSize,sizeAfterCompression,bitsPerPixel,numOfPlanes,thumbnailData);
      }
      i+=size;
      if (size % 2 != 0)       i++;
    }
  }
  loaded=true;
}