Program: 93034
Project: 93034
Buggy source:
private void pullMessages(final Duration backoff){
  ListenableFuture<PullResponse> pullResult=stub.withDeadlineAfter(DEFAULT_TIMEOUT.getMillis(),TimeUnit.MILLISECONDS).pull(PullRequest.newBuilder().setSubscription(subscription).setMaxMessages(DEFAULT_MAX_MESSAGES).setReturnImmediately(true).build());
  Futures.addCallback(pullResult,new FutureCallback<PullResponse>(){
    @Override public void onSuccess(    PullResponse pullResponse){
      messageDispatcher.processReceivedMessages(pullResponse.getReceivedMessagesList());
      if (pullResponse.getReceivedMessagesCount() == 0) {
        executor.schedule(new Runnable(){
          @Override public void run(){
            Duration newBackoff=backoff.multipliedBy(2);
            if (newBackoff.isLongerThan(MAX_BACKOFF)) {
              newBackoff=MAX_BACKOFF;
            }
            pullMessages(newBackoff);
          }
        }
,backoff.getMillis(),TimeUnit.MILLISECONDS);
        return;
      }
      pullMessages(INITIAL_BACKOFF);
    }
    @Override public void onFailure(    Throwable cause){
      if (!isAlive()) {
        logger.log(Level.FINE,"String_Node_Str",cause);
        return;
      }
      if (StatusUtil.isRetryable(cause)) {
        logger.log(Level.SEVERE,"String_Node_Str",cause);
        executor.schedule(new Runnable(){
          @Override public void run(){
            Duration newBackoff=backoff.multipliedBy(2);
            if (newBackoff.isLongerThan(MAX_BACKOFF)) {
              newBackoff=MAX_BACKOFF;
            }
            pullMessages(newBackoff);
          }
        }
,backoff.getMillis(),TimeUnit.MILLISECONDS);
      }
 else {
        messageDispatcher.stop();
        notifyFailed(cause);
      }
    }
  }
);
}

Fixed version (ground truth):
private void pullMessages(final Duration backoff){
  ListenableFuture<PullResponse> pullResult=stub.withDeadlineAfter(DEFAULT_TIMEOUT.getMillis(),TimeUnit.MILLISECONDS).pull(PullRequest.newBuilder().setSubscription(subscription).setMaxMessages(maxDesiredPulledMessages).setReturnImmediately(true).build());
  Futures.addCallback(pullResult,new FutureCallback<PullResponse>(){
    @Override public void onSuccess(    PullResponse pullResponse){
      if (pullResponse.getReceivedMessagesCount() == 0) {
        executor.schedule(new Runnable(){
          @Override public void run(){
            Duration newBackoff=backoff.multipliedBy(2);
            if (newBackoff.isLongerThan(MAX_BACKOFF)) {
              newBackoff=MAX_BACKOFF;
            }
            pullMessages(newBackoff);
          }
        }
,backoff.getMillis(),TimeUnit.MILLISECONDS);
        return;
      }
      messageDispatcher.processReceivedMessages(pullResponse.getReceivedMessagesList(),new Runnable(){
        @Override public void run(){
          pullMessages(INITIAL_BACKOFF);
        }
      }
);
    }
    @Override public void onFailure(    Throwable cause){
      if (!isAlive()) {
        logger.log(Level.FINE,"String_Node_Str",cause);
        return;
      }
      if (StatusUtil.isRetryable(cause)) {
        logger.log(Level.SEVERE,"String_Node_Str",cause);
        executor.schedule(new Runnable(){
          @Override public void run(){
            Duration newBackoff=backoff.multipliedBy(2);
            if (newBackoff.isLongerThan(MAX_BACKOFF)) {
              newBackoff=MAX_BACKOFF;
            }
            pullMessages(newBackoff);
          }
        }
,backoff.getMillis(),TimeUnit.MILLISECONDS);
      }
 else {
        messageDispatcher.stop();
        notifyFailed(cause);
      }
    }
  }
,executor);
}