Program: 60634
Project: 60634
Buggy source:
protected <T extends AbstractAttributable>List<Object> retrieveValues(final T attributable,final String attributeName,final IntMappingType intMappingType){
  LOG.debug("String_Node_Str",new Object[]{attributable,attributeName});
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  ConnInstanceLoader connInstanceLoader=context.getBean(ConnInstanceLoader.class);
  if (connInstanceLoader == null) {
    LOG.error("String_Node_Str");
    return null;
  }
  List<Object> virAttrValues=new ArrayList<Object>();
  for (  ExternalResource resource : attributable.getResources()) {
    LOG.debug("String_Node_Str",resource);
    Set<String> attributeNames=new HashSet<String>();
    String accountId=null;
    for (    SchemaMapping mapping : resource.getMappings()) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("String_Node_Str" + "String_Node_Str" + mapping.getId() + "String_Node_Str"+ mapping.getIntAttrName()+ "String_Node_Str"+ mapping.getExtAttrName()+ "String_Node_Str"+ mapping.getIntMappingType()+ "String_Node_Str"+ mapping.getMandatoryCondition()+ "String_Node_Str"+ mapping.isAccountid()+ "String_Node_Str"+ mapping.isPassword());
      }
      if (attributeName.equals(mapping.getIntAttrName()) && mapping.getIntMappingType() == intMappingType) {
        attributeNames.add(mapping.getExtAttrName());
      }
      if (mapping.isAccountid()) {
        try {
          accountId=attributable.getAttribute(mapping.getIntAttrName()).getValuesAsStrings().get(0);
        }
 catch (        NullPointerException e) {
          LOG.debug("String_Node_Str",e);
        }
      }
    }
    if (attributeNames != null && accountId != null) {
      LOG.debug("String_Node_Str",accountId);
      try {
        ConnectorFacadeProxy connector=connInstanceLoader.getConnector(resource);
        Set<Attribute> attributes=connector.getObjectAttributes(ObjectClass.ACCOUNT,new Uid(accountId),null,attributeNames);
        LOG.debug("String_Node_Str",attributes);
        for (        Attribute attribute : attributes) {
          virAttrValues.addAll(attribute.getValue());
        }
      }
 catch (      Exception e) {
        LOG.warn("String_Node_Str",resource.getName(),e);
      }
    }
  }
  return virAttrValues;
}

Fixed version (ground truth):
protected <T extends AbstractAttributable>List<Object> retrieveValues(final T attributable,final String attributeName,final IntMappingType intMappingType){
  LOG.debug("String_Node_Str",new Object[]{attributable,attributeName});
  List<Object> virAttrValues=new ArrayList<Object>();
  if (attributable == null) {
    return virAttrValues;
  }
  ConfigurableApplicationContext context=ApplicationContextManager.getApplicationContext();
  ConnInstanceLoader connInstanceLoader=context.getBean(ConnInstanceLoader.class);
  if (connInstanceLoader == null) {
    LOG.error("String_Node_Str");
    return null;
  }
  for (  ExternalResource resource : attributable.getResources()) {
    LOG.debug("String_Node_Str",resource);
    Set<String> attributeNames=new HashSet<String>();
    String accountId=null;
    for (    SchemaMapping mapping : resource.getMappings()) {
      if (LOG.isDebugEnabled()) {
        LOG.debug("String_Node_Str" + "String_Node_Str" + mapping.getId() + "String_Node_Str"+ mapping.getIntAttrName()+ "String_Node_Str"+ mapping.getExtAttrName()+ "String_Node_Str"+ mapping.getIntMappingType()+ "String_Node_Str"+ mapping.getMandatoryCondition()+ "String_Node_Str"+ mapping.isAccountid()+ "String_Node_Str"+ mapping.isPassword());
      }
      if (attributeName.equals(mapping.getIntAttrName()) && mapping.getIntMappingType() == intMappingType) {
        attributeNames.add(mapping.getExtAttrName());
      }
      if (mapping.isAccountid()) {
        try {
          accountId=attributable.getAttribute(mapping.getIntAttrName()).getValuesAsStrings().get(0);
        }
 catch (        NullPointerException e) {
          LOG.debug("String_Node_Str",e);
        }
      }
    }
    if (attributeNames != null && accountId != null) {
      LOG.debug("String_Node_Str",accountId);
      try {
        final OperationOptionsBuilder oob=new OperationOptionsBuilder();
        oob.setAttributesToGet(attributeNames);
        final ConnectorFacadeProxy connector=connInstanceLoader.getConnector(resource);
        Set<Attribute> attributes=connector.getObjectAttributes(ObjectClass.ACCOUNT,new Uid(accountId),oob.build(),attributeNames);
        LOG.debug("String_Node_Str",attributes);
        for (        Attribute attribute : attributes) {
          virAttrValues.addAll(attribute.getValue());
        }
      }
 catch (      Exception e) {
        LOG.warn("String_Node_Str",resource.getName(),e);
      }
    }
  }
  return virAttrValues;
}