Program: 74362
Project: 74362
Buggy source:
/** 
 * Construct a state with the given name contained by the specified composite entity. The container argument must not be null, or a NullPointerException will be thrown. This state will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. Increment the version of the workspace. This constructor write-synchronizes on the workspace.
 * @param container The container.
 * @param name The name of the state.
 * @exception IllegalActionException If the state cannot be containedby the proposed container.
 * @exception NameDuplicationException If the name coincides withthat of an entity already in the container.
 */
public State(CompositeEntity container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  incomingPort=new ComponentPort(this,"String_Node_Str");
  outgoingPort=new ComponentPort(this,"String_Node_Str");
  refinementName=new StringAttribute(this,"String_Node_Str");
  _attachText("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  SingletonParameter center=new SingletonParameter(this,"String_Node_Str");
  center.setExpression("String_Node_Str");
  center.setVisibility(Settable.EXPERT);
  isInitialState=new Parameter(this,"String_Node_Str");
  isInitialState.setTypeEquals(BaseType.BOOLEAN);
  isInitialState.setExpression("String_Node_Str");
  String initialStateName="String_Node_Str";
  if (container instanceof FSMActor) {
    initialStateName=((FSMActor)container).initialStateName.getExpression().trim();
  }
  if (initialStateName.equals("String_Node_Str")) {
    if (container.entityList(State.class).size() == 1) {
      isInitialState.setExpression("String_Node_Str");
      isInitialState.setPersistent(true);
    }
  }
 else {
    if (initialStateName.equals(name)) {
      isInitialState.setExpression("String_Node_Str");
      isInitialState.setPersistent(true);
    }
  }
  isFinalState=new Parameter(this,"String_Node_Str");
  isFinalState.setTypeEquals(BaseType.BOOLEAN);
  isFinalState.setExpression("String_Node_Str");
  new ContainmentExtender(this,"String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Construct a state with the given name contained by the specified composite entity. The container argument must not be null, or a NullPointerException will be thrown. This state will use the workspace of the container for synchronization and version counts. If the name argument is null, then the name is set to the empty string. Increment the version of the workspace. This constructor write-synchronizes on the workspace.
 * @param container The container.
 * @param name The name of the state.
 * @exception IllegalActionException If the state cannot be containedby the proposed container.
 * @exception NameDuplicationException If the name coincides withthat of an entity already in the container.
 */
public State(CompositeEntity container,String name) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  incomingPort=new ComponentPort(this,"String_Node_Str");
  outgoingPort=new ComponentPort(this,"String_Node_Str");
  refinementName=new StringAttribute(this,"String_Node_Str");
  _attachText("String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  SingletonParameter center=new SingletonParameter(this,"String_Node_Str");
  center.setExpression("String_Node_Str");
  center.setVisibility(Settable.EXPERT);
  isInitialState=new Parameter(this,"String_Node_Str");
  isInitialState.setTypeEquals(BaseType.BOOLEAN);
  isInitialState.setExpression("String_Node_Str");
  String initialStateName="String_Node_Str";
  if (container instanceof FSMActor) {
    initialStateName=((FSMActor)container).initialStateName.getExpression().trim();
    if (initialStateName.equals("String_Node_Str")) {
      if (container.entityList(State.class).size() == 1) {
        isInitialState.setExpression("String_Node_Str");
        isInitialState.setPersistent(true);
      }
    }
 else {
      if (initialStateName.equals(name)) {
        isInitialState.setExpression("String_Node_Str");
        isInitialState.setPersistent(true);
      }
    }
  }
  isFinalState=new Parameter(this,"String_Node_Str");
  isFinalState.setTypeEquals(BaseType.BOOLEAN);
  isFinalState.setExpression("String_Node_Str");
  new ContainmentExtender(this,"String_Node_Str");
}