Program: 61094
Project: 61094
Buggy source:
public <T extends AbstractAttributable>Set<String> getObjectAttributeValue(final T attributable,final String attributeName,final SourceMappingType sourceMappingType){
  List values=new ArrayList();
  Set<String> attributeNames;
  ConnInstance connectorInstance;
  ConnectorFacadeProxy connector;
  Set<Attribute> attributes;
  String accountLink;
  String accountId=null;
  LOG.debug("String_Node_Str",new Object[]{attributable,attributeName});
  for (  TargetResource resource : attributable.getInheritedTargetResources()) {
    LOG.debug("String_Node_Str",resource);
    attributeNames=new HashSet<String>();
    accountLink=resource.getAccountLink();
    for (    SchemaMapping mapping : resource.getMappings()) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("String_Node_Str" + "String_Node_Str" + mapping.getId() + "String_Node_Str"+ mapping.getSourceAttrName()+ "String_Node_Str"+ mapping.getDestAttrName()+ "String_Node_Str"+ mapping.getSourceMappingType()+ "String_Node_Str"+ mapping.getMandatoryCondition()+ "String_Node_Str"+ mapping.isAccountid()+ "String_Node_Str"+ mapping.isPassword());
      }
      if (mapping.getSourceAttrName().equals(attributeName) && mapping.getSourceMappingType() == sourceMappingType) {
        attributeNames.add(mapping.getDestAttrName());
      }
      if (mapping.isAccountid()) {
        try {
          accountId=attributable.getAttribute(mapping.getSourceAttrName()).getValuesAsStrings().get(0);
        }
 catch (        NullPointerException e) {
          LOG.debug("String_Node_Str",e);
        }
      }
    }
    if (accountId == null && accountLink != null) {
      accountId=jexlUtil.evaluateWithAttributes(resource.getAccountLink(),attributable.getAttributes());
    }
    if (attributeNames != null && accountId != null) {
      LOG.debug("String_Node_Str",accountId);
      connectorInstance=resource.getConnector();
      connector=connInstanceLoader.getConnector(connectorInstance.getId().toString());
      try {
        attributes=connector.getObjectAttributes(ObjectClass.ACCOUNT,new Uid(accountId),null,attributeNames);
        LOG.debug("String_Node_Str",attributes);
        for (        Attribute attribute : attributes) {
          values.addAll(attribute.getValue());
        }
      }
 catch (      Exception e) {
        LOG.warn("String_Node_Str",resource.getName(),e);
      }
    }
  }
  return new HashSet<String>(values);
}

Fixed version (ground truth):
public <T extends AbstractAttributable>Set<String> getObjectAttributeValue(final T attributable,final String attributeName,final SourceMappingType sourceMappingType){
  List values=new ArrayList();
  Set<String> attributeNames;
  ConnInstance connectorInstance;
  ConnectorFacadeProxy connector;
  Set<Attribute> attributes;
  String accountLink;
  String accountId=null;
  LOG.debug("String_Node_Str",new Object[]{attributable,attributeName});
  for (  TargetResource resource : attributable.getInheritedTargetResources()) {
    LOG.debug("String_Node_Str",resource);
    attributeNames=new HashSet<String>();
    accountLink=resource.getAccountLink();
    for (    SchemaMapping mapping : resource.getMappings()) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("String_Node_Str" + "String_Node_Str" + mapping.getId() + "String_Node_Str"+ mapping.getSourceAttrName()+ "String_Node_Str"+ mapping.getDestAttrName()+ "String_Node_Str"+ mapping.getSourceMappingType()+ "String_Node_Str"+ mapping.getMandatoryCondition()+ "String_Node_Str"+ mapping.isAccountid()+ "String_Node_Str"+ mapping.isPassword());
      }
      if (mapping.getSourceAttrName().equals(attributeName) && mapping.getSourceMappingType() == sourceMappingType) {
        attributeNames.add(mapping.getDestAttrName());
      }
      if (mapping.isAccountid()) {
        try {
          accountId=attributable.getAttribute(mapping.getSourceAttrName()).getValuesAsStrings().get(0);
        }
 catch (        NullPointerException e) {
          LOG.debug("String_Node_Str",e);
        }
      }
    }
    if (accountId == null && accountLink != null) {
      accountId=evaluateAccountLink(attributable,accountLink);
    }
    if (attributeNames != null && accountId != null) {
      LOG.debug("String_Node_Str",accountId);
      connectorInstance=resource.getConnector();
      connector=connInstanceLoader.getConnector(connectorInstance.getId().toString());
      try {
        attributes=connector.getObjectAttributes(ObjectClass.ACCOUNT,new Uid(accountId),null,attributeNames);
        LOG.debug("String_Node_Str",attributes);
        for (        Attribute attribute : attributes) {
          values.addAll(attribute.getValue());
        }
      }
 catch (      Exception e) {
        LOG.warn("String_Node_Str",resource.getName(),e);
      }
    }
  }
  return new HashSet<String>(values);
}