Program: 72920
Project: 72920
Buggy source:
/** 
 * Generate the initialize function code for the associated FSM director.
 * @return The generated initialize code.
 * @exception IllegalActionException If the adapter associated withan actor throws it while generating initialize code for the actor.
 */
public String generateInitializeFunctionCode() throws IllegalActionException {
  StringBuffer code=new StringBuffer();
  CompositeActor container=((CompositeActor)_director.getContainer());
  List actorList=container.deepEntityList();
  String sanitizedContainerName=CodeGeneratorAdapter.generateName(container);
  ProgramCodeGenerator codeGenerator=getCodeGenerator();
  code.append(_eol + _eol + codeGenerator.comment("String_Node_Str"));
  if (_director.isEmbedded()) {
    if (container instanceof CompositeActor) {
      ptolemy.actor.Director executiveDirector=container.getExecutiveDirector();
      if (executiveDirector instanceof SuperdenseTimeDirector) {
        code.append(_eol + _sanitizedDirectorName + "String_Node_Str"+ ((SuperdenseTimeDirector)executiveDirector).getIndex()+ "String_Node_Str");
      }
    }
  }
  Iterator<?> actors=actorList.iterator();
  while (actors.hasNext()) {
    NamedObj actor=(NamedObj)actors.next();
    String sanitizedActorName=CodeGeneratorAdapter.generateName(actor);
    if (!actor.getFullName().contains("String_Node_Str"))     code.append(_eol + sanitizedActorName + "String_Node_Str");
  }
  code.append(_eol + _sanitizedDirectorName + "String_Node_Str"+ sanitizedContainerName+ "String_Node_Str");
  code.append(_eol + _sanitizedDirectorName + "String_Node_Str"+ _sanitizedDirectorName+ "String_Node_Str");
  code.append(_eol + _sanitizedDirectorName + "String_Node_Str");
  code.append(_eol + _sanitizedDirectorName + "String_Node_Str");
  code.append(_eol + codeGenerator.comment("String_Node_Str"));
  return code.toString();
}

Fixed version (ground truth):
/** 
 * Generate the initialize function code for the associated FSM director.
 * @return The generated initialize code.
 * @exception IllegalActionException If the adapter associated withan actor throws it while generating initialize code for the actor.
 */
public String generateInitializeFunctionCode() throws IllegalActionException {
  StringBuffer code=new StringBuffer();
  CompositeActor container=((CompositeActor)_director.getContainer());
  List actorList=container.deepEntityList();
  String sanitizedContainerName=CodeGeneratorAdapter.generateName(container);
  ProgramCodeGenerator codeGenerator=getCodeGenerator();
  code.append(_eol + _eol + codeGenerator.comment("String_Node_Str"));
  if (_director.isEmbedded()) {
    ptolemy.actor.Director executiveDirector=container.getExecutiveDirector();
    if (executiveDirector instanceof SuperdenseTimeDirector) {
      code.append(_eol + _sanitizedDirectorName + "String_Node_Str"+ ((SuperdenseTimeDirector)executiveDirector).getIndex()+ "String_Node_Str");
    }
  }
  Iterator<?> actors=actorList.iterator();
  while (actors.hasNext()) {
    NamedObj actor=(NamedObj)actors.next();
    String sanitizedActorName=CodeGeneratorAdapter.generateName(actor);
    if (!actor.getFullName().contains("String_Node_Str"))     code.append(_eol + sanitizedActorName + "String_Node_Str");
  }
  code.append(_eol + _sanitizedDirectorName + "String_Node_Str"+ sanitizedContainerName+ "String_Node_Str");
  code.append(_eol + _sanitizedDirectorName + "String_Node_Str"+ _sanitizedDirectorName+ "String_Node_Str");
  code.append(_eol + _sanitizedDirectorName + "String_Node_Str");
  code.append(_eol + _sanitizedDirectorName + "String_Node_Str");
  code.append(_eol + codeGenerator.comment("String_Node_Str"));
  return code.toString();
}