Program: 154023
Project: 154023
Buggy source:
/** 
 * Creates an image from a String containing a file name.
 */
public RenderedImage create(ParameterBlock args,RenderingHints hints){
  ImagingListener listener=ImageUtil.getImagingListener(hints);
  try {
    String fileName=(String)args.getObjectParameter(0);
    SeekableStream src=new FileSeekableStream(fileName);
    ImageDecodeParam param=null;
    if (args.getNumParameters() > 1) {
      param=(ImageDecodeParam)args.getObjectParameter(1);
    }
    ParameterBlock newArgs=new ParameterBlock();
    newArgs.add(src);
    newArgs.add(param);
    RenderingHints.Key key=JAI.KEY_OPERATION_BOUND;
    int bound=OpImage.OP_IO_BOUND;
    if (hints == null) {
      hints=new RenderingHints(key,new Integer(bound));
    }
 else     if (!hints.containsKey(key)) {
      hints=(RenderingHints)hints.clone();
      hints.put(key,new Integer(bound));
    }
    OperationRegistry registry=(OperationRegistry)hints.get(JAI.KEY_OPERATION_REGISTRY);
    RenderedImage image=RIFRegistry.create(registry,"String_Node_Str",newArgs,hints);
    return image == null ? null : new StreamImage(image,src);
  }
 catch (  FileNotFoundException e) {
    String message=JaiI18N.getString("String_Node_Str") + args.getObjectParameter(0);
    listener.errorOccurred(message,e,this,false);
    return null;
  }
catch (  Exception e) {
    String message=JaiI18N.getString("String_Node_Str");
    listener.errorOccurred(message,e,this,false);
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Creates an image from a String containing a file name.
 */
public RenderedImage create(ParameterBlock args,RenderingHints hints){
  ImagingListener listener=ImageUtil.getImagingListener(hints);
  try {
    String fileName=(String)args.getObjectParameter(0);
    SeekableStream src=null;
    try {
      src=new FileSeekableStream(fileName);
    }
 catch (    FileNotFoundException fnfe) {
      InputStream is=this.getClass().getClassLoader().getResourceAsStream(fileName);
      if (is != null)       src=SeekableStream.wrapInputStream(is,true);
    }
    ImageDecodeParam param=null;
    if (args.getNumParameters() > 1) {
      param=(ImageDecodeParam)args.getObjectParameter(1);
    }
    ParameterBlock newArgs=new ParameterBlock();
    newArgs.add(src);
    newArgs.add(param);
    RenderingHints.Key key=JAI.KEY_OPERATION_BOUND;
    int bound=OpImage.OP_IO_BOUND;
    if (hints == null) {
      hints=new RenderingHints(key,new Integer(bound));
    }
 else     if (!hints.containsKey(key)) {
      hints=(RenderingHints)hints.clone();
      hints.put(key,new Integer(bound));
    }
    OperationRegistry registry=(OperationRegistry)hints.get(JAI.KEY_OPERATION_REGISTRY);
    RenderedImage image=RIFRegistry.create(registry,"String_Node_Str",newArgs,hints);
    return image == null ? null : new StreamImage(image,src);
  }
 catch (  FileNotFoundException e) {
    String message=JaiI18N.getString("String_Node_Str") + args.getObjectParameter(0);
    listener.errorOccurred(message,e,this,false);
    return null;
  }
catch (  Exception e) {
    String message=JaiI18N.getString("String_Node_Str");
    listener.errorOccurred(message,e,this,false);
    return null;
  }
}