Program: 72933
Project: 72933
Buggy source:
/** 
 * Construct an actor with the given container and name.
 * @param container The container.
 * @param name The name of this actor
 * @exception IllegalActionException If the actor cannot be containedby the proposed container.
 * @exception NameDuplicationException If the container already has anactor with this name.
 */
public ClassifyObservations(CompositeEntity container,String name) throws NameDuplicationException, IllegalActionException {
  super(container,name);
  mean=new TypedIOPort(this,"String_Node_Str",true,false);
  mean.setTypeEquals(new ArrayType(BaseType.DOUBLE));
  StringAttribute cardinality=new StringAttribute(mean,"String_Node_Str");
  cardinality.setExpression("String_Node_Str");
  modelType=new StringParameter(this,"String_Node_Str");
  modelType.setExpression("String_Node_Str");
  modelType.addChoice("String_Node_Str");
  modelType.addChoice("String_Node_Str");
  _modelType=_HMM;
  standardDeviation=new TypedIOPort(this,"String_Node_Str",true,false);
  standardDeviation.setTypeEquals(new ArrayType(BaseType.DOUBLE));
  cardinality=new StringAttribute(standardDeviation,"String_Node_Str");
  cardinality.setExpression("String_Node_Str");
  transitionMatrix=new TypedIOPort(this,"String_Node_Str",true,false);
  transitionMatrix.setTypeEquals(BaseType.DOUBLE_MATRIX);
  cardinality=new StringAttribute(transitionMatrix,"String_Node_Str");
  cardinality.setExpression("String_Node_Str");
  prior=new TypedIOPort(this,"String_Node_Str",true,false);
  prior.setTypeEquals(new ArrayType(BaseType.DOUBLE));
  input=new TypedIOPort(this,"String_Node_Str",true,false);
  input.setTypeEquals(new ArrayType(BaseType.DOUBLE));
  output=new TypedIOPort(this,"String_Node_Str",false,true);
  output.setTypeEquals(new ArrayType(BaseType.INT));
  emissionDistribution=new StringParameter(this,"String_Node_Str");
  emissionDistribution.setExpression("String_Node_Str");
  _distribution=_GAUSSIAN;
}

Fixed version (ground truth):
/** 
 * Construct an actor with the given container and name.
 * @param container The container.
 * @param name The name of this actor
 * @exception IllegalActionException If the actor cannot be containedby the proposed container.
 * @exception NameDuplicationException If the container already has anactor with this name.
 */
public ClassifyObservations(CompositeEntity container,String name) throws NameDuplicationException, IllegalActionException {
  super(container,name);
  mean=new PortParameter(this,"String_Node_Str");
  mean.setExpression("String_Node_Str");
  mean.setTypeEquals(new ArrayType(BaseType.DOUBLE));
  StringAttribute cardinality=new StringAttribute(mean.getPort(),"String_Node_Str");
  cardinality.setExpression("String_Node_Str");
  modelType=new StringParameter(this,"String_Node_Str");
  modelType.setExpression("String_Node_Str");
  modelType.addChoice("String_Node_Str");
  modelType.addChoice("String_Node_Str");
  _modelType=_HMM;
  standardDeviation=new PortParameter(this,"String_Node_Str");
  standardDeviation.setExpression("String_Node_Str");
  standardDeviation.setTypeEquals(new ArrayType(BaseType.DOUBLE));
  cardinality=new StringAttribute(standardDeviation.getPort(),"String_Node_Str");
  cardinality.setExpression("String_Node_Str");
  transitionMatrix=new PortParameter(this,"String_Node_Str");
  transitionMatrix.setExpression("String_Node_Str");
  transitionMatrix.setTypeEquals(BaseType.DOUBLE_MATRIX);
  cardinality=new StringAttribute(transitionMatrix.getPort(),"String_Node_Str");
  cardinality.setExpression("String_Node_Str");
  prior=new PortParameter(this,"String_Node_Str");
  prior.setExpression("String_Node_Str");
  prior.setTypeEquals(new ArrayType(BaseType.DOUBLE));
  cardinality=new StringAttribute(prior.getPort(),"String_Node_Str");
  cardinality.setExpression("String_Node_Str");
  input=new TypedIOPort(this,"String_Node_Str",true,false);
  input.setTypeEquals(new ArrayType(BaseType.DOUBLE));
  output=new TypedIOPort(this,"String_Node_Str",false,true);
  output.setTypeEquals(new ArrayType(BaseType.INT));
  emissionDistribution=new StringParameter(this,"String_Node_Str");
  emissionDistribution.setExpression("String_Node_Str");
  _distribution=_GAUSSIAN;
  _nStates=((ArrayToken)mean.getToken()).length();
  _meanEstimate=new double[_nStates];
  _stDeviationEstimate=new double[_nStates];
  _transitionMatrixEstimate=new double[_nStates][_nStates];
  _priors=new double[_nStates];
}