Program: 3573
Project: 3573
Buggy source:
/** 
 * Returns an instance of a plugin that implements the interface intface and is bound to a name matching name.  If there is no matching plugin, it returns null.  The names are matched by String.equals().
 * @param intfc the interface class of the plugin
 * @param name under which the plugin implementation is configured.
 * @return instance of plugin implementation, or null if there is no match or an error.
 */
public static Object getNamedPlugin(Class intfc,String name) throws PluginInstantiationException {
  try {
    String iname=intfc.getName();
    configureNamedPlugin(iname);
    String key=iname + SEP + name;
    String cname=(String)namedPluginClasses.get(key);
    if (cname == null)     log.warn("String_Node_Str" + iname + "String_Node_Str"+ name+ "String_Node_Str");
 else {
      Class pluginClass=Class.forName(cname);
      if (cacheMe(pluginClass)) {
        String nkey=pluginClass.getName() + SEP + name;
        Object cached=namedInstanceCache.get(nkey);
        if (cached == null) {
          cached=pluginClass.newInstance();
          if (cached instanceof SelfNamedPlugin)           ((SelfNamedPlugin)cached).setPluginInstanceName(name);
          namedInstanceCache.put(nkey,cached);
        }
        return cached;
      }
 else {
        Object result=pluginClass.newInstance();
        if (result instanceof SelfNamedPlugin)         ((SelfNamedPlugin)result).setPluginInstanceName(name);
      }
    }
  }
 catch (  ClassNotFoundException e) {
    throw new PluginInstantiationException("String_Node_Str",e);
  }
catch (  InstantiationException e) {
    throw new PluginInstantiationException(e);
  }
catch (  IllegalAccessException e) {
    throw new PluginInstantiationException(e);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Returns an instance of a plugin that implements the interface intface and is bound to a name matching name.  If there is no matching plugin, it returns null.  The names are matched by String.equals().
 * @param intfc the interface class of the plugin
 * @param name under which the plugin implementation is configured.
 * @return instance of plugin implementation, or null if there is no match or an error.
 */
public static Object getNamedPlugin(Class intfc,String name) throws PluginInstantiationException {
  try {
    String iname=intfc.getName();
    configureNamedPlugin(iname);
    String key=iname + SEP + name;
    String cname=(String)namedPluginClasses.get(key);
    if (cname == null)     log.warn("String_Node_Str" + iname + "String_Node_Str"+ name+ "String_Node_Str");
 else {
      Class pluginClass=Class.forName(cname);
      if (cacheMe(pluginClass)) {
        String nkey=pluginClass.getName() + SEP + name;
        Object cached=namedInstanceCache.get(nkey);
        if (cached == null) {
          log.debug("String_Node_Str" + cname + "String_Node_Str"+ iname+ "String_Node_Str"+ name);
          cached=pluginClass.newInstance();
          if (cached instanceof SelfNamedPlugin)           ((SelfNamedPlugin)cached).setPluginInstanceName(name);
          namedInstanceCache.put(nkey,cached);
        }
        return cached;
      }
 else {
        log.debug("String_Node_Str" + cname + "String_Node_Str"+ iname+ "String_Node_Str"+ name);
        Object result=pluginClass.newInstance();
        if (result instanceof SelfNamedPlugin)         ((SelfNamedPlugin)result).setPluginInstanceName(name);
        return result;
      }
    }
  }
 catch (  ClassNotFoundException e) {
    throw new PluginInstantiationException("String_Node_Str" + e.toString(),e);
  }
catch (  InstantiationException e) {
    throw new PluginInstantiationException(e);
  }
catch (  IllegalAccessException e) {
    throw new PluginInstantiationException(e);
  }
  return null;
}