Program: 72723
Project: 72723
Buggy source:
/** 
 * Generate the fire code of the associated controller. All the steps are described below It is slightly different from the super class in order to take into account the receivers (if embedded in a DE model)
 * @return The fire code of the associated controller.
 * @exception IllegalActionException If the adapter associated withan actor throws it while generating fire code for the actor
 */
public String generateFireCode() throws IllegalActionException {
  FSMActor controllerHelper;
  try {
    controllerHelper=new FSMActor(_myController);
    controllerHelper.setCodeGenerator(getCodeGenerator());
    controllerHelper.setTemplateParser(getTemplateParser());
  }
 catch (  NameDuplicationException ndx) {
    throw new IllegalActionException(ndx.toString());
  }
  StringBuffer code=new StringBuffer();
  String name=_myController.getFullName().substring(1);
  String modalName=name.replace("String_Node_Str","String_Node_Str");
  modalName=modalName.replace('.','_');
  code.append(_eol + getCodeGenerator().comment("String_Node_Str"));
  controllerHelper.generateTransitionCode(code,new PreemptiveTransitions());
  code.append(_eol);
  code.append("String_Node_Str" + modalName + "String_Node_Str"+ _eol);
  if (_generateRefinementCode(code)) {
    code.append(_eol + "String_Node_Str" + _eol);
  }
  code.append(getCodeGenerator().comment("String_Node_Str"));
  controllerHelper.generateTransitionCode(code,new NonPreemptiveTransitions());
  code.append("String_Node_Str" + _eol);
  code.append(_eol + "String_Node_Str" + _eol);
  return code.toString();
}

Fixed version (ground truth):
/** 
 * Generate the fire code of the associated controller. All the steps are described below It is slightly different from the super class in order to take into account the receivers (if embedded in a DE model)
 * @return The fire code of the associated controller.
 * @exception IllegalActionException If the adapter associated withan actor throws it while generating fire code for the actor
 */
public String generateFireCode() throws IllegalActionException {
  FSMActor controllerHelper;
  try {
    controllerHelper=new FSMActor(_myController);
    controllerHelper.setCodeGenerator(getCodeGenerator());
    controllerHelper.setTemplateParser(getTemplateParser());
  }
 catch (  NameDuplicationException ndx) {
    throw new IllegalActionException(ndx.toString());
  }
  StringBuffer code=new StringBuffer();
  String name=_myController.getFullName().substring(1);
  String modalName=name.replace("String_Node_Str","String_Node_Str");
  modalName=modalName.replace('.','_');
  code.append(_eol + getCodeGenerator().comment("String_Node_Str"));
  controllerHelper.generateTransitionCode(code,new PreemptiveTransitions());
  code.append(_eol);
  code.append("String_Node_Str" + modalName + "String_Node_Str"+ _eol);
  if (_generateRefinementCode(code)) {
    code.append(_eol + "String_Node_Str" + _eol);
  }
 else {
    code.append(_eol + "String_Node_Str" + _eol);
  }
  code.append(getCodeGenerator().comment("String_Node_Str"));
  controllerHelper.generateTransitionCode(code,new NonPreemptiveTransitions());
  code.append("String_Node_Str" + _eol);
  code.append(_eol + "String_Node_Str" + _eol);
  return code.toString();
}