Program: 73455
Project: 73455
Buggy source:
/** 
 * Set the ActorConstraintsDefinitionAttribute icon to be the same icon as that of the actor for which it is defining constraints.  The actor icon can be found either from an XML file that defines the actor icon, or its _iconDescription attribute.
 * @param actorClassNameString The fully qualified name of the class with its package prefix.
 * @param tempActorInstance A temporary instance of the actor from which its icon description attribute canbe taken.
 * @throws IllegalActionException If a problem occurs when trying to set the actor icon.
 */
private void _setActorIcon(String actorClassNameString,ComponentEntity tempActorInstance) throws IllegalActionException {
  String iconFile=actorClassNameString.replace('.','/') + "String_Node_Str";
  URL xmlFile=tempActorInstance.getClass().getClassLoader().getResource(iconFile);
  if (xmlFile != null) {
    try {
      MoMLParser parser=new MoMLParser(this.workspace());
      parser.setContext(this);
      parser.setContext(tempActorInstance);
      parser.parse(xmlFile,xmlFile);
      List<EditorIcon> tempActorIconList=tempActorInstance.attributeList(EditorIcon.class);
      if (!tempActorIconList.isEmpty()) {
        EditorIcon actorIcon=tempActorIconList.get(0);
        String actorIconMoML=actorIcon.exportMoML();
        MoMLVariableChecker momlChecker=new MoMLVariableChecker();
        String prependMoML=momlChecker.checkCopy(actorIconMoML,tempActorInstance,true);
        parser.setContext(this);
        if (prependMoML != null && !prependMoML.equals("String_Node_Str")) {
          parser.parse(prependMoML);
        }
        parser.parse(actorIconMoML);
      }
    }
 catch (    Exception ex) {
      throw new IllegalActionException(this,ex,"String_Node_Str" + "String_Node_Str");
    }
  }
 else {
    ConfigurableAttribute actorIconAttribute=(ConfigurableAttribute)((ComponentEntity)tempActorInstance).getAttribute("String_Node_Str");
    if (actorIconAttribute != null) {
      String iconDescription=actorIconAttribute.getConfigureText();
      SingletonConfigurableAttribute description=(SingletonConfigurableAttribute)this.getAttribute("String_Node_Str");
      try {
        description.configure(null,null,iconDescription);
      }
 catch (      Exception ex) {
        throw new IllegalActionException(this,ex,"String_Node_Str" + "String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Set the ActorConstraintsDefinitionAttribute icon to be the same icon as that of the actor for which it is defining constraints.  The actor icon can be found either from an XML file that defines the actor icon, or its _iconDescription attribute.
 * @param actorClassNameString The fully qualified name of the class with its package prefix.
 * @param tempActorInstance A temporary instance of the actor from which its icon description attribute canbe taken.
 * @throws IllegalActionException If a problem occurs when trying to set the actor icon.
 */
private void _setActorIcon(String actorClassNameString,ComponentEntity tempActorInstance) throws IllegalActionException {
  String iconFile=actorClassNameString.replace('.','/') + "String_Node_Str";
  URL xmlFile=tempActorInstance.getClass().getClassLoader().getResource(iconFile);
  if (xmlFile != null) {
    try {
      MoMLParser parser=new MoMLParser(this.workspace());
      parser.setContext(this);
      parser.setContext(tempActorInstance);
      parser.parse(xmlFile,xmlFile);
      List<EditorIcon> tempActorIconList=tempActorInstance.attributeList(EditorIcon.class);
      if (!tempActorIconList.isEmpty()) {
        EditorIcon actorIcon=tempActorIconList.get(0);
        String actorIconMoML=actorIcon.exportMoML();
        MoMLVariableChecker momlChecker=new MoMLVariableChecker();
        String prependMoML=momlChecker.checkCopy(actorIconMoML,tempActorInstance,true);
        StringBuffer iconMoML=new StringBuffer();
        iconMoML.append("String_Node_Str");
        iconMoML.append(prependMoML + actorIconMoML);
        iconMoML.append("String_Node_Str");
        parser.setContext(this);
        parser.parse(iconMoML.toString());
      }
    }
 catch (    Exception ex) {
      throw new IllegalActionException(this,ex,"String_Node_Str" + "String_Node_Str");
    }
  }
 else {
    ConfigurableAttribute actorIconAttribute=(ConfigurableAttribute)((ComponentEntity)tempActorInstance).getAttribute("String_Node_Str");
    if (actorIconAttribute != null) {
      String iconDescription=actorIconAttribute.getConfigureText();
      SingletonConfigurableAttribute description=(SingletonConfigurableAttribute)this.getAttribute("String_Node_Str");
      try {
        description.configure(null,null,iconDescription);
      }
 catch (      Exception ex) {
        throw new IllegalActionException(this,ex,"String_Node_Str" + "String_Node_Str");
      }
    }
  }
}