Program: 28594
Project: 28594
Buggy source:
/** 
 * Examine the MBean to see if it is a ResourceRef that should be manifested under this server, and if so, register a JSR 77 MBean for it.
 */
public ObjectName processResourceRef(final ResourceRef ref){
  if (ref == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!mServer.getName().equals(ref.getParent(Server.class).getName())) {
    cdebug("String_Node_Str" + getObjectName(mServer));
    return null;
  }
  Resource res=null;
  List<Resource> resources=getDomain().getResources().getResources();
  for (  Resource resource : resources) {
    String name=null;
    if (resource instanceof BindableResource) {
      name=((BindableResource)resource).getJndiName();
    }
    if (resource instanceof Named) {
      name=((Named)resource).getName();
    }
    if (resource instanceof ResourcePool) {
      name=((ResourcePool)resource).getName();
    }
    if (name != null && name.equals(ref.getRef()))     res=resource;
  }
  if (res == null) {
    throw new IllegalArgumentException("String_Node_Str" + ref);
  }
  final String configType=Util.getTypeProp(getObjectName(res));
  final Class<J2EEManagedObjectImplBase> implClass=CONFIG_RESOURCE_TYPES.get(configType);
  if (implClass == null) {
    mLogger.fine("String_Node_Str" + getObjectName(res));
    return null;
  }
  final Class<J2EEManagedObject> intf=(Class)ClassUtil.getFieldValue(implClass,"String_Node_Str");
  final String j2eeType=Util.deduceType(intf);
  ObjectName mbean77=null;
  try {
    final MetadataImpl meta=new MetadataImpl();
    meta.setCorrespondingRef(getObjectName(ref));
    meta.setCorrespondingConfig(getObjectName(res));
    mbean77=registerJ2EEChild(mJ2EEServer.objectName(),meta,intf,implClass,Util.getNameProp(getObjectName(res)));
synchronized (mConfigRefTo77) {
      mConfigRefTo77.put(getObjectName(ref),mbean77);
    }
  }
 catch (  final Exception e) {
    mLogger.log(Level.INFO,AMXEELoggerInfo.cantRegisterMbean,new Object[]{getObjectName(ref),e});
  }
  return mbean77;
}

Fixed version (ground truth):
/** 
 * Examine the MBean to see if it is a ResourceRef that should be manifested under this server, and if so, register a JSR 77 MBean for it.
 */
public ObjectName processResourceRef(final ResourceRef ref){
  if (ref == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  if (!mServer.getName().equals(ref.getParent(Server.class).getName())) {
    cdebug("String_Node_Str" + getObjectName(mServer));
    return null;
  }
  Resource res=null;
  List<Resource> resources=getDomain().getResources().getResources();
  for (  Resource resource : resources) {
    String name=null;
    if (resource instanceof BindableResource) {
      name=((BindableResource)resource).getJndiName();
    }
    if (resource instanceof Named) {
      name=((Named)resource).getName();
    }
    if (resource instanceof ResourcePool) {
      name=((ResourcePool)resource).getName();
    }
    if (name != null && name.equals(ref.getRef()))     res=resource;
  }
  if (res == null) {
    throw new IllegalArgumentException("String_Node_Str" + ref);
  }
  final String configType=Util.getTypeProp(getObjectName(res));
  final Class<J2EEManagedObjectImplBase> implClass=CONFIG_RESOURCE_TYPES.get(configType);
  if (implClass == null) {
    mLogger.fine("String_Node_Str" + getObjectName(res));
    return null;
  }
  final Class<J2EEManagedObject> intf=(Class)ClassUtil.getFieldValue(implClass,"String_Node_Str");
  ObjectName mbean77=null;
  try {
    final MetadataImpl meta=new MetadataImpl();
    meta.setCorrespondingRef(getObjectName(ref));
    meta.setCorrespondingConfig(getObjectName(res));
    mbean77=registerJ2EEChild(mJ2EEServer.objectName(),meta,intf,implClass,Util.getNameProp(getObjectName(res)));
synchronized (mConfigRefTo77) {
      mConfigRefTo77.put(getObjectName(ref),mbean77);
    }
  }
 catch (  final Exception e) {
    mLogger.log(Level.INFO,AMXEELoggerInfo.cantRegisterMbean,new Object[]{getObjectName(ref),e});
  }
  return mbean77;
}