Program: 2917
Project: 2917
Buggy source:
@Override public StateReturnValue execute(ChannelBuffer buffer,IcapMessageDecoder icapMessageDecoder) throws Exception {
  String line=IcapDecoderUtil.readLine(buffer,icapMessageDecoder.maxInitialLineLength);
  int chunkSize=IcapDecoderUtil.getChunkSize(line);
  icapMessageDecoder.currentChunkSize=chunkSize;
  if (chunkSize == -1) {
    icapMessageDecoder.currentChunkSize=0;
    IcapDecoderUtil.readLine(buffer,Integer.MAX_VALUE);
    return StateReturnValue.createRelevantResultWithDecisionInformation(new DefaultIcapChunkTrailer(true,true),DecisionState.IS_LAST_PREVIEW_CHUNK);
  }
 else   if (chunkSize == -2) {
    return StateReturnValue.createIrrelevantResultWithDecisionInformation(DecisionState.IRRELEVANT);
  }
 else   if (chunkSize == 0) {
    byte previewByte=buffer.getByte(buffer.readerIndex() + 1);
    if (previewByte == IcapCodecUtil.CR | previewByte == IcapCodecUtil.LF) {
      if (icapMessageDecoder.message.isPreviewMessage()) {
        return StateReturnValue.createIrrelevantResultWithDecisionInformation(DecisionState.IS_LAST_PREVIEW_CHUNK);
      }
 else {
        return StateReturnValue.createRelevantResultWithDecisionInformation(new DefaultIcapChunkTrailer(icapMessageDecoder.message.isPreviewMessage(),false),DecisionState.IS_LAST_CHUNK);
      }
    }
 else {
      return StateReturnValue.createIrrelevantResultWithDecisionInformation(DecisionState.READ_TRAILING_HEADERS);
    }
  }
 else {
    icapMessageDecoder.currentChunkSize=chunkSize;
    if (chunkSize >= icapMessageDecoder.maxChunkSize) {
      return StateReturnValue.createIrrelevantResultWithDecisionInformation(DecisionState.READ_HUGE_CHUNK_IN_SMALER_CHUNKS);
    }
 else {
      return StateReturnValue.createIrrelevantResultWithDecisionInformation(DecisionState.READ_CHUNK);
    }
  }
}

Fixed version (ground truth):
@Override public StateReturnValue execute(ChannelBuffer buffer,IcapMessageDecoder icapMessageDecoder) throws Exception {
  String line=IcapDecoderUtil.readLine(buffer,icapMessageDecoder.maxInitialLineLength);
  int chunkSize=IcapDecoderUtil.getChunkSize(line);
  icapMessageDecoder.currentChunkSize=chunkSize;
  if (chunkSize == -1) {
    icapMessageDecoder.currentChunkSize=0;
    IcapDecoderUtil.readLine(buffer,Integer.MAX_VALUE);
    return StateReturnValue.createRelevantResultWithDecisionInformation(new DefaultIcapChunkTrailer(true,true),DecisionState.IS_LAST_PREVIEW_CHUNK);
  }
 else   if (chunkSize == 0) {
    byte previewByte=buffer.getByte(buffer.readerIndex() + 1);
    if (previewByte == IcapCodecUtil.CR | previewByte == IcapCodecUtil.LF) {
      IcapDecoderUtil.readLine(buffer,10);
      if (icapMessageDecoder.message.isPreviewMessage()) {
        return StateReturnValue.createRelevantResultWithDecisionInformation(new DefaultIcapChunkTrailer(true,false),DecisionState.IS_LAST_PREVIEW_CHUNK);
      }
 else {
        return StateReturnValue.createRelevantResultWithDecisionInformation(new DefaultIcapChunkTrailer(icapMessageDecoder.message.isPreviewMessage(),false),DecisionState.IS_LAST_CHUNK);
      }
    }
 else {
      return StateReturnValue.createIrrelevantResultWithDecisionInformation(DecisionState.READ_TRAILING_HEADERS);
    }
  }
 else {
    icapMessageDecoder.currentChunkSize=chunkSize;
    if (chunkSize >= icapMessageDecoder.maxChunkSize) {
      return StateReturnValue.createIrrelevantResultWithDecisionInformation(DecisionState.READ_HUGE_CHUNK_IN_SMALER_CHUNKS);
    }
 else {
      return StateReturnValue.createIrrelevantResultWithDecisionInformation(DecisionState.READ_CHUNK);
    }
  }
}