Program: 74037
Project: 74037
Buggy source:
/** 
 * Create receivers and invoke the preinitialize() method of the local director. If this actor is not opaque, throw an exception.  This method also resets the protected variable _stopRequested to false, so if a derived class overrides this method, then it should also do that.  This method is read-synchronized on the workspace, so the preinitialize() method of the director need not be, assuming it is only called from here.
 * @exception IllegalActionException If there is no director, or ifthe director's preinitialize() method throws it, or if this actor is not opaque.
 */
public void initialize() throws IllegalActionException {
  super.initialize();
  try {
    _generatingCode=true;
    if (_modelChanged()) {
      generateCode();
    }
    String className=NamedProgramCodeGeneratorAdapter.generateName(this);
    Class<?> classInstance=null;
    URL url=null;
    url=_codeGenerator.codeDirectory.asFile().toURI().toURL();
    URL[] urls=new URL[]{url};
    ClassLoader classLoader=new URLClassLoader(urls);
    try {
      classInstance=classLoader.loadClass(className);
    }
 catch (    ClassNotFoundException ex) {
      generateCode();
      classInstance=classLoader.loadClass(className);
    }
    _objectWrapper=classInstance.newInstance();
    Method[] methods=classInstance.getMethods();
    Method intializeMethod=null;
    for (int i=0; i < methods.length; i++) {
      String name=methods[i].getName();
      if (name.equals("String_Node_Str")) {
        _fireMethod=methods[i];
      }
      if (name.equals("String_Node_Str")) {
        intializeMethod=methods[i];
      }
    }
    if (_fireMethod == null) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str");
    }
    if (intializeMethod == null) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str");
    }
    intializeMethod.invoke(_objectWrapper,(Object[])null);
    if (_debugging) {
      _debug("String_Node_Str");
    }
    recompileThisLevel.setToken(new BooleanToken(false));
    recompileHierarchy.setToken(new BooleanToken(false));
  }
 catch (  Throwable throwable) {
    _objectWrapper=null;
    _fireMethod=null;
  }
 finally {
    _generatingCode=false;
  }
}

Fixed version (ground truth):
/** 
 * Create receivers and invoke the preinitialize() method of the local director. If this actor is not opaque, throw an exception.  This method also resets the protected variable _stopRequested to false, so if a derived class overrides this method, then it should also do that.  This method is read-synchronized on the workspace, so the preinitialize() method of the director need not be, assuming it is only called from here.
 * @exception IllegalActionException If there is no director, or ifthe director's preinitialize() method throws it, or if this actor is not opaque.
 */
public void initialize() throws IllegalActionException {
  super.initialize();
  try {
    _generatingCode=true;
    _createCodeGenerator();
    if (_modelChanged()) {
      generateCode();
    }
    String className=NamedProgramCodeGeneratorAdapter.generateName(this);
    Class<?> classInstance=null;
    URL url=null;
    url=_codeGenerator.codeDirectory.asFile().toURI().toURL();
    URL[] urls=new URL[]{url};
    ClassLoader classLoader=new URLClassLoader(urls);
    try {
      classInstance=classLoader.loadClass(className);
    }
 catch (    ClassNotFoundException ex) {
      generateCode();
      classInstance=classLoader.loadClass(className);
    }
    _objectWrapper=classInstance.newInstance();
    Method[] methods=classInstance.getMethods();
    Method intializeMethod=null;
    for (int i=0; i < methods.length; i++) {
      String name=methods[i].getName();
      if (name.equals("String_Node_Str")) {
        _fireMethod=methods[i];
      }
      if (name.equals("String_Node_Str")) {
        intializeMethod=methods[i];
      }
    }
    if (_fireMethod == null) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str");
    }
    if (intializeMethod == null) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str");
    }
    intializeMethod.invoke(_objectWrapper,(Object[])null);
    if (_debugging) {
      _debug("String_Node_Str");
    }
    recompileThisLevel.setToken(new BooleanToken(false));
    recompileHierarchy.setToken(new BooleanToken(false));
  }
 catch (  Throwable throwable) {
    _objectWrapper=null;
    _fireMethod=null;
  }
 finally {
    _generatingCode=false;
  }
}