Program: 6765
Project: 6765
Buggy source:
/** 
 * Fetch the   {@link ResourceAssignment} from ZK and then perform resource assignment logic. This is done with besteffort to let the  {@link AssignmentStrategy} has access to existing assignment. If failed to get existing{@link ResourceAssignment} or if it's simply not exists, assignment will still be triggered as if there is noexisting assignment.
 * @param requirement The resource requirement that needs to be fulfilled.
 * @param handlers The set of handlers available.
 */
private void fetchAndPerformAssignment(final ResourceRequirement requirement,final Set<Discoverable> handlers){
  final String name=requirement.getName();
  String zkPath=CoordinationConstants.ASSIGNMENTS_PATH + "String_Node_Str" + name;
  Futures.addCallback(zkClient.getData(zkPath),new FutureCallback<NodeData>(){
    @Override public void onSuccess(    NodeData result){
      if (assignments.get(name) != null) {
        return;
      }
      byte[] data=result.getData();
      ResourceAssignment resourceAssignment=new ResourceAssignment(name);
      try {
        if (data != null) {
          resourceAssignment=CoordinationConstants.RESOURCE_ASSIGNMENT_CODEC.decode(data);
        }
      }
 catch (      Throwable t) {
        LOG.warn("String_Node_Str",t);
      }
      assignments.put(name,resourceAssignment);
      performAssignment(requirement,handlers);
    }
    @Override public void onFailure(    Throwable t){
      if (!(t instanceof KeeperException.NoNodeException)) {
        LOG.warn("String_Node_Str",t);
      }
      assignments.put(name,new ResourceAssignment(name));
      performAssignment(requirement,handlers);
    }
  }
,executor);
}

Fixed version (ground truth):
/** 
 * Fetch the   {@link ResourceAssignment} from ZK and then perform resource assignment logic. This is done with besteffort to let the  {@link AssignmentStrategy} has access to existing assignment. If failed to get existing{@link ResourceAssignment} or if it's simply not exists, assignment will still be triggered as if there is noexisting assignment.
 * @param requirement The resource requirement that needs to be fulfilled.
 * @param serviceDiscovered The set of handlers available.
 */
private void fetchAndPerformAssignment(final ResourceRequirement requirement,final ServiceDiscovered serviceDiscovered){
  final String name=requirement.getName();
  String zkPath=CoordinationConstants.ASSIGNMENTS_PATH + "String_Node_Str" + name;
  Futures.addCallback(zkClient.getData(zkPath),new FutureCallback<NodeData>(){
    @Override public void onSuccess(    NodeData result){
      if (assignments.get(name) != null) {
        return;
      }
      byte[] data=result.getData();
      ResourceAssignment resourceAssignment=new ResourceAssignment(name);
      try {
        if (data != null) {
          resourceAssignment=CoordinationConstants.RESOURCE_ASSIGNMENT_CODEC.decode(data);
        }
      }
 catch (      Throwable t) {
        LOG.warn("String_Node_Str",t);
      }
      assignments.put(name,resourceAssignment);
      performAssignment(requirement,serviceDiscovered);
    }
    @Override public void onFailure(    Throwable t){
      if (!(t instanceof KeeperException.NoNodeException)) {
        LOG.warn("String_Node_Str",t);
      }
      assignments.put(name,new ResourceAssignment(name));
      performAssignment(requirement,serviceDiscovered);
    }
  }
,executor);
}