Program: 72642
Project: 72642
Buggy source:
/** 
 * Constructs a FactorOracle object.
 * @param container         The Container
 * @param name              The name
 * @param trainingSequence  An object array containing the training sequence
 * @param repetitionFactor  a double indicating the factor repetition probability
 * @param symbolicOutput    a boolean that determines whether symbolic outputs should be produced
 * @param validateSymbols   a boolean -- true if symbol validation should be included in guard expressions
 * @throws IllegalActionException repetition factor range checking
 * @throws NameDuplicationException
 */
public FactorOracle(CompositeEntity container,String name,Object[] trainingSequence,double repetitionFactor,boolean symbolicOutput,boolean validateSymbols) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  setClassName("String_Node_Str");
  if (repetitionFactor > 1.0 || repetitionFactor < 0.0) {
    throw new IllegalActionException(this,"String_Node_Str");
  }
  _adjacencyList=new HashMap<Integer,List<Integer>>();
  _adjacencyListSymbols=new HashMap<Integer,List<Integer>>();
  _suffixLinks=new HashMap();
  _alphabet=new HashSet();
  _sequenceLength=0;
  _repetitionFactor=repetitionFactor;
  if (trainingSequence != null) {
    _inputSequence=trainingSequence;
    _sequenceLength=_inputSequence.length;
  }
 else {
    _sequenceLength=0;
    _inputSequence=new Object[1];
  }
  _symbolic=symbolicOutput;
  _validatePitch=validateSymbols;
  _learnFactorOracle();
  _buildFactorOracle();
  validatePitch=new Parameter(this,"String_Node_Str");
  validatePitch.setToken(new ChordFunctionToken());
  validatePitch.setVisibility(Settable.EXPERT);
  validatePitch.setPersistent(false);
}

Fixed version (ground truth):
/** 
 * Constructs a FactorOracle object.
 * @param container         The Container
 * @param name              The name
 * @param trainingSequence  An object array containing the training sequence
 * @param repetitionFactor  a double indicating the factor repetition probability
 * @param symbolicOutput    a boolean that determines whether symbolic outputs should be produced
 * @param validateSymbols   a boolean -- true if symbol validation should be included in guard expressions
 * @exception IllegalActionException repetition factor range checking
 * @exception NameDuplicationException
 */
public FactorOracle(CompositeEntity container,String name,Object[] trainingSequence,double repetitionFactor,boolean symbolicOutput,boolean validateSymbols) throws IllegalActionException, NameDuplicationException {
  super(container,name);
  setClassName("String_Node_Str");
  if (repetitionFactor > 1.0 || repetitionFactor < 0.0) {
    throw new IllegalActionException(this,"String_Node_Str");
  }
  _adjacencyList=new HashMap<Integer,List<Integer>>();
  _adjacencyListSymbols=new HashMap<Integer,List<Integer>>();
  _suffixLinks=new HashMap();
  _alphabet=new HashSet();
  _sequenceLength=0;
  _repetitionFactor=repetitionFactor;
  if (trainingSequence != null) {
    _inputSequence=trainingSequence;
    _sequenceLength=_inputSequence.length;
  }
 else {
    _sequenceLength=0;
    _inputSequence=new Object[1];
  }
  _symbolic=symbolicOutput;
  _validatePitch=validateSymbols;
  _learnFactorOracle();
  _buildFactorOracle();
  validatePitch=new Parameter(this,"String_Node_Str");
  validatePitch.setToken(new ChordFunctionToken());
  validatePitch.setVisibility(Settable.EXPERT);
  validatePitch.setPersistent(false);
}