Program: 47636
Project: 47636
Buggy source:
@Override protected <T>JobCompletableFuture<T> invoke(final Collator collator){
  try {
    final String jobId=UuidUtil.buildRandomUuidString();
    ClientContext context=getContext();
    ClientMapReduceRequest request=new ClientMapReduceRequest(name,jobId,keys,predicate,mapper,combinerFactory,reducerFactory,keyValueSource,chunkSize,topologyChangedStrategy);
    final ClientCompletableFuture completableFuture=new ClientCompletableFuture(jobId);
    final ClientInvocation clientInvocation=new ClientInvocation(getClient(),request);
    final ClientInvocationFuture future=clientInvocation.invoke();
    future.andThen(new ExecutionCallback(){
      @Override public void onResponse(      Object res){
        Object response=res;
        try {
          if (collator != null) {
            response=collator.collate(((Map)response).entrySet());
          }
        }
  finally {
          completableFuture.setResult(response);
          trackableJobs.remove(jobId);
        }
      }
      @Override public void onFailure(      Throwable throwable){
        Throwable t=throwable;
        try {
          if (t instanceof ExecutionException && t.getCause() instanceof CancellationException) {
            t=t.getCause();
          }
          completableFuture.setResult(t);
        }
  finally {
          trackableJobs.remove(jobId);
        }
      }
    }
);
    Address runningMember=clientInvocation.getConnection().getRemoteEndpoint();
    trackableJobs.putIfAbsent(jobId,new ClientTrackableJob<T>(jobId,runningMember,completableFuture));
    return completableFuture;
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override protected <T>JobCompletableFuture<T> invoke(final Collator collator){
  try {
    final String jobId=UuidUtil.buildRandomUuidString();
    ClientMapReduceRequest request=new ClientMapReduceRequest(name,jobId,keys,predicate,mapper,combinerFactory,reducerFactory,keyValueSource,chunkSize,topologyChangedStrategy);
    final ClientCompletableFuture completableFuture=new ClientCompletableFuture(jobId);
    final ClientInvocation clientInvocation=new ClientInvocation(getClient(),request);
    final ClientInvocationFuture future=clientInvocation.invoke();
    future.andThen(new ExecutionCallback(){
      @Override public void onResponse(      Object res){
        Object response=res;
        try {
          if (collator != null) {
            response=collator.collate(((Map)response).entrySet());
          }
        }
  finally {
          completableFuture.setResult(response);
          trackableJobs.remove(jobId);
        }
      }
      @Override public void onFailure(      Throwable throwable){
        Throwable t=throwable;
        try {
          if (t instanceof ExecutionException && t.getCause() instanceof CancellationException) {
            t=t.getCause();
          }
          completableFuture.setResult(t);
        }
  finally {
          trackableJobs.remove(jobId);
        }
      }
    }
);
    Address runningMember=clientInvocation.getConnection().getRemoteEndpoint();
    trackableJobs.putIfAbsent(jobId,new ClientTrackableJob<T>(jobId,runningMember,completableFuture));
    return completableFuture;
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}