nus-yam/ex-repair huggingface dataset:
Program: 34724
Project: 34724
Buggy source:
@Override public void close(VirtualConnection inVC,Exception e){
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + this + "String_Node_Str"+ inVC);
  }
  if (streamID == 0 || streamID % 2 == 1) {
    this.muxLink.close(inVC,e);
  }
}

Fixed version (ground truth):
@Override public void close(VirtualConnection inVC,Exception e){
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + this + "String_Node_Str"+ inVC);
  }
  if (streamID == 0 || streamID % 2 == 1) {
    if (e == null || e instanceof Http2Exception) {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
        Tr.debug(tc,"String_Node_Str" + e);
      }
      this.muxLink.close(inVC,e);
    }
 else {
      H2StreamProcessor h2sp=muxLink.getStreamProcessor(streamID);
      if (h2sp != null) {
        try {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc,"String_Node_Str" + streamID);
          }
          int PROTOCOL_ERROR=0x1;
          Frame reset=new FrameRstStream(streamID,PROTOCOL_ERROR,false);
          h2sp.processNextFrame(reset,Constants.Direction.WRITING_OUT);
        }
 catch (        Http2Exception h2e) {
          this.muxLink.close(inVC,e);
        }
      }
      this.muxLink.close(inVC,null);
    }
  }
 else {
    H2StreamProcessor h2sp=muxLink.getStreamProcessor(streamID);
    if (h2sp != null && !h2sp.isStreamClosed() && !h2sp.isHalfClosed()) {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
        Tr.debug(tc,"String_Node_Str" + streamID);
      }
      int PROTOCOL_ERROR=0x1;
      Frame reset=new FrameRstStream(streamID,PROTOCOL_ERROR,false);
      try {
        h2sp.processNextFrame(reset,Constants.Direction.WRITING_OUT);
      }
 catch (      Http2Exception h2e) {
      }
    }
  }
}
Program: 34725
Project: 34725
Buggy source:
/** 
 * @param direction
 * @throws CompressionException
 * @throws ProtocolException
 */
private void processHalfClosedRemote(Constants.Direction direction) throws FlowControlException, CompressionException, ProtocolException {
  if (direction == Direction.WRITING_OUT) {
    boolean writeCompleted=writeFrameSync();
    if ((currentFrame.getFrameType() == FrameTypes.RST_STREAM || currentFrame.flagEndStreamSet()) && writeCompleted) {
      endStream=true;
      updateStreamState(StreamState.CLOSED);
    }
 else     if (frameType == FrameTypes.HEADERS || frameType == FrameTypes.CONTINUATION) {
      if (currentFrame.flagEndHeadersSet()) {
        setContinuationFrameExpected(false);
      }
 else {
        setContinuationFrameExpected(true);
      }
    }
  }
 else   if (currentFrame.getFrameType() == FrameTypes.RST_STREAM) {
    endStream=true;
    updateStreamState(StreamState.CLOSED);
  }
 else   if (frameType == FrameTypes.CONTINUATION) {
    getHeadersFromFrame();
    if (currentFrame.flagEndHeadersSet()) {
      processCompleteHeaders(false);
      setHeadersComplete();
      setReadyForRead();
    }
  }
}

Fixed version (ground truth):
/** 
 * @param direction
 * @throws CompressionException
 * @throws ProtocolException
 */
private void processHalfClosedRemote(Constants.Direction direction) throws FlowControlException, CompressionException, ProtocolException {
  if (direction == Direction.WRITING_OUT) {
    boolean writeCompleted=writeFrameSync();
    if ((currentFrame.getFrameType() == FrameTypes.RST_STREAM || currentFrame.flagEndStreamSet()) && writeCompleted) {
      endStream=true;
    }
 else     if (frameType == FrameTypes.HEADERS || frameType == FrameTypes.CONTINUATION) {
      if (currentFrame.flagEndHeadersSet()) {
        setContinuationFrameExpected(false);
      }
 else {
        setContinuationFrameExpected(true);
      }
    }
  }
 else   if (currentFrame.getFrameType() == FrameTypes.RST_STREAM) {
    endStream=true;
    updateStreamState(StreamState.CLOSED);
  }
 else   if (frameType == FrameTypes.CONTINUATION) {
    getHeadersFromFrame();
    if (currentFrame.flagEndHeadersSet()) {
      processCompleteHeaders(false);
      setHeadersComplete();
      setReadyForRead();
    }
  }
}
Program: 34726
Project: 34726
Buggy source:
/** 
 * Transitions the stream state, give the previous state and current frame. Handles writes and error processing as needed.
 * @param Direction.WRITING_OUT or Direction.READING_IN
 * @throws Http2Exception
 */
private void readWriteTransitionState(Constants.Direction direction) throws Http2Exception {
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + currentFrame.getFrameType() + "String_Node_Str"+ state);
  }
  if (currentFrame.getFrameType() == FrameTypes.GOAWAY || currentFrame.getFrameType() == FrameTypes.RST_STREAM) {
    writeFrameSync();
    this.updateStreamState(StreamState.CLOSED);
    if (currentFrame.getFrameType() == FrameTypes.GOAWAY) {
      muxLink.closeConnectionLink(null);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
      Tr.debug(tc,"String_Node_Str" + state);
    }
    return;
  }
switch (state) {
case IDLE:
    processIdle(direction);
  break;
case RESERVED_LOCAL:
processReservedLocal(direction);
break;
case RESERVED_REMOTE:
processReservedRemote(direction);
break;
case OPEN:
processOpen(direction);
break;
case HALF_CLOSED_REMOTE:
processHalfClosedRemote(direction);
break;
case HALF_CLOSED_LOCAL:
processHalfClosedLocal(direction);
break;
case CLOSED:
processClosed(direction);
break;
default :
break;
}
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc,"String_Node_Str" + state);
}
}

Fixed version (ground truth):
/** 
 * Transitions the stream state, give the previous state and current frame. Handles writes and error processing as needed.
 * @param Direction.WRITING_OUT or Direction.READING_IN
 * @throws Http2Exception
 */
private void readWriteTransitionState(Constants.Direction direction) throws Http2Exception {
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + currentFrame.getFrameType() + "String_Node_Str"+ state);
  }
  if (currentFrame.getFrameType() == FrameTypes.GOAWAY || currentFrame.getFrameType() == FrameTypes.RST_STREAM) {
    writeFrameSync();
    if (currentFrame.getFrameType() == FrameTypes.GOAWAY) {
      this.updateStreamState(StreamState.CLOSED);
      muxLink.closeConnectionLink(null);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
      Tr.debug(tc,"String_Node_Str" + state);
    }
    return;
  }
switch (state) {
case IDLE:
    processIdle(direction);
  break;
case RESERVED_LOCAL:
processReservedLocal(direction);
break;
case RESERVED_REMOTE:
processReservedRemote(direction);
break;
case OPEN:
processOpen(direction);
break;
case HALF_CLOSED_REMOTE:
processHalfClosedRemote(direction);
break;
case HALF_CLOSED_LOCAL:
processHalfClosedLocal(direction);
break;
case CLOSED:
processClosed(direction);
break;
default :
break;
}
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc,"String_Node_Str" + state);
}
}
Program: 34727
Project: 34727
Buggy source:
/** 
 * Check to see if the passed headers contain values for :method, :scheme, and :path If the CONNECT method header was found, :path and :scheme are not allowed, and :authority is required
 * @param HashMap<String, String> headers
 * @return true if :method, :scheme, and :path are found
 */
private boolean isValidH2Request(HashMap<String,String> pseudoHeaders){
  if (MethodValues.CONNECT.getName().equals(pseudoHeaders.get(HpackConstants.METHOD))) {
    if (pseudoHeaders.get(HpackConstants.PATH) == null && pseudoHeaders.get(HpackConstants.SCHEME) == null && pseudoHeaders.get(HpackConstants.AUTHORITY) != null) {
      this.isConnectStream=true;
      return true;
    }
    return false;
  }
  if (pseudoHeaders.get(HpackConstants.METHOD) != null && pseudoHeaders.get(HpackConstants.PATH) != null && pseudoHeaders.get(HpackConstants.SCHEME) != null) {
    if (pseudoHeaders.get(HpackConstants.METHOD).equals("String_Node_Str") && !pseudoHeaders.get(HpackConstants.PATH).equals("String_Node_Str")) {
      return false;
    }
    return true;
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Check to see if the passed headers contain values for :method, :scheme, and :path If the CONNECT method header was found, :path and :scheme are not allowed, and :authority is required
 * @param HashMap<String, String> headers
 * @return true if :method, :scheme, and :path are found
 */
private boolean isValidH2Request(HashMap<String,String> pseudoHeaders){
  if (MethodValues.CONNECT.getName().equals(pseudoHeaders.get(HpackConstants.METHOD))) {
    if (pseudoHeaders.get(HpackConstants.PATH) == null && pseudoHeaders.get(HpackConstants.SCHEME) == null && pseudoHeaders.get(HpackConstants.AUTHORITY) != null) {
      this.isConnectStream=true;
      return true;
    }
    return false;
  }
  if (pseudoHeaders.get(HpackConstants.METHOD) != null && pseudoHeaders.get(HpackConstants.PATH) != null && pseudoHeaders.get(HpackConstants.SCHEME) != null) {
    return true;
  }
  return false;
}
Program: 34729
Project: 34729
Buggy source:
/** 
 * @param direction
 */
private void processHalfClosedLocal(Constants.Direction direction) throws FlowControlException {
  if (direction == Direction.WRITING_OUT) {
    writeFrameSync();
    if (currentFrame.getFrameType() == FrameTypes.RST_STREAM) {
      endStream=true;
      updateStreamState(StreamState.CLOSED);
    }
  }
 else   if (currentFrame.getFrameType() == FrameTypes.RST_STREAM || currentFrame.flagEndStreamSet()) {
    endStream=true;
    updateStreamState(StreamState.CLOSED);
  }
}

Fixed version (ground truth):
/** 
 * @param direction
 */
private void processHalfClosedLocal(Constants.Direction direction) throws FlowControlException {
  if (direction == Direction.WRITING_OUT) {
    writeFrameSync();
    if (currentFrame.getFrameType() == FrameTypes.RST_STREAM) {
      endStream=true;
      updateStreamState(StreamState.HALF_CLOSED_LOCAL);
    }
  }
 else   if (currentFrame.getFrameType() == FrameTypes.RST_STREAM || currentFrame.flagEndStreamSet()) {
    endStream=true;
    updateStreamState(StreamState.CLOSED);
  }
}
Program: 34730
Project: 34730
Buggy source:
@Override protected void setPseudoHeaders(HashMap<String,String> pseudoHeaders) throws Exception {
  for (  Entry<String,String> entry : pseudoHeaders.entrySet()) {
    H2HeaderField header=new H2HeaderField(entry.getKey(),entry.getValue());
    if (!isValidPseudoHeader(header)) {
      throw new CompressionException("String_Node_Str" + header.toString());
    }
  }
  if (pseudoHeaders.containsKey(HpackConstants.AUTHORITY)) {
    this.sUrlHost=pseudoHeaders.get(HpackConstants.AUTHORITY);
    this.sHdrHost=pseudoHeaders.get(HpackConstants.AUTHORITY);
  }
  if (pseudoHeaders.containsKey(HpackConstants.METHOD)) {
    this.setMethod(pseudoHeaders.get(HpackConstants.METHOD));
  }
  if (pseudoHeaders.containsKey(HpackConstants.PATH)) {
    this.setRequestURI(pseudoHeaders.get(HpackConstants.PATH));
  }
  if (pseudoHeaders.containsKey(HpackConstants.SCHEME)) {
    this.setScheme(pseudoHeaders.get(HpackConstants.SCHEME));
  }
}

Fixed version (ground truth):
@Override protected void setPseudoHeaders(HashMap<String,String> pseudoHeaders) throws Exception {
  for (  Entry<String,String> entry : pseudoHeaders.entrySet()) {
    H2HeaderField header=new H2HeaderField(entry.getKey(),entry.getValue());
    if (!isValidPseudoHeader(header)) {
      throw new CompressionException("String_Node_Str" + header.toString());
    }
  }
  if (pseudoHeaders.containsKey(HpackConstants.METHOD)) {
    this.setMethod(pseudoHeaders.get(HpackConstants.METHOD));
  }
  if (pseudoHeaders.containsKey(HpackConstants.PATH)) {
    this.setRequestURI(pseudoHeaders.get(HpackConstants.PATH));
  }
  if (pseudoHeaders.containsKey(HpackConstants.SCHEME)) {
    this.setScheme(pseudoHeaders.get(HpackConstants.SCHEME));
  }
  if (pseudoHeaders.containsKey(HpackConstants.AUTHORITY)) {
    parseAuthority(pseudoHeaders.get(HpackConstants.AUTHORITY).getBytes(),0);
  }
}
Program: 34731
Project: 34731
Buggy source:
@Override public void add(Object event){
  if (event == null)   throw new NullPointerException();
  RERWLOCK.readLock().lock();
  try {
    if (!synchronousHandlerSet.isEmpty()) {
      for (      SynchronousHandler synchronousHandler : synchronousHandlerSet) {
        synchronousHandler.synchronousWrite(event);
      }
    }
    if (ringBuffer != null) {
      ringBuffer.add(event);
    }
    if (earlyMessageQueue != null) {
synchronized (earlyMessageQueue) {
        earlyMessageQueue.add(event);
      }
    }
  }
  finally {
    RERWLOCK.readLock().unlock();
  }
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + event);
  }
}

Fixed version (ground truth):
@Override public void add(Object event){
  if (event == null)   throw new NullPointerException();
  SynchronousHandler[] arrayCopy=null;
  RERWLOCK.readLock().lock();
  try {
    if (!synchronousHandlerSet.isEmpty()) {
      arrayCopy=synchronousHandlerSet.toArray(new SynchronousHandler[0]);
    }
    if (ringBuffer != null) {
      ringBuffer.add(event);
    }
    if (earlyMessageQueue != null) {
synchronized (earlyMessageQueue) {
        earlyMessageQueue.add(event);
      }
    }
  }
  finally {
    RERWLOCK.readLock().unlock();
    if (arrayCopy != null) {
      for (      SynchronousHandler synchronousHandler : arrayCopy) {
        synchronousHandler.synchronousWrite(event);
      }
    }
    arrayCopy=null;
  }
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + event);
  }
}
Program: 34733
Project: 34733
Buggy source:
private void addJava2SecurityPropertiesToBootstrapFile(RemoteFile f) throws Exception {
  java.io.OutputStream w=f.openForWriting(true);
  try {
    w.write("String_Node_Str".getBytes());
    w.write("String_Node_Str".getBytes());
    w.write("String_Node_Str".getBytes());
    w.write("String_Node_Str".getBytes());
    w.write("String_Node_Str".getBytes());
    Log.info(c,"String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    Log.info(c,"String_Node_Str","String_Node_Str",e.getMessage());
  }
  w.flush();
  w.close();
  isJava2SecurityEnabled=true;
}

Fixed version (ground truth):
private void addJava2SecurityPropertiesToBootstrapFile(RemoteFile f,boolean debug) throws Exception {
  java.io.OutputStream w=f.openForWriting(true);
  try {
    w.write("String_Node_Str".getBytes());
    w.write("String_Node_Str".getBytes());
    w.write("String_Node_Str".getBytes());
    w.write(("String_Node_Str" + debug).getBytes());
    w.write("String_Node_Str".getBytes());
    if (debug) {
      w.write("String_Node_Str".getBytes());
      w.write("String_Node_Str".getBytes());
    }
    Log.info(c,"String_Node_Str","String_Node_Str");
  }
 catch (  Exception e) {
    Log.info(c,"String_Node_Str","String_Node_Str",e.getMessage());
  }
  w.flush();
  w.close();
  isJava2SecurityEnabled=true;
}
Program: 34738
Project: 34738
Buggy source:
public boolean significantlyPastCloseTime(int streamID){
  if (streamTable.contains(streamID))   return false;
  if (closeTable.containsKey(streamID)) {
    H2StreamProcessor streamProcessor=closeTable.get(streamID);
    if (streamProcessor.getCloseTime() != Constants.INITIAL_CLOSE_TIME) {
      long diff=System.nanoTime() - streamProcessor.getCloseTime();
      if (diff > CLOSE_TABLE_PURGE_TIME) {
        if (tc.isDebugEnabled()) {
          Tr.debug(tc,"String_Node_Str" + streamID + "String_Node_Str"+ streamProcessor.getCloseTime()+ "String_Node_Str"+ System.nanoTime()+ "String_Node_Str"+ diff);
        }
        closeTable.remove(streamID);
        return true;
      }
 else {
        return false;
      }
    }
 else {
      return false;
    }
  }
  if (tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + streamID + "String_Node_Str");
  }
  return true;
}

Fixed version (ground truth):
public boolean significantlyPastCloseTime(int streamID){
  if (streamTable.containsKey(streamID))   return false;
  if (closeTable.containsKey(streamID)) {
    H2StreamProcessor streamProcessor=closeTable.get(streamID);
    if (streamProcessor.getCloseTime() != Constants.INITIAL_CLOSE_TIME) {
      long diff=System.nanoTime() - streamProcessor.getCloseTime();
      if (diff > CLOSE_TABLE_PURGE_TIME) {
        if (tc.isDebugEnabled()) {
          Tr.debug(tc,"String_Node_Str" + streamID + "String_Node_Str"+ streamProcessor.getCloseTime()+ "String_Node_Str"+ System.nanoTime()+ "String_Node_Str"+ diff);
        }
        closeTable.remove(streamID);
        return true;
      }
 else {
        return false;
      }
    }
 else {
      return false;
    }
  }
  if (tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + streamID + "String_Node_Str");
  }
  return true;
}
Program: 34739
Project: 34739
Buggy source:
/** 
 * Update the stream state and provide logging, if enabled
 * @param state
 */
private void updateStreamState(StreamState state){
  this.state=state;
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + this.myID + "String_Node_Str"+ this.state);
  }
}

Fixed version (ground truth):
/** 
 * Update the stream state and provide logging, if enabled
 * @param state
 */
private void updateStreamState(StreamState state){
  this.state=state;
  if (StreamState.CLOSED.equals(state)) {
    muxLink.triggerStreamClose(this);
  }
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + this.myID + "String_Node_Str"+ this.state);
  }
}
Program: 34743
Project: 34743
Buggy source:
/** 
 * @param direction
 * @throws CompressionException
 * @throws ProtocolException
 */
private void processHalfClosedRemote(Constants.Direction direction) throws FlowControlException, CompressionException, ProtocolException {
  if (direction == Direction.WRITING_OUT) {
    boolean writeCompleted=writeFrameSync();
    if ((currentFrame.getFrameType() == FrameTypes.RST_STREAM || currentFrame.flagEndStreamSet()) && writeCompleted) {
      endStream=true;
      muxLink.triggerStreamClose(this);
      updateStreamState(StreamState.CLOSED);
    }
 else     if (frameType == FrameTypes.HEADERS || frameType == FrameTypes.CONTINUATION) {
      if (currentFrame.flagEndHeadersSet()) {
        setContinuationFrameExpected(false);
      }
 else {
        setContinuationFrameExpected(true);
      }
    }
  }
 else   if (currentFrame.getFrameType() == FrameTypes.RST_STREAM) {
    endStream=true;
    updateStreamState(StreamState.CLOSED);
  }
 else   if (frameType == FrameTypes.CONTINUATION) {
    getHeadersFromFrame();
    if (currentFrame.flagEndHeadersSet()) {
      processCompleteHeaders(false);
      setHeadersComplete();
      setReadyForRead();
    }
  }
}

Fixed version (ground truth):
/** 
 * @param direction
 * @throws CompressionException
 * @throws ProtocolException
 */
private void processHalfClosedRemote(Constants.Direction direction) throws FlowControlException, CompressionException, ProtocolException {
  if (direction == Direction.WRITING_OUT) {
    boolean writeCompleted=writeFrameSync();
    if ((currentFrame.getFrameType() == FrameTypes.RST_STREAM || currentFrame.flagEndStreamSet()) && writeCompleted) {
      endStream=true;
      updateStreamState(StreamState.CLOSED);
    }
 else     if (frameType == FrameTypes.HEADERS || frameType == FrameTypes.CONTINUATION) {
      if (currentFrame.flagEndHeadersSet()) {
        setContinuationFrameExpected(false);
      }
 else {
        setContinuationFrameExpected(true);
      }
    }
  }
 else   if (currentFrame.getFrameType() == FrameTypes.RST_STREAM) {
    endStream=true;
    updateStreamState(StreamState.CLOSED);
  }
 else   if (frameType == FrameTypes.CONTINUATION) {
    getHeadersFromFrame();
    if (currentFrame.flagEndHeadersSet()) {
      processCompleteHeaders(false);
      setHeadersComplete();
      setReadyForRead();
    }
  }
}
Program: 34744
Project: 34744
Buggy source:
/** 
 * Process an incoming RstStream Frame: log the error and close this stream
 */
private void processRstFrame(){
  int error=((FrameRstStream)currentFrame).getErrorCode();
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + utils.getErrorFromCode(error));
  }
  muxLink.triggerStreamClose(this);
  this.updateStreamState(StreamState.CLOSED);
}

Fixed version (ground truth):
/** 
 * Process an incoming RstStream Frame: log the error and close this stream
 */
private void processRstFrame(){
  int error=((FrameRstStream)currentFrame).getErrorCode();
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + utils.getErrorFromCode(error));
  }
  this.updateStreamState(StreamState.CLOSED);
}
Program: 34746
Project: 34746
Buggy source:
@Override public void validate(H2ConnectionSettings settings) throws ProtocolException, FrameSizeException {
  if (streamId == 0) {
    throw new ProtocolException("String_Node_Str");
  }
 else   if (this.getPayloadLength() <= 0) {
    throw new ProtocolException("String_Node_Str");
  }
 else   if (this.getPayloadLength() > settings.maxFrameSize) {
    throw new FrameSizeException("String_Node_Str");
  }
 else   if (this.paddingLength >= this.payloadLength) {
    throw new ProtocolException("String_Node_Str");
  }
 else   if (this.streamId == this.streamDependency) {
    throw new ProtocolException("String_Node_Str");
  }
 else   if (this.paddingLength < 0) {
    throw new ProtocolException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void validate(H2ConnectionSettings settings) throws Http2Exception {
  if (streamId == 0) {
    throw new ProtocolException("String_Node_Str");
  }
 else   if (this.getPayloadLength() <= 0) {
    throw new CompressionException("String_Node_Str");
  }
 else   if (this.getPayloadLength() > settings.maxFrameSize) {
    throw new FrameSizeException("String_Node_Str");
  }
 else   if (this.paddingLength >= this.payloadLength) {
    throw new ProtocolException("String_Node_Str");
  }
 else   if (this.streamId == this.streamDependency) {
    throw new ProtocolException("String_Node_Str");
  }
 else   if (this.paddingLength < 0) {
    throw new ProtocolException("String_Node_Str");
  }
}
Program: 34747
Project: 34747
Buggy source:
@Override public void validate(H2ConnectionSettings settings) throws ProtocolException {
  if (streamId == 0) {
    throw new ProtocolException("String_Node_Str");
  }
  if (this.streamId == this.streamDependency) {
    throw new ProtocolException("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void validate(H2ConnectionSettings settings) throws ProtocolException {
  if (streamId == 0) {
    throw new ProtocolException("String_Node_Str");
  }
 else   if (this.streamId == this.streamDependency) {
    ProtocolException pe=new ProtocolException("String_Node_Str");
    pe.setConnectionError(false);
    throw pe;
  }
 else   if (this.payloadLength != 5) {
    ProtocolException pe=new ProtocolException("String_Node_Str");
    pe.setConnectionError(false);
    throw pe;
  }
}
Program: 34748
Project: 34748
Buggy source:
/** 
 * Check if the   {@code method} is expected to be handled by{@code OpentracingContainerFilter}.
 * @param method Wrapped method.
 * @return True if handled by the filter.
 */
private boolean isHandledByFilter(Method method){
  if (method.isAnnotationPresent(Path.class)) {
    return true;
  }
 else {
    for (    Annotation annotation : method.getAnnotations()) {
      if (HttpMethod.class.isAssignableFrom(annotation.annotationType())) {
        return true;
      }
    }
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Check if the   {@code method} is expected to be handled by{@code OpentracingContainerFilter}.
 * @param method Wrapped method.
 * @return True if handled by the filter.
 */
private boolean isHandledByFilter(Method method){
  for (  Annotation annotation : method.getAnnotations()) {
    if (HttpMethod.class.isAssignableFrom(annotation.annotationType())) {
      return true;
    }
  }
  if (method.isAnnotationPresent(Path.class)) {
    return true;
  }
  return false;
}
Program: 34752
Project: 34752
Buggy source:
/** 
 * "An Tags.ERROR tag SHOULD be added to a Span on failed operations. It means for any server error (5xx) codes. If there is an exception object available the implementation SHOULD also add logs event=error and error.object=<error object instance> to the active span." https://github.com/eclipse/microprofile-opentracing/blob/master/spec/src/main/asciidoc/microprofile-opentracing.asciidoc#server-span-tags
 * @param span The span to add the information to.
 * @param exception Optional exception details.
 */
public static void addSpanErrorInfo(Span span,Throwable exception){
  String methodName="String_Node_Str";
  span.setTag(Tags.ERROR.getKey(),true);
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,methodName + "String_Node_Str",Boolean.TRUE);
  }
  if (exception != null) {
    Map<String,Object> log=new HashMap<>();
    log.put("String_Node_Str","String_Node_Str");
    log.put("String_Node_Str",exception);
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
      Tr.debug(tc,methodName + "String_Node_Str",log);
    }
    span.log(log);
  }
}

Fixed version (ground truth):
/** 
 * "An Tags.ERROR tag SHOULD be added to a Span on failed operations. It means for any server error (5xx) codes. If there is an exception object available the implementation SHOULD also add logs event=error and error.object=<error object instance> to the active span." https://github.com/eclipse/microprofile-opentracing/blob/master/spec/src/main/asciidoc/microprofile-opentracing.asciidoc#server-span-tags
 * @param span The span to add the information to.
 * @param exception Optional exception details.
 */
public static void addSpanErrorInfo(BaseSpan<?> span,Throwable exception){
  String methodName="String_Node_Str";
  span.setTag(Tags.ERROR.getKey(),true);
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,methodName + "String_Node_Str",Boolean.TRUE);
  }
  if (exception != null) {
    Map<String,Object> log=new HashMap<>();
    log.put("String_Node_Str","String_Node_Str");
    log.put("String_Node_Str",exception);
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
      Tr.debug(tc,methodName + "String_Node_Str",log);
    }
    span.log(log);
  }
}
Program: 34756
Project: 34756
Buggy source:
public SchemaImpl(SchemaImpl schema){
  this._default=schema.getDefaultValue();
  this.name=schema.getName();
  this.title=schema.getTitle();
  this.multipleOf=schema.getMultipleOf();
  this.maximum=schema.getMaximum();
  this.exclusiveMaximum=schema.getExclusiveMaximum();
  this.minimum=schema.getMinimum();
  this.exclusiveMinimum=schema.getExclusiveMinimum();
  this.maxLength=schema.getMaxLength();
  this.minLength=schema.getMinLength();
  this.pattern=schema.getPattern();
  this.maxItems=schema.getMaxItems();
  this.minItems=schema.getMinItems();
  this.uniqueItems=schema.getUniqueItems();
  this.maxProperties=schema.getMaxProperties();
  this.minProperties=schema.getMinProperties();
  this.required=schema.getRequired();
  this.type=schema.getType();
  this.not=schema.getNot();
  this.properties=schema.getProperties();
  this.description=schema.getDescription();
  this.format=schema.getFormat();
  this.$ref=schema.getRef();
  this.nullable=schema.getNullable();
  this.readOnly=schema.getReadOnly();
  this.writeOnly=schema.getWriteOnly();
  this.example=schema.getExample();
  this.externalDocs=schema.getExternalDocs();
  this.deprecated=schema.getDeprecated();
  this.xml=schema.getXml();
  this.extensions=schema.getExtensions();
  this._enum=schema.getEnumeration();
  this.discriminator=schema.getDiscriminator();
  this.anyOf=schema.getAnyOf();
  this.allOf=schema.getAllOf();
  this.oneOf=schema.getOneOf();
  this.additionalProperties=schema.getAdditionalProperties();
  this.items=schema.getItems();
}

Fixed version (ground truth):
public SchemaImpl(SchemaImpl schema){
  if (schema == null) {
    return;
  }
  this._default=schema.getDefaultValue();
  this.name=schema.getName();
  this.title=schema.getTitle();
  this.multipleOf=schema.getMultipleOf();
  this.maximum=schema.getMaximum();
  this.exclusiveMaximum=schema.getExclusiveMaximum();
  this.minimum=schema.getMinimum();
  this.exclusiveMinimum=schema.getExclusiveMinimum();
  this.maxLength=schema.getMaxLength();
  this.minLength=schema.getMinLength();
  this.pattern=schema.getPattern();
  this.maxItems=schema.getMaxItems();
  this.minItems=schema.getMinItems();
  this.uniqueItems=schema.getUniqueItems();
  this.maxProperties=schema.getMaxProperties();
  this.minProperties=schema.getMinProperties();
  this.required=schema.getRequired();
  this.type=schema.getType();
  this.not=schema.getNot();
  this.properties=schema.getProperties();
  this.description=schema.getDescription();
  this.format=schema.getFormat();
  this.$ref=schema.getRef();
  this.nullable=schema.getNullable();
  this.readOnly=schema.getReadOnly();
  this.writeOnly=schema.getWriteOnly();
  this.example=schema.getExample();
  this.externalDocs=schema.getExternalDocs();
  this.deprecated=schema.getDeprecated();
  this.xml=schema.getXml();
  this.extensions=schema.getExtensions();
  this._enum=schema.getEnumeration();
  this.discriminator=schema.getDiscriminator();
  this.anyOf=schema.getAnyOf();
  this.allOf=schema.getAllOf();
  this.oneOf=schema.getOneOf();
  this.additionalProperties=schema.getAdditionalProperties();
  this.items=schema.getItems();
}
Program: 34761
Project: 34761
Buggy source:
@Override public AuthStatus validateRequest(MessageInfo messageInfo,Subject clientSubject,Subject serviceSubject) throws AuthException {
  AuthStatus status=AuthStatus.SEND_FAILURE;
  try {
    HttpAuthenticationMechanism authMech=getModulePropertiesUtils().getHttpAuthenticationMechanism();
    HttpMessageContext httpMessageContext=createHttpMessageContext(messageInfo,clientSubject);
    AuthenticationStatus authenticationStatus=authMech.validateRequest((HttpServletRequest)messageInfo.getRequestMessage(),(HttpServletResponse)messageInfo.getResponseMessage(),httpMessageContext);
    status=translateValidateRequestStatus(authenticationStatus);
    registerSession(httpMessageContext);
  }
 catch (  Exception e) {
    e.printStackTrace();
    AuthException authException=new AuthException();
    authException.initCause(e);
    throw authException;
  }
  return status;
}

Fixed version (ground truth):
@Override public AuthStatus validateRequest(MessageInfo messageInfo,Subject clientSubject,Subject serviceSubject) throws AuthException {
  AuthStatus status=AuthStatus.SEND_FAILURE;
  try {
    HttpAuthenticationMechanism authMech=getModulePropertiesUtils().getHttpAuthenticationMechanism();
    HttpMessageContext httpMessageContext=createHttpMessageContext(messageInfo,clientSubject);
    AuthenticationStatus authenticationStatus=authMech.validateRequest((HttpServletRequest)messageInfo.getRequestMessage(),(HttpServletResponse)messageInfo.getResponseMessage(),httpMessageContext);
    status=translateValidateRequestStatus(authenticationStatus);
    registerSession(httpMessageContext);
  }
 catch (  Exception e) {
    e.printStackTrace();
    AuthException authException=new AuthException(e.getMessage());
    authException.initCause(e);
    throw authException;
  }
  return status;
}
Program: 34762
Project: 34762
Buggy source:
public WebReply createReplyForAuthnFailure(AuthenticationResult authResult,String realm){
  WebReply reply=null;
switch (authResult.getStatus()) {
case FAILURE:
    return DENY_AUTHN_FAILED;
case SEND_401:
  return new ChallengeReply(realm);
case TAI_CHALLENGE:
return new TAIChallengeReply(authResult.getTAIChallengeCode());
case REDIRECT:
return new RedirectReply(authResult.getRedirectURL(),authResult.getCookies());
case UNKNOWN:
case CONTINUE:
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc,"String_Node_Str" + authResult.getStatus() + "String_Node_Str"+ authResult.getReason()+ "String_Node_Str");
}
return DENY_AUTHN_FAILED;
default :
break;
}
return reply;
}

Fixed version (ground truth):
public WebReply createReplyForAuthnFailure(AuthenticationResult authResult,String realm){
  WebReply reply=null;
switch (authResult.getStatus()) {
case FAILURE:
    String reason=authResult.getReason();
  if (reason != null && reason.contains("String_Node_Str"))   return new DenyReply(reason);
return DENY_AUTHN_FAILED;
case SEND_401:
return new ChallengeReply(realm);
case TAI_CHALLENGE:
return new TAIChallengeReply(authResult.getTAIChallengeCode());
case REDIRECT:
return new RedirectReply(authResult.getRedirectURL(),authResult.getCookies());
case UNKNOWN:
case CONTINUE:
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc,"String_Node_Str" + authResult.getStatus() + "String_Node_Str"+ authResult.getReason()+ "String_Node_Str");
}
return DENY_AUTHN_FAILED;
default :
break;
}
return reply;
}
Program: 34765
Project: 34765
Buggy source:
@Override public AuthStatus validateRequest(MessageInfo messageInfo,Subject clientSubject,Subject serviceSubject) throws AuthException {
  AuthStatus status=AuthStatus.SEND_FAILURE;
  try {
    HttpAuthenticationMechanism authMech=getModulePropertiesUtils().getHttpAuthenticationMechanism();
    HttpMessageContext httpMessageContext=createHttpMessageContext(messageInfo,clientSubject);
    AuthenticationStatus authenticationStatus=authMech.validateRequest((HttpServletRequest)messageInfo.getRequestMessage(),(HttpServletResponse)messageInfo.getResponseMessage(),httpMessageContext);
    status=translateValidateRequestStatus(authenticationStatus);
    registerSession(httpMessageContext);
  }
 catch (  Exception e) {
    e.printStackTrace();
    AuthException authException=new AuthException(e.getMessage());
    authException.initCause(e);
    throw authException;
  }
  return status;
}

Fixed version (ground truth):
@Override public AuthStatus validateRequest(MessageInfo messageInfo,Subject clientSubject,Subject serviceSubject) throws AuthException {
  AuthStatus status=AuthStatus.SEND_FAILURE;
  try {
    HttpAuthenticationMechanism authMech=getModulePropertiesUtils().getHttpAuthenticationMechanism();
    HttpMessageContext httpMessageContext=createHttpMessageContext(messageInfo,clientSubject);
    AuthenticationStatus authenticationStatus=authMech.validateRequest((HttpServletRequest)messageInfo.getRequestMessage(),(HttpServletResponse)messageInfo.getResponseMessage(),httpMessageContext);
    status=translateValidateRequestStatus(authenticationStatus);
    registerSession(httpMessageContext);
  }
 catch (  Exception e) {
    e.printStackTrace();
    AuthException authException=new AuthException();
    authException.initCause(e);
    throw authException;
  }
  return status;
}
Program: 34766
Project: 34766
Buggy source:
public WebReply createReplyForAuthnFailure(AuthenticationResult authResult,String realm){
  WebReply reply=null;
switch (authResult.getStatus()) {
case FAILURE:
    String reason=authResult.getReason();
  if (reason != null && reason.contains("String_Node_Str"))   return new DenyReply(reason);
return DENY_AUTHN_FAILED;
case SEND_401:
return new ChallengeReply(realm);
case TAI_CHALLENGE:
return new TAIChallengeReply(authResult.getTAIChallengeCode());
case REDIRECT:
return new RedirectReply(authResult.getRedirectURL(),authResult.getCookies());
case UNKNOWN:
case CONTINUE:
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc,"String_Node_Str" + authResult.getStatus() + "String_Node_Str"+ authResult.getReason()+ "String_Node_Str");
}
return DENY_AUTHN_FAILED;
default :
break;
}
return reply;
}

Fixed version (ground truth):
public WebReply createReplyForAuthnFailure(AuthenticationResult authResult,String realm){
  WebReply reply=null;
switch (authResult.getStatus()) {
case FAILURE:
    return DENY_AUTHN_FAILED;
case SEND_401:
  return new ChallengeReply(realm);
case TAI_CHALLENGE:
return new TAIChallengeReply(authResult.getTAIChallengeCode());
case REDIRECT:
return new RedirectReply(authResult.getRedirectURL(),authResult.getCookies());
case UNKNOWN:
case CONTINUE:
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc,"String_Node_Str" + authResult.getStatus() + "String_Node_Str"+ authResult.getReason()+ "String_Node_Str");
}
return DENY_AUTHN_FAILED;
default :
break;
}
return reply;
}
Program: 34768
Project: 34768
Buggy source:
private String FixUpUrl(String input,String contextRoot){
  String output=input;
  if (!input.startsWith("String_Node_Str")) {
    input="String_Node_Str" + input;
  }
  if (input.startsWith(contextRoot) && input.charAt(contextRoot.length()) == '/') {
    output=input.substring(contextRoot.length());
  }
  return output;
}

Fixed version (ground truth):
private String FixUpUrl(String input,String contextRoot){
  String output=input;
  if (input != null) {
    if (!input.startsWith("String_Node_Str")) {
      input="String_Node_Str" + input;
    }
    if (input.startsWith(contextRoot) && input.charAt(contextRoot.length()) == '/') {
      output=input.substring(contextRoot.length());
    }
  }
  return output;
}
Program: 34769
Project: 34769
Buggy source:
/** 
 * Returns LoginToContinue properties for container override form login
 */
private Properties getGlobalLoginFormProps() throws Exception {
  WebAppSecurityConfig webAppSecConfig=getWebAppSecurityConfig();
  String loginURL=webAppSecConfig.getLoginFormURL();
  String errorURL=webAppSecConfig.getLoginErrorURL();
  String contextRoot=webAppSecConfig.getLoginFormContextRoot();
  if (contextRoot == null) {
    contextRoot=getFirstPathElement(loginURL);
    if (tc.isDebugEnabled()) {
      Tr.debug(tc,"String_Node_Str" + contextRoot);
    }
  }
  loginURL=FixUpUrl(loginURL,contextRoot);
  errorURL=FixUpUrl(errorURL,contextRoot);
  if (tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + loginURL + "String_Node_Str"+ errorURL+ "String_Node_Str"+ contextRoot);
  }
  Properties props=new Properties();
  props.put(JavaEESecConstants.LOGIN_TO_CONTINUE_LOGINPAGE,loginURL);
  props.put(JavaEESecConstants.LOGIN_TO_CONTINUE_ERRORPAGE,errorURL);
  props.put(JavaEESecConstants.LOGIN_TO_CONTINUE_USEFORWARDTOLOGIN,true);
  props.put(JavaEESecConstants.LOGIN_TO_CONTINUE_USE_GLOBAL_LOGIN,true);
  props.put(JavaEESecConstants.LOGIN_TO_CONTINUE_LOGIN_FORM_CONTEXT_ROOT,contextRoot);
  return props;
}

Fixed version (ground truth):
/** 
 * Returns LoginToContinue properties for container override form login
 */
private Properties getGlobalLoginFormProps() throws Exception {
  WebAppSecurityConfig webAppSecConfig=getWebAppSecurityConfig();
  String loginURL=webAppSecConfig.getLoginFormURL();
  String errorURL=webAppSecConfig.getLoginErrorURL();
  String contextRoot=webAppSecConfig.getLoginFormContextRoot();
  if (contextRoot == null) {
    contextRoot=getFirstPathElement(loginURL);
    if (tc.isDebugEnabled()) {
      Tr.debug(tc,"String_Node_Str" + contextRoot);
    }
  }
  loginURL=FixUpUrl(loginURL,contextRoot);
  errorURL=FixUpUrl(errorURL,contextRoot);
  if (tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + loginURL + "String_Node_Str"+ errorURL+ "String_Node_Str"+ contextRoot);
  }
  Properties props=new Properties();
  if (loginURL != null) {
    props.put(JavaEESecConstants.LOGIN_TO_CONTINUE_LOGINPAGE,loginURL);
  }
  if (errorURL != null) {
    props.put(JavaEESecConstants.LOGIN_TO_CONTINUE_ERRORPAGE,errorURL);
  }
  props.put(JavaEESecConstants.LOGIN_TO_CONTINUE_USEFORWARDTOLOGIN,true);
  props.put(JavaEESecConstants.LOGIN_TO_CONTINUE_USE_GLOBAL_LOGIN,true);
  if (contextRoot != null) {
    props.put(JavaEESecConstants.LOGIN_TO_CONTINUE_LOGIN_FORM_CONTEXT_ROOT,contextRoot);
  }
  return props;
}
Program: 34770
Project: 34770
Buggy source:
public void writeFramesSync(CopyOnWriteArrayList<Frame> frames){
  if (frames == null) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
      Tr.debug(tc,"String_Node_Str");
    }
    return;
  }
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + frames.size());
  }
  Iterator<Frame> i=frames.iterator();
  while (i.hasNext()) {
    try {
      Frame currentFrame=i.next();
      H2StreamProcessor streamProcessor=muxLink.getStreamProcessor(streamID);
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
        Tr.debug(tc,"String_Node_Str" + currentFrame.getFrameType());
      }
      if (streamProcessor != null) {
        streamProcessor.processNextFrame(currentFrame,Direction.WRITING_OUT);
      }
 else {
        throw new StreamClosedException("String_Node_Str" + streamID + "String_Node_Str");
      }
    }
 catch (    Http2Exception e) {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
        Tr.debug(tc,"String_Node_Str" + e.getErrorString());
      }
      muxLink.close(vc,e);
    }
catch (    Exception e) {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
        Tr.debug(tc,"String_Node_Str" + e);
      }
    }
  }
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str");
  }
}

Fixed version (ground truth):
public void writeFramesSync(CopyOnWriteArrayList<Frame> frames){
  if (frames == null) {
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
      Tr.debug(tc,"String_Node_Str");
    }
    return;
  }
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + frames.size());
  }
  Iterator<Frame> i=frames.iterator();
  while (i.hasNext()) {
    try {
      Frame currentFrame=i.next();
      H2StreamProcessor streamProcessor=muxLink.getStreamProcessor(streamID);
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
        Tr.debug(tc,"String_Node_Str" + currentFrame.getFrameType());
      }
      if (streamProcessor != null) {
        streamProcessor.processNextFrame(currentFrame,Direction.WRITING_OUT);
      }
 else {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
          Tr.debug(tc,"String_Node_Str" + streamID + "String_Node_Str");
        }
      }
    }
 catch (    Http2Exception e) {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
        Tr.debug(tc,"String_Node_Str" + e.getErrorString());
      }
      muxLink.close(vc,e);
    }
catch (    Exception e) {
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
        Tr.debug(tc,"String_Node_Str" + e);
      }
    }
  }
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str");
  }
}
Program: 34771
Project: 34771
Buggy source:
@Override public void close(VirtualConnection inVC,Exception e){
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + this + "String_Node_Str"+ inVC);
  }
  this.muxLink.close(inVC,e);
}

Fixed version (ground truth):
@Override public void close(VirtualConnection inVC,Exception e){
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + this + "String_Node_Str"+ inVC);
  }
  if (streamID == 0 || streamID % 2 == 1) {
    this.muxLink.close(inVC,e);
  }
}
Program: 34773
Project: 34773
Buggy source:
private void readWriteTransitionState(Constants.Direction direction) throws Http2Exception {
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + currentFrame.getFrameType() + "String_Node_Str"+ state);
  }
  if (currentFrame.getFrameType() == FrameTypes.GOAWAY || currentFrame.getFrameType() == FrameTypes.RST_STREAM) {
    writeFrameSync();
    this.updateStreamState(StreamState.CLOSED);
    if (currentFrame.getFrameType() == FrameTypes.GOAWAY) {
      muxLink.closeConnectionLink(null);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
      Tr.debug(tc,"String_Node_Str" + state);
    }
    return;
  }
switch (state) {
case IDLE:
    processIdle(direction);
  break;
case RESERVED_LOCAL:
processReservedLocal(direction);
break;
case RESERVED_REMOTE:
processReservedRemote(direction);
break;
case OPEN:
processOpen(direction);
break;
case HALF_CLOSED_REMOTE:
processHalfClosedRemote(direction);
break;
case HALF_CLOSED_LOCAL:
processHalfClosedLocal(direction);
break;
case CLOSED:
processClosed(direction);
break;
default :
break;
}
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc,"String_Node_Str" + state);
}
}

Fixed version (ground truth):
/** 
 * Transitions the stream state, give the previous state and current frame. Handles writes and error processing as needed.
 * @param Direction.WRITING_OUT or Direction.READING_IN
 * @throws Http2Exception
 */
private void readWriteTransitionState(Constants.Direction direction) throws Http2Exception {
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + currentFrame.getFrameType() + "String_Node_Str"+ state);
  }
  if (currentFrame.getFrameType() == FrameTypes.GOAWAY || currentFrame.getFrameType() == FrameTypes.RST_STREAM) {
    writeFrameSync();
    this.updateStreamState(StreamState.CLOSED);
    if (currentFrame.getFrameType() == FrameTypes.GOAWAY) {
      muxLink.closeConnectionLink(null);
    }
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
      Tr.debug(tc,"String_Node_Str" + state);
    }
    return;
  }
switch (state) {
case IDLE:
    processIdle(direction);
  break;
case RESERVED_LOCAL:
processReservedLocal(direction);
break;
case RESERVED_REMOTE:
processReservedRemote(direction);
break;
case OPEN:
processOpen(direction);
break;
case HALF_CLOSED_REMOTE:
processHalfClosedRemote(direction);
break;
case HALF_CLOSED_LOCAL:
processHalfClosedLocal(direction);
break;
case CLOSED:
processClosed(direction);
break;
default :
break;
}
if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
Tr.debug(tc,"String_Node_Str" + state);
}
}
Program: 34777
Project: 34777
Buggy source:
@Override public PushBuilder path(String path){
  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
    Tr.entry(tc,"String_Node_Str","String_Node_Str" + path);
  }
  _path=path;
  if (path != null && path.contains("String_Node_Str")) {
    String[] pathParts=path.split("String_Node_Str");
    _pathURI=pathParts[0];
    _pathQueryString="String_Node_Str" + pathParts[1];
  }
 else {
    _pathURI=path;
    _pathQueryString=null;
  }
  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
    Tr.entry(tc,"String_Node_Str","String_Node_Str" + _pathURI + "String_Node_Str"+ _pathQueryString);
  }
  return this;
}

Fixed version (ground truth):
@Override public PushBuilder path(String path){
  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
    Tr.entry(tc,"String_Node_Str","String_Node_Str" + path);
  }
  if (path != null && !path.startsWith("String_Node_Str")) {
    String baseUri=_inboundRequest.getContextPath();
    if (baseUri != null) {
      path=baseUri + "String_Node_Str" + path;
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
        Tr.entry(tc,"String_Node_Str","String_Node_Str" + path);
      }
    }
  }
  _path=path;
  if (path != null && path.contains("String_Node_Str")) {
    String[] pathParts=path.split("String_Node_Str");
    _pathURI=pathParts[0];
    _pathQueryString="String_Node_Str" + pathParts[1];
  }
 else {
    _pathURI=path;
    _pathQueryString=null;
  }
  if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
    Tr.entry(tc,"String_Node_Str","String_Node_Str" + _pathURI + "String_Node_Str"+ _pathQueryString);
  }
  return this;
}
Program: 34778
Project: 34778
Buggy source:
@BeforeClass public static void setup() throws Exception {
  bootstrap=Bootstrap.getInstance();
  machine=LibertyServerUtils.createMachine(bootstrap);
  previousWorkDir=machine.getWorkDir();
  machine.setWorkDir(null);
  installPath=LibertyFileManager.getInstallPath(bootstrap);
  defaultServerPath=installPath + "String_Node_Str" + serverName;
}

Fixed version (ground truth):
@BeforeClass public static void setup() throws Exception {
  bootstrap=Bootstrap.getInstance();
  machine=LibertyServerUtils.createMachine(bootstrap);
  previousWorkDir=machine.getWorkDir();
  machine.setWorkDir(null);
  installPath=LibertyFileManager.getInstallPath(bootstrap);
  defaultServerPath=installPath + "String_Node_Str" + serverName;
  bootstrap.setValue("String_Node_Str",installPath);
}