Program: 61233
Project: 61233
Buggy source:
/** 
 * Implementation of the provisioning feature.
 * @param user
 * @param syncResourceNames
 * @param merge
 * @return provisioned resources
 * @throws PropagationException
 */
private Set<String> provision(SyncopeUser user,ResourceOperations resourceOperations,Set<String> syncResourceNames) throws PropagationException {
  Set<String> provisioned=new HashSet<String>();
  resourceOperations.purge();
  ResourceOperations syncOperations=new ResourceOperations();
  ResourceOperations asyncOperations=new ResourceOperations();
  if (syncResourceNames == null) {
    syncResourceNames=Collections.EMPTY_SET;
  }
  for (  Type type : ResourceOperations.Type.values()) {
    for (    TargetResource resource : resourceOperations.get(type)) {
      if (syncResourceNames.contains(resource.getName())) {
        syncOperations.add(type,resource);
      }
 else {
        asyncOperations.add(type,resource);
      }
    }
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + syncOperations + "String_Node_Str"+ user);
  }
  for (  Type type : ResourceOperations.Type.values()) {
    for (    TargetResource resource : syncOperations.get(type)) {
      try {
        propagate(user,resource,type);
        provisioned.add(resource.getName());
      }
 catch (      Throwable t) {
        log.error("String_Node_Str" + resource.getName(),t);
        throw new PropagationException("String_Node_Str" + resource.getName(),resource.getName(),t);
      }
    }
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + asyncOperations + "String_Node_Str"+ user);
  }
  for (  Type type : ResourceOperations.Type.values()) {
    for (    TargetResource resource : asyncOperations.get(type)) {
      try {
        propagate(user,resource,type);
        provisioned.add(resource.getName());
      }
 catch (      Throwable t) {
        log.error("String_Node_Str" + resource.getName(),t);
      }
    }
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + provisioned + "String_Node_Str"+ user.getId());
  }
  return provisioned;
}

Fixed version (ground truth):
/** 
 * Implementation of the provisioning feature.
 * @param user
 * @param syncResourceNames
 * @param merge
 * @return provisioned resources
 * @throws PropagationException
 */
private Set<String> provision(SyncopeUser user,ResourceOperations resourceOperations,Set<String> syncResourceNames) throws PropagationException {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + user + "String_Node_Str"+ resourceOperations);
  }
  Set<String> provisioned=new HashSet<String>();
  resourceOperations.purge();
  ResourceOperations syncOperations=new ResourceOperations();
  ResourceOperations asyncOperations=new ResourceOperations();
  if (syncResourceNames == null) {
    syncResourceNames=Collections.EMPTY_SET;
  }
  for (  Type type : ResourceOperations.Type.values()) {
    for (    TargetResource resource : resourceOperations.get(type)) {
      if (syncResourceNames.contains(resource.getName())) {
        syncOperations.add(type,resource);
      }
 else {
        asyncOperations.add(type,resource);
      }
    }
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + user + "String_Node_Str"+ syncOperations);
  }
  for (  Type type : ResourceOperations.Type.values()) {
    for (    TargetResource resource : syncOperations.get(type)) {
      try {
        propagate(user,resource,type);
        provisioned.add(resource.getName());
      }
 catch (      Throwable t) {
        log.error("String_Node_Str" + resource.getName(),t);
        throw new PropagationException("String_Node_Str" + resource.getName(),resource.getName(),t);
      }
    }
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + user + "String_Node_Str"+ asyncOperations);
  }
  for (  Type type : ResourceOperations.Type.values()) {
    for (    TargetResource resource : asyncOperations.get(type)) {
      try {
        propagate(user,resource,type);
        provisioned.add(resource.getName());
      }
 catch (      Throwable t) {
        log.error("String_Node_Str" + resource.getName(),t);
      }
    }
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + provisioned + "String_Node_Str"+ user.getId());
  }
  return provisioned;
}