Program: 34859
Project: 34859
Buggy source:
/** 
 * Puts stream's header block into the read buffer that will be passed to the webcontainer
 * @throws CompressionException
 */
private void processCompleteHeaders() throws CompressionException {
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + myID);
  }
  if (this.headerBlock != null) {
    WsByteBufferPoolManager bufManager=HttpDispatcher.getBufferManager();
    WsByteBuffer buf=bufManager.allocate(this.headerBlock.length);
    buf.put(this.headerBlock);
    buf.flip();
    moveDataIntoReadBufferArray(buf);
    headerBlock=null;
    boolean isFirstLineComplete=false;
    HashMap<String,String> pseudoHeaders=new HashMap<String,String>();
    ArrayList<H2HeaderField> headers=new ArrayList<H2HeaderField>();
    H2HeaderField current=null;
    while (buf.hasRemaining()) {
      current=(H2Headers.decodeHeader(buf,this.muxLink.getReadTable()));
      if (!isFirstLineComplete) {
        if (current.getName().startsWith("String_Node_Str")) {
          if (pseudoHeaders.get(current.getName()) != null) {
            this.muxLink.getReadTable().setDynamicTableValidity(false);
            throw new CompressionException("String_Node_Str" + current.toString());
          }
          pseudoHeaders.put(current.getName(),current.getValue());
        }
 else {
          isFirstLineComplete=true;
          headers.add(current);
        }
      }
 else {
        if (current.getName().startsWith("String_Node_Str")) {
          this.muxLink.getReadTable().setDynamicTableValidity(false);
          throw new CompressionException("String_Node_Str" + "String_Node_Str");
        }
        headers.add(current);
      }
    }
    this.h2HttpInboundLinkWrap.setReadPseudoHeaders(pseudoHeaders);
    this.h2HttpInboundLinkWrap.setReadHeaders(headers);
    buf.flip();
  }
}

Fixed version (ground truth):
/** 
 * Puts stream's header block into the read buffer that will be passed to the webcontainer
 * @throws CompressionException
 */
private void processCompleteHeaders() throws CompressionException {
  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
    Tr.debug(tc,"String_Node_Str" + myID);
  }
  if (this.headerBlock != null) {
    WsByteBufferPoolManager bufManager=HttpDispatcher.getBufferManager();
    WsByteBuffer buf=bufManager.allocate(this.headerBlock.length);
    buf.put(this.headerBlock);
    buf.flip();
    moveDataIntoReadBufferArray(buf);
    this.h2HttpInboundLinkWrap.setHeadersLength(buf.limit());
    headerBlock=null;
    boolean isFirstLineComplete=false;
    HashMap<String,String> pseudoHeaders=new HashMap<String,String>();
    ArrayList<H2HeaderField> headers=new ArrayList<H2HeaderField>();
    H2HeaderField current=null;
    int headersLength=buf.position();
    while (buf.hasRemaining()) {
      headersLength++;
      current=(H2Headers.decodeHeader(buf,this.muxLink.getReadTable()));
      if (!isFirstLineComplete) {
        if (current.getName().startsWith("String_Node_Str")) {
          if (pseudoHeaders.get(current.getName()) != null) {
            this.muxLink.getReadTable().setDynamicTableValidity(false);
            throw new CompressionException("String_Node_Str" + current.toString());
          }
          pseudoHeaders.put(current.getName(),current.getValue());
        }
 else {
          isFirstLineComplete=true;
          headers.add(current);
        }
      }
 else {
        if (current.getName().startsWith("String_Node_Str")) {
          this.muxLink.getReadTable().setDynamicTableValidity(false);
          throw new CompressionException("String_Node_Str" + "String_Node_Str");
        }
        headers.add(current);
      }
    }
    this.h2HttpInboundLinkWrap.setReadPseudoHeaders(pseudoHeaders);
    this.h2HttpInboundLinkWrap.setReadHeaders(headers);
    buf.flip();
  }
 else {
    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
      Tr.debug(tc,"String_Node_Str" + myID);
    }
  }
}