Program: 76000
Project: 76000
Buggy source:
/** 
 * Create a new effigy in the given container by reading the specified URL. If the specified URL is null, then create a blank effigy. The blank effigy will have a new model associated with it. If this effigy factory contains an entity named "blank", then the new model will be a clone of that entity.  Otherwise, it will be an instance of TypedCompositeActor. If the URL does not end with extension ".xml" or ".moml", then return null.  If the URL points to an XML file that is not a MoML file, then also return null. The specified base is used to expand any relative file references within the URL.
 * @param container The container for the effigy.
 * @param base The base for relative file references, or null ifthere are no relative file references.
 * @param in The input URL.
 * @return A new instance of PtolemyEffigy, or null if the URLdoes not specify a Ptolemy II model.
 * @exception Exception If the URL cannot be read, or if the datais malformed in some way.
 */
public Effigy createEffigy(CompositeEntity container,URL base,URL in) throws Exception {
  if (in == null) {
    PtolemyEffigy effigy=new PtolemyEffigy(container,container.uniqueName("String_Node_Str"));
    NamedObj entity=getEntity("String_Node_Str");
    if (entity != null) {
      effigy.setModel((NamedObj)entity.clone(new Workspace()));
    }
 else {
      effigy.setModel(new TypedCompositeActor(new Workspace()));
    }
    return effigy;
  }
 else {
    String extension=getExtension(in);
    if (!extension.equals("String_Node_Str") && !extension.equals("String_Node_Str")) {
      return null;
    }
    NamedObj toplevel=_parser.parse(base,in.openStream());
    if (toplevel != null) {
      PtolemyEffigy effigy=new PtolemyEffigy(container,container.uniqueName("String_Node_Str"));
      effigy.setModel(toplevel);
      URLAttribute url=new URLAttribute(toplevel,toplevel.uniqueName("String_Node_Str"));
      url.setURL(in);
      effigy.url.setURL(in);
      return effigy;
    }
    return null;
  }
}

Fixed version (ground truth):
/** 
 * Create a new effigy in the given container by reading the specified URL. If the specified URL is null, then create a blank effigy. The blank effigy will have a new model associated with it. If this effigy factory contains an entity named "blank", then the new model will be a clone of that entity.  Otherwise, it will be an instance of TypedCompositeActor. If the URL does not end with extension ".xml" or ".moml", then return null.  If the URL points to an XML file that is not a MoML file, then also return null. The specified base is used to expand any relative file references within the URL.
 * @param container The container for the effigy.
 * @param base The base for relative file references, or null ifthere are no relative file references.
 * @param in The input URL.
 * @return A new instance of PtolemyEffigy, or null if the URLdoes not specify a Ptolemy II model.
 * @exception Exception If the URL cannot be read, or if the datais malformed in some way.
 */
public Effigy createEffigy(CompositeEntity container,URL base,URL in) throws Exception {
  if (in == null) {
    PtolemyEffigy effigy=new PtolemyEffigy(container,container.uniqueName("String_Node_Str"));
    NamedObj entity=getEntity("String_Node_Str");
    if (entity != null) {
      effigy.setModel((NamedObj)entity.clone(new Workspace()));
    }
 else {
      effigy.setModel(new TypedCompositeActor(new Workspace()));
    }
    return effigy;
  }
 else {
    String extension=getExtension(in);
    if (!extension.equals("String_Node_Str") && !extension.equals("String_Node_Str")) {
      return null;
    }
    _parser.reset();
    NamedObj toplevel=_parser.parse(base,in.openStream());
    if (toplevel != null) {
      PtolemyEffigy effigy=new PtolemyEffigy(container,container.uniqueName("String_Node_Str"));
      effigy.setModel(toplevel);
      URLAttribute url=new URLAttribute(toplevel,toplevel.uniqueName("String_Node_Str"));
      url.setURL(in);
      effigy.url.setURL(in);
      return effigy;
    }
    return null;
  }
}