Program: 82387
Project: 82387
Buggy source:
private void runBackPressureViaQuery() throws InterruptedException {
  final Iface client=getClient();
  final BlurQuery blurQueryRow=new BlurQuery();
  Query queryRow=new Query();
  queryRow.setQuery("String_Node_Str");
  blurQueryRow.setQuery(queryRow);
  blurQueryRow.setUseCacheIfPresent(false);
  blurQueryRow.setCacheResult(false);
  blurQueryRow.setUuid("String_Node_Str");
  final AtomicReference<BlurException> error=new AtomicReference<BlurException>();
  final AtomicBoolean fail=new AtomicBoolean();
  System.gc();
  System.gc();
  MemoryMXBean memoryMXBean=ManagementFactory.getMemoryMXBean();
  MemoryUsage usage=memoryMXBean.getHeapMemoryUsage();
  long max=usage.getMax();
  System.out.println("String_Node_Str" + max + "String_Node_Str");
  long used=usage.getUsed();
  System.out.println("String_Node_Str" + used + "String_Node_Str");
  long limit=(long)(max * 0.80);
  System.out.println("String_Node_Str" + limit + "String_Node_Str");
  long difference=limit - used;
  int sizeToAllocate=(int)((int)difference * 0.50);
  System.out.println("String_Node_Str" + sizeToAllocate + "String_Node_Str"+ getHeapSize()+ "String_Node_Str"+ getMaxHeapSize()+ "String_Node_Str");
  byte[] bufferToFillHeap=new byte[sizeToAllocate];
  new Thread(new Runnable(){
    @Override public void run(){
      try {
        client.query("String_Node_Str",blurQueryRow);
        fail.set(true);
      }
 catch (      BlurException e) {
        error.set(e);
      }
catch (      TException e) {
        e.printStackTrace();
        fail.set(true);
      }
    }
  }
).start();
  Thread.sleep(500);
  List<byte[]> bufferToPutGcWatcherOverLimitList=new ArrayList<byte[]>();
  BlurException blurException=pollForError(error,120,TimeUnit.SECONDS,bufferToPutGcWatcherOverLimitList,fail,(int)(difference / 7));
  if (fail.get()) {
    fail("String_Node_Str");
  }
  System.out.println(bufferToFillHeap.hashCode());
  System.out.println(bufferToPutGcWatcherOverLimitList.hashCode());
  assertEquals(blurException.getErrorType(),ErrorType.BACK_PRESSURE);
  bufferToPutGcWatcherOverLimitList.clear();
  bufferToPutGcWatcherOverLimitList=null;
  bufferToFillHeap=null;
}

Fixed version (ground truth):
private void runBackPressureViaQuery() throws InterruptedException {
  final Iface client=getClient();
  final BlurQuery blurQueryRow=new BlurQuery();
  Query queryRow=new Query();
  queryRow.setQuery("String_Node_Str");
  blurQueryRow.setQuery(queryRow);
  blurQueryRow.setUseCacheIfPresent(false);
  blurQueryRow.setCacheResult(false);
  blurQueryRow.setUuid("String_Node_Str");
  final AtomicReference<BlurException> error=new AtomicReference<BlurException>();
  final AtomicBoolean fail=new AtomicBoolean();
  System.gc();
  System.gc();
  MemoryMXBean memoryMXBean=ManagementFactory.getMemoryMXBean();
  MemoryUsage usage=memoryMXBean.getHeapMemoryUsage();
  long max=usage.getMax();
  System.out.println("String_Node_Str" + max + "String_Node_Str");
  long used=usage.getUsed();
  System.out.println("String_Node_Str" + used + "String_Node_Str");
  long limit=(long)(max * 0.80);
  System.out.println("String_Node_Str" + limit + "String_Node_Str");
  long difference=limit - used;
  int sizeToAllocate=(int)((int)difference * 0.50);
  System.out.println("String_Node_Str" + sizeToAllocate + "String_Node_Str"+ getHeapSize()+ "String_Node_Str"+ getMaxHeapSize()+ "String_Node_Str");
  byte[] bufferToFillHeap=new byte[sizeToAllocate];
  new Thread(new Runnable(){
    @Override public void run(){
      try {
        client.query("String_Node_Str",blurQueryRow);
        fail.set(true);
      }
 catch (      BlurException e) {
        System.out.println("String_Node_Str");
        System.out.println("String_Node_Str");
        System.out.println("String_Node_Str");
        e.printStackTrace();
        System.out.println("String_Node_Str");
        System.out.println("String_Node_Str");
        System.out.println("String_Node_Str");
        error.set(e);
      }
catch (      TException e) {
        e.printStackTrace();
        fail.set(true);
      }
    }
  }
).start();
  Thread.sleep(500);
  List<byte[]> bufferToPutGcWatcherOverLimitList=new ArrayList<byte[]>();
  BlurException blurException=pollForError(error,120,TimeUnit.SECONDS,bufferToPutGcWatcherOverLimitList,fail,(int)(difference / 7));
  if (fail.get()) {
    fail("String_Node_Str");
  }
  System.out.println(bufferToFillHeap.hashCode());
  System.out.println(bufferToPutGcWatcherOverLimitList.hashCode());
  assertEquals(blurException.getErrorType(),ErrorType.BACK_PRESSURE);
  bufferToPutGcWatcherOverLimitList.clear();
  bufferToPutGcWatcherOverLimitList=null;
  bufferToFillHeap=null;
}