Program: 87793
Project: 87793
Buggy source:
private Buffer requestBufferInternal(final int minimumSizeOfBuffer,final boolean block) throws IOException, InterruptedException {
  if (minimumSizeOfBuffer > this.maximumBufferSize) {
    throw new IllegalArgumentException("String_Node_Str" + minimumSizeOfBuffer + "String_Node_Str"+ this.maximumBufferSize);
  }
  while (true) {
    boolean async=false;
synchronized (this.buffers) {
      while (this.requestedNumberOfBuffers > this.designatedNumberOfBuffers) {
        final ByteBuffer buffer=this.buffers.poll();
        if (buffer == null) {
          break;
        }
        this.globalBufferPool.releaseGlobalBuffer(buffer);
        this.requestedNumberOfBuffers--;
      }
      while (this.buffers.isEmpty()) {
        if (this.requestedNumberOfBuffers < this.designatedNumberOfBuffers) {
          final ByteBuffer buffer=this.globalBufferPool.lockGlobalBuffer();
          if (buffer != null) {
            this.buffers.add(buffer);
            this.requestedNumberOfBuffers++;
            continue;
          }
        }
        if (this.asynchronousEventOccurred && block) {
          this.asynchronousEventOccurred=false;
          async=true;
          break;
        }
        if (block) {
          this.buffers.wait();
        }
 else {
          return null;
        }
      }
      if (!async) {
        final ByteBuffer byteBuffer=this.buffers.poll();
        return BufferFactory.createFromMemory(minimumSizeOfBuffer,byteBuffer,this.buffers);
      }
    }
    if (this.eventListener != null) {
      this.eventListener.asynchronousEventOccurred();
    }
  }
}

Fixed version (ground truth):
private Buffer requestBufferInternal(final int minimumSizeOfBuffer,final boolean block) throws IOException, InterruptedException {
  if (minimumSizeOfBuffer > this.maximumBufferSize) {
    throw new IllegalArgumentException("String_Node_Str" + minimumSizeOfBuffer + "String_Node_Str"+ this.maximumBufferSize);
  }
  while (true) {
    boolean async=false;
synchronized (this.buffers) {
      while (this.requestedNumberOfBuffers > this.designatedNumberOfBuffers) {
        final ByteBuffer buffer=this.buffers.poll();
        if (buffer == null) {
          break;
        }
        this.globalBufferPool.releaseGlobalBuffer(buffer);
        this.requestedNumberOfBuffers--;
      }
      while (this.buffers.isEmpty()) {
        if (this.requestedNumberOfBuffers < this.designatedNumberOfBuffers) {
          final ByteBuffer buffer=this.globalBufferPool.lockGlobalBuffer();
          if (buffer != null) {
            this.buffers.add(buffer);
            this.requestedNumberOfBuffers++;
            continue;
          }
        }
        if (this.asynchronousEventOccurred && block) {
          this.asynchronousEventOccurred=false;
          async=true;
          break;
        }
        if (block) {
          this.buffers.wait();
        }
 else {
          return null;
        }
      }
      if (!async) {
        final ByteBuffer byteBuffer=this.buffers.poll();
        return BufferFactory.createFromMemory(minimumSizeOfBuffer,byteBuffer,this.bufferPoolConnector);
      }
    }
    if (this.eventListener != null) {
      this.eventListener.asynchronousEventOccurred();
    }
  }
}