Program: 34741
Project: 34741
Buggy source:
private void verifyReadFrameSequence() throws ProtocolException, StreamClosedException {
  if (!currentFrame.isReadFrame()) {
    throw new ProtocolException("String_Node_Str");
  }
switch (frameType) {
case DATA:
    if (state == StreamState.IDLE) {
      throw new ProtocolException("String_Node_Str" + state);
    }
  if (!(state == StreamState.OPEN || state == StreamState.HALF_CLOSED_LOCAL)) {
    throw new StreamClosedException("String_Node_Str" + state);
  }
break;
case HEADERS:
if (state == StreamState.HALF_CLOSED_REMOTE || state == StreamState.CLOSED) {
throw new StreamClosedException("String_Node_Str" + state);
}
 else if (state != StreamState.IDLE && state != StreamState.OPEN) {
throw new ProtocolException("String_Node_Str" + state);
}
 else if (state == StreamState.OPEN && !currentFrame.flagEndStreamSet()) {
throw new ProtocolException("String_Node_Str");
}
break;
case PRIORITY:
break;
case RST_STREAM:
if (state == StreamState.IDLE) {
throw new ProtocolException("String_Node_Str" + state);
}
break;
case PUSH_PROMISE:
throw new ProtocolException("String_Node_Str");
case WINDOW_UPDATE:
if (state == StreamState.IDLE && myID != 0) {
throw new ProtocolException("String_Node_Str" + state);
}
break;
case CONTINUATION:
if (state == StreamState.IDLE) {
throw new ProtocolException("String_Node_Str" + state);
}
 else if (state == StreamState.CLOSED) {
throw new StreamClosedException("String_Node_Str" + state);
}
 else if (!isContinuationFrameExpected()) {
throw new ProtocolException("String_Node_Str");
}
break;
default :
break;
}
}

Fixed version (ground truth):
private void verifyReadFrameSequence() throws ProtocolException, StreamClosedException {
  if (!currentFrame.isReadFrame()) {
    throw new ProtocolException("String_Node_Str");
  }
switch (frameType) {
case DATA:
    if (state == StreamState.IDLE) {
      throw new ProtocolException("String_Node_Str" + state);
    }
  if (!(state == StreamState.OPEN || state == StreamState.HALF_CLOSED_LOCAL)) {
    StreamClosedException se=new StreamClosedException("String_Node_Str" + state);
    se.setConnectionError(false);
    throw se;
  }
break;
case HEADERS:
if (state == StreamState.HALF_CLOSED_REMOTE || state == StreamState.CLOSED) {
throw new StreamClosedException("String_Node_Str" + state);
}
 else if (state != StreamState.IDLE && state != StreamState.OPEN) {
throw new ProtocolException("String_Node_Str" + state);
}
 else if (state == StreamState.OPEN && !currentFrame.flagEndStreamSet()) {
throw new ProtocolException("String_Node_Str");
}
 else if (isConnectStream) {
ProtocolException pe=new ProtocolException("String_Node_Str");
pe.setConnectionError(false);
throw pe;
}
break;
case PRIORITY:
break;
case RST_STREAM:
if (state == StreamState.IDLE) {
throw new ProtocolException("String_Node_Str" + state);
}
break;
case PUSH_PROMISE:
throw new ProtocolException("String_Node_Str");
case WINDOW_UPDATE:
if (state == StreamState.IDLE && myID != 0) {
throw new ProtocolException("String_Node_Str" + state);
}
break;
case CONTINUATION:
if (state == StreamState.IDLE) {
throw new ProtocolException("String_Node_Str" + state);
}
 else if (state == StreamState.CLOSED) {
throw new StreamClosedException("String_Node_Str" + state);
}
 else if (!isContinuationFrameExpected()) {
throw new ProtocolException("String_Node_Str");
}
 else if (isConnectStream) {
ProtocolException pe=new ProtocolException("String_Node_Str");
pe.setConnectionError(false);
throw pe;
}
break;
default :
break;
}
}