Program: 4962
Project: 4962
Buggy source:
private void handlePatch(PatchTableMessage m) throws BadPacketException {
  if (sequenceSize != -1 && sequenceSize != m.getSequenceSize())   throw new BadPacketException("String_Node_Str" + m.getSequenceSize() + "String_Node_Str"+ sequenceSize);
  if (sequenceNumber != -1 && sequenceNumber + 1 != m.getSequenceNumber())   throw new BadPacketException("String_Node_Str" + m.getSequenceNumber() + "String_Node_Str"+ sequenceNumber);
  byte[] data=m.getData();
  if (m.getCompressor() == PatchTableMessage.COMPRESSOR_DEFLATE) {
    try {
      if (m.getSequenceNumber() == 1)       uncompressor=new Inflater();
      Assert.that(uncompressor != null,"String_Node_Str");
      data=uncompress(data);
    }
 catch (    IOException e) {
      throw new BadPacketException("String_Node_Str" + e);
    }
  }
 else   if (m.getCompressor() != PatchTableMessage.COMPRESSOR_NONE) {
    throw new BadPacketException("String_Node_Str");
  }
  if (m.getEntryBits() == 4)   data=unhalve(data);
 else   if (m.getEntryBits() != 8)   throw new BadPacketException("String_Node_Str");
  for (int i=0; i < data.length; i++) {
    try {
      boolean wasInfinity=(table[nextPatch] >= infinity);
      table[nextPatch]+=data[i];
      boolean isInfinity=(table[nextPatch] >= infinity);
      if (wasInfinity && !isInfinity)       entries++;
 else       if (!wasInfinity && isInfinity)       entries--;
    }
 catch (    IndexOutOfBoundsException e) {
      throw new BadPacketException("String_Node_Str" + nextPatch + "String_Node_Str"+ data.length+ "String_Node_Str");
    }
    nextPatch++;
  }
  if (m.getSequenceNumber() != m.getSequenceSize()) {
    this.sequenceNumber=m.getSequenceNumber();
  }
 else {
    this.sequenceNumber=-1;
    this.sequenceSize=-1;
    this.nextPatch=0;
  }
}

Fixed version (ground truth):
private void handlePatch(PatchTableMessage m) throws BadPacketException {
  if (sequenceSize != -1 && sequenceSize != m.getSequenceSize())   throw new BadPacketException("String_Node_Str" + m.getSequenceSize() + "String_Node_Str"+ sequenceSize);
  if (sequenceNumber == -1 ? m.getSequenceNumber() != 1 : sequenceNumber + 1 != m.getSequenceNumber())   throw new BadPacketException("String_Node_Str" + m.getSequenceNumber() + "String_Node_Str"+ sequenceNumber);
  byte[] data=m.getData();
  if (m.getCompressor() == PatchTableMessage.COMPRESSOR_DEFLATE) {
    try {
      if (m.getSequenceNumber() == 1)       uncompressor=new Inflater();
      Assert.that(uncompressor != null,"String_Node_Str" + m.getSequenceNumber());
      data=uncompress(data);
    }
 catch (    IOException e) {
      throw new BadPacketException("String_Node_Str" + e);
    }
  }
 else   if (m.getCompressor() != PatchTableMessage.COMPRESSOR_NONE) {
    throw new BadPacketException("String_Node_Str");
  }
  if (m.getEntryBits() == 4)   data=unhalve(data);
 else   if (m.getEntryBits() != 8)   throw new BadPacketException("String_Node_Str");
  for (int i=0; i < data.length; i++) {
    try {
      boolean wasInfinity=(table[nextPatch] >= infinity);
      table[nextPatch]+=data[i];
      boolean isInfinity=(table[nextPatch] >= infinity);
      if (wasInfinity && !isInfinity)       entries++;
 else       if (!wasInfinity && isInfinity)       entries--;
    }
 catch (    IndexOutOfBoundsException e) {
      throw new BadPacketException("String_Node_Str" + nextPatch + "String_Node_Str"+ data.length+ "String_Node_Str");
    }
    nextPatch++;
  }
  this.sequenceSize=m.getSequenceSize();
  if (m.getSequenceNumber() != m.getSequenceSize()) {
    this.sequenceNumber=m.getSequenceNumber();
  }
 else {
    this.sequenceNumber=-1;
    this.sequenceSize=-1;
    this.nextPatch=0;
  }
}