Program: 30374
Project: 30374
Buggy source:
/** 
 * Find the resource with the given name, and return an input stream that can be used for reading it.  The search order is as described for <code>getResource()</code>, after checking to see if the resource data has been previously cached.  If the resource cannot be found, return <code>null</code>.
 * @param name Name of the resource to return an input stream for
 */
@Override public InputStream getResourceAsStream(String name){
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + name + "String_Node_Str");
  InputStream stream=null;
  stream=findLoadedResource(name);
  if (stream != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str");
    return (stream);
  }
  if (delegate || name.startsWith("String_Node_Str") || name.startsWith("String_Node_Str")|| (name.startsWith("String_Node_Str") && !name.startsWith("String_Node_Str"))|| name.startsWith("String_Node_Str")) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + parent);
    ClassLoader loader=parent;
    if (loader == null)     loader=system;
    stream=loader.getResourceAsStream(name);
    if (stream != null) {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str");
      return (stream);
    }
  }
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str");
  URL url=findResource(name);
  if (url != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str");
    stream=findLoadedResource(name);
    try {
      if (hasExternalRepositories && (stream == null))       stream=url.openStream();
    }
 catch (    IOException e) {
      ;
    }
    if (stream != null)     return (stream);
  }
  if (!delegate) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + parent);
    ClassLoader loader=parent;
    if (loader == null)     loader=system;
    stream=loader.getResourceAsStream(name);
    if (stream != null) {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str");
      return (stream);
    }
  }
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str");
  return (null);
}

Fixed version (ground truth):
/** 
 * Find the resource with the given name, and return an input stream that can be used for reading it.  The search order is as described for <code>getResource()</code>, after checking to see if the resource data has been previously cached.  If the resource cannot be found, return <code>null</code>.
 * @param name Name of the resource to return an input stream for
 */
@Override public InputStream getResourceAsStream(String name){
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str" + name + "String_Node_Str");
  InputStream stream=null;
  stream=findLoadedResource(name);
  if (stream != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str");
    return (stream);
  }
  if (isResourceDelegate(name)) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + parent);
    ClassLoader loader=parent;
    if (loader == null)     loader=system;
    stream=loader.getResourceAsStream(name);
    if (stream != null) {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str");
      return (stream);
    }
  }
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str");
  URL url=findResource(name);
  if (url != null) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str");
    stream=findLoadedResource(name);
    try {
      if (hasExternalRepositories && (stream == null))       stream=url.openStream();
    }
 catch (    IOException e) {
      ;
    }
    if (stream != null)     return (stream);
  }
  if (!delegate) {
    if (logger.isLoggable(Level.FINER))     logger.finer("String_Node_Str" + parent);
    ClassLoader loader=parent;
    if (loader == null)     loader=system;
    stream=loader.getResourceAsStream(name);
    if (stream != null) {
      if (logger.isLoggable(Level.FINER))       logger.finer("String_Node_Str");
      return (stream);
    }
  }
  if (logger.isLoggable(Level.FINER))   logger.finer("String_Node_Str");
  return (null);
}