Program: 34789
Project: 34789
Buggy source:
private void processOpen(Constants.Direction direction) throws ProtocolException, FlowControlException, CompressionException {
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + myID);
  }
  if (direction == Constants.Direction.READ_IN) {
    if (frameType == FrameTypes.DATA) {
      getBodyFromFrame();
      if (currentFrame.flagEndStreamSet()) {
        processCompleteData();
        setReadyForRead();
      }
    }
 else     if (frameType == FrameTypes.CONTINUATION || (frameType == FrameTypes.HEADERS)) {
      getHeadersFromFrame();
      if (currentFrame.flagEndHeadersSet()) {
        processCompleteHeaders();
        setHeadersComplete();
        if (currentFrame.flagEndStreamSet()) {
          setReadyForRead();
        }
      }
 else {
        setContinuationFrameExpected(true);
      }
    }
    if (currentFrame.flagEndStreamSet()) {
      endStream=true;
      updateStreamState(StreamState.HALF_CLOSED_REMOTE);
    }
  }
 else {
    if (frameType == FrameTypes.PUSH_PROMISE) {
    }
 else     if (frameType == FrameTypes.HEADERS || frameType == FrameTypes.CONTINUATION) {
      if (currentFrame.flagEndHeadersSet()) {
        setContinuationFrameExpected(false);
        if (currentFrame.flagEndStreamSet()) {
          endStream=true;
          updateStreamState(StreamState.HALF_CLOSED_LOCAL);
        }
      }
 else {
        setContinuationFrameExpected(true);
        if (currentFrame.flagEndStreamSet()) {
          endStream=true;
        }
      }
    }
    boolean writeCompleted=writeFrameSync();
    if (frameType == FrameTypes.DATA && writeCompleted && currentFrame.flagEndStreamSet()) {
      endStream=true;
      updateStreamState(StreamState.HALF_CLOSED_LOCAL);
    }
  }
}

Fixed version (ground truth):
private void processOpen(Constants.Direction direction) throws ProtocolException, FlowControlException, CompressionException {
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + myID);
  }
  if (direction == Constants.Direction.READ_IN) {
    if (frameType == FrameTypes.DATA) {
      getBodyFromFrame();
      if (currentFrame.flagEndStreamSet()) {
        processCompleteData();
        setReadyForRead();
      }
    }
 else     if (frameType == FrameTypes.CONTINUATION || (frameType == FrameTypes.HEADERS)) {
      getHeadersFromFrame();
      if (currentFrame.flagEndHeadersSet()) {
        processCompleteHeaders(false);
        setHeadersComplete();
        if (currentFrame.flagEndStreamSet()) {
          setReadyForRead();
        }
      }
 else {
        setContinuationFrameExpected(true);
      }
    }
    if (currentFrame.flagEndStreamSet()) {
      endStream=true;
      updateStreamState(StreamState.HALF_CLOSED_REMOTE);
    }
  }
 else {
    if (frameType == FrameTypes.PUSH_PROMISE) {
    }
 else     if (frameType == FrameTypes.HEADERS || frameType == FrameTypes.CONTINUATION) {
      if (currentFrame.flagEndHeadersSet()) {
        setContinuationFrameExpected(false);
        if (currentFrame.flagEndStreamSet()) {
          endStream=true;
          updateStreamState(StreamState.HALF_CLOSED_LOCAL);
        }
      }
 else {
        setContinuationFrameExpected(true);
        if (currentFrame.flagEndStreamSet()) {
          endStream=true;
        }
      }
    }
    boolean writeCompleted=writeFrameSync();
    if (frameType == FrameTypes.DATA && writeCompleted && currentFrame.flagEndStreamSet()) {
      endStream=true;
      updateStreamState(StreamState.HALF_CLOSED_LOCAL);
    }
  }
}