Program: 32723
Project: 32723
Buggy source:
public CompletableFuture<Response> execute(final Request request){
  connect();
  final CompletableFuture<Response> rfuture=new CompletableFuture<>();
  try {
    final long id=mId.incrementAndGet();
    final VPackSlice body=request.getBody().isPresent() ? vpack.serialize(request.getBody().get()) : null;
    final Message message=new Message(id,vpack.serialize(request),body);
    send(message).whenComplete((m,ex) -> {
      if (m != null) {
        try {
          final Response response=vpack.deserialize(m.getHead(),Response.class);
          if (m.getBody().isPresent()) {
            response.setBody(m.getBody().get());
          }
          if (response.getResponseCode() >= 300) {
            if (response.getBody().isPresent()) {
              final ErrorEntity errorEntity=vpack.deserialize(response.getBody().get(),ErrorEntity.class);
              rfuture.completeExceptionally(new ArangoDBException(errorEntity));
            }
 else {
              rfuture.completeExceptionally(new ArangoDBException(String.format("String_Node_Str",response.getResponseCode())));
            }
          }
 else {
            rfuture.complete(response);
          }
        }
 catch (        final VPackParserException e) {
          LOGGER.error(e.getMessage(),e);
          rfuture.completeExceptionally(e);
        }
      }
 else       if (ex != null) {
        LOGGER.error(ex.getMessage(),ex);
        rfuture.completeExceptionally(ex);
      }
 else {
        rfuture.cancel(true);
      }
    }
);
  }
 catch (  final IOException|VPackException e) {
    LOGGER.error(e.getMessage(),e);
    rfuture.completeExceptionally(e);
  }
  return rfuture;
}

Fixed version (ground truth):
public CompletableFuture<Response> execute(final Request request){
  connect();
  final CompletableFuture<Response> rfuture=new CompletableFuture<>();
  try {
    final long id=mId.incrementAndGet();
    final VPackSlice body=request.getBody().isPresent() ? request.getBody().get() : null;
    final Message message=new Message(id,vpack.serialize(request),body);
    send(message).whenComplete((m,ex) -> {
      if (m != null) {
        try {
          final Response response=vpack.deserialize(m.getHead(),Response.class);
          if (m.getBody().isPresent()) {
            response.setBody(m.getBody().get());
          }
          if (response.getResponseCode() >= 300) {
            if (response.getBody().isPresent()) {
              final ErrorEntity errorEntity=vpack.deserialize(response.getBody().get(),ErrorEntity.class);
              rfuture.completeExceptionally(new ArangoDBException(errorEntity));
            }
 else {
              rfuture.completeExceptionally(new ArangoDBException(String.format("String_Node_Str",response.getResponseCode())));
            }
          }
 else {
            rfuture.complete(response);
          }
        }
 catch (        final VPackParserException e) {
          LOGGER.error(e.getMessage(),e);
          rfuture.completeExceptionally(e);
        }
      }
 else       if (ex != null) {
        LOGGER.error(ex.getMessage(),ex);
        rfuture.completeExceptionally(ex);
      }
 else {
        rfuture.cancel(true);
      }
    }
);
  }
 catch (  final IOException|VPackException e) {
    LOGGER.error(e.getMessage(),e);
    rfuture.completeExceptionally(e);
  }
  return rfuture;
}