Program: 60910
Project: 60910
Buggy source:
/** 
 * Prepare attributes for sending to a connector instance.
 * @param user given user
 * @param password clear-text password
 * @param resource target resource
 * @return account link + prepared attributes
 * @throws PropagationException if anything goes wrong
 */
private Map.Entry<String,Set<Attribute>> prepareAttributes(final SyncopeUser user,final String password,final ExternalResource resource) throws PropagationException {
  LOG.debug("String_Node_Str" + "String_Node_Str" + "String_Node_Str",new Object[]{user,resource,user.getAttributes()});
  Set<Attribute> attributes=new HashSet<Attribute>();
  String accountId=null;
  Map.Entry<String,Attribute> preparedAttribute;
  for (  SchemaMapping mapping : resource.getMappings()) {
    LOG.debug("String_Node_Str",mapping.getIntAttrName());
    try {
      preparedAttribute=prepareAttribute(mapping,user,password);
      if (preparedAttribute.getKey() != null) {
        accountId=preparedAttribute.getKey();
      }
      if (preparedAttribute.getValue() != null) {
        attributes.add(preparedAttribute.getValue());
      }
    }
 catch (    Throwable t) {
      LOG.debug("String_Node_Str",mapping.getIntAttrName(),t);
    }
  }
  if (!StringUtils.hasText(accountId)) {
    throw new PropagationException(resource.getName(),"String_Node_Str");
  }
  String evaluatedAccountLink=jexlUtil.evaluate(resource.getAccountLink(),user);
  if (evaluatedAccountLink.isEmpty()) {
    LOG.debug("String_Node_Str",accountId);
    attributes.add(new Name(accountId));
  }
 else {
    LOG.debug("String_Node_Str",evaluatedAccountLink);
    attributes.add(new Name(evaluatedAccountLink));
    LOG.debug("String_Node_Str");
  }
  return new DefaultMapEntry(accountId,attributes);
}

Fixed version (ground truth):
/** 
 * Prepare attributes for sending to a connector instance.
 * @param user given user
 * @param password clear-text password
 * @param enable wether user must be enabled or not
 * @param resource target resource
 * @return account link + prepared attributes
 * @throws PropagationException if anything goes wrong
 */
private Map.Entry<String,Set<Attribute>> prepareAttributes(final SyncopeUser user,final String password,final Boolean enable,final ExternalResource resource) throws PropagationException {
  LOG.debug("String_Node_Str" + "String_Node_Str" + "String_Node_Str",new Object[]{user,resource,user.getAttributes()});
  Set<Attribute> attributes=new HashSet<Attribute>();
  String accountId=null;
  Map.Entry<String,Attribute> preparedAttribute;
  for (  SchemaMapping mapping : resource.getMappings()) {
    LOG.debug("String_Node_Str",mapping.getIntAttrName());
    try {
      preparedAttribute=prepareAttribute(mapping,user,password);
      if (preparedAttribute.getKey() != null) {
        accountId=preparedAttribute.getKey();
      }
      if (preparedAttribute.getValue() != null) {
        attributes.add(preparedAttribute.getValue());
      }
    }
 catch (    Throwable t) {
      LOG.debug("String_Node_Str",mapping.getIntAttrName(),t);
    }
  }
  if (!StringUtils.hasText(accountId)) {
    throw new PropagationException(resource.getName(),"String_Node_Str");
  }
  String evaluatedAccountLink=jexlUtil.evaluate(resource.getAccountLink(),user);
  if (evaluatedAccountLink.isEmpty()) {
    LOG.debug("String_Node_Str",accountId);
    attributes.add(new Name(accountId));
  }
 else {
    LOG.debug("String_Node_Str",evaluatedAccountLink);
    attributes.add(new Name(evaluatedAccountLink));
    LOG.debug("String_Node_Str");
  }
  if (enable != null) {
    attributes.add(AttributeBuilder.buildEnabled(enable));
  }
  return new DefaultMapEntry(accountId,attributes);
}