Program: 75753
Project: 75753
Buggy source:
/** 
 * Set the action and notify the container that the action has changed by calling attributeChanged(), and notify any listeners that have been registered using addValueListener().
 * @param expression The action.
 * @exception IllegalActionException If the change is not acceptableto the container, or if the action is syntactically incorrect.
 */
public void setExpression(String expression) throws IllegalActionException {
  super.setExpression(expression);
  if (expression == null)   return;
  _destinationNames=new LinkedList();
  _numbers=new LinkedList();
  _variables=new LinkedList();
  _destinationsListVersion=-1;
  StringTokenizer commands=new StringTokenizer(expression,"String_Node_Str");
  while (commands.hasMoreTokens()) {
    String command=commands.nextToken();
    int equalSign=command.indexOf("String_Node_Str");
    if (equalSign < 1 || equalSign >= command.length() - 1) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + command);
    }
    String completeDestinationSpec=command.substring(0,equalSign).trim();
    int openParen=completeDestinationSpec.indexOf("String_Node_Str");
    if (openParen > 0) {
      int closeParen=completeDestinationSpec.indexOf("String_Node_Str");
      if (closeParen < openParen) {
        throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + command);
      }
      _destinationNames.add(completeDestinationSpec.substring(0,openParen).trim());
      String channelSpec=completeDestinationSpec.substring(openParen + 1,closeParen);
      try {
        _numbers.add(new Integer(channelSpec));
      }
 catch (      NumberFormatException ex) {
        throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + command);
      }
    }
 else {
      _destinationNames.add(completeDestinationSpec);
      _numbers.add(null);
    }
    Transition transition=(Transition)getContainer();
    String variableName="String_Node_Str" + getName() + "String_Node_Str"+ completeDestinationSpec.replace('(','_').replace(')','_').replace('.','_');
    Variable evalVariable=null;
    if (transition == null) {
      evalVariable=new Variable(workspace());
      try {
        evalVariable.setName(variableName);
      }
 catch (      NameDuplicationException ex) {
        throw new InternalErrorException(this,ex,null);
      }
    }
 else {
      Attribute attr=transition.getAttribute(variableName);
      if (attr instanceof Variable) {
        evalVariable=(Variable)attr;
      }
 else {
        try {
          if (attr != null) {
            attr.setContainer(null);
          }
          evalVariable=new Variable(transition,variableName);
        }
 catch (        NameDuplicationException ex) {
          throw new InternalErrorException(this,ex,null);
        }
      }
    }
    evalVariable.setExpression(command.substring(equalSign + 1).trim());
    _variables.add(evalVariable);
  }
}

Fixed version (ground truth):
/** 
 * Set the action and notify the container that the action has changed by calling attributeChanged(), and notify any listeners that have been registered using addValueListener().
 * @param expression The action.
 * @exception IllegalActionException If the change is not acceptableto the container, or if the action is syntactically incorrect.
 */
public void setExpression(String expression) throws IllegalActionException {
  super.setExpression(expression);
  if (expression == null)   return;
  _destinationNames=new LinkedList();
  _numbers=new LinkedList();
  _variables=new LinkedList();
  _destinationsListVersion=-1;
  StringTokenizer commands=new StringTokenizer(expression,"String_Node_Str");
  while (commands.hasMoreTokens()) {
    String command=commands.nextToken();
    int equalSign=command.indexOf("String_Node_Str");
    if (equalSign < 1 || equalSign >= command.length() - 1) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + command);
    }
    String completeDestinationSpec=command.substring(0,equalSign).trim();
    int openParen=completeDestinationSpec.indexOf("String_Node_Str");
    if (openParen > 0) {
      int closeParen=completeDestinationSpec.indexOf("String_Node_Str");
      if (closeParen < openParen) {
        throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + command);
      }
      _destinationNames.add(completeDestinationSpec.substring(0,openParen).trim());
      String channelSpec=completeDestinationSpec.substring(openParen + 1,closeParen);
      try {
        _numbers.add(new Integer(channelSpec));
      }
 catch (      NumberFormatException ex) {
        throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + command);
      }
    }
 else {
      _destinationNames.add(completeDestinationSpec);
      _numbers.add(null);
    }
    Transition transition=(Transition)getContainer();
    String variableName="String_Node_Str" + getName() + "String_Node_Str"+ completeDestinationSpec.replace('(','_').replace(')','_').replace('.','_');
    Variable evalVariable=null;
    if (transition == null) {
      evalVariable=new Variable(workspace());
      try {
        evalVariable.setName(variableName);
      }
 catch (      NameDuplicationException ex) {
        throw new InternalErrorException(this,ex,null);
      }
    }
 else {
      Attribute attribute=transition.getAttribute(variableName);
      if (attribute instanceof Variable) {
        evalVariable=(Variable)attribute;
      }
 else {
        try {
          if (attribute != null) {
            attribute.setContainer(null);
          }
          evalVariable=new Variable(transition,variableName);
        }
 catch (        NameDuplicationException ex) {
          throw new InternalErrorException(this,ex,null);
        }
      }
    }
    evalVariable.setExpression(command.substring(equalSign + 1).trim());
    _variables.add(evalVariable);
  }
}