Program: 76059
Project: 76059
Buggy source:
/** 
 * Handle change requests for all parameters. An exception is thrown if the requested change is not allowed.
 * @exception IllegalActionException If the change is notallowed.
 */
public void attributeChanged(Attribute attribute) throws IllegalActionException {
  if (_debugging)   _debug("String_Node_Str" + attribute.getName());
  if (attribute == channels) {
    _channels=((IntToken)channels.getToken()).intValue();
    if (_channels < 1) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + _channels + "String_Node_Str"+ "String_Node_Str");
    }
    if ((_inArray == null) || (_channels != _inArray.length)) {
      _inArray=new Token[_channels][];
    }
    if ((_audioPutArray == null) || (_channels != _audioPutArray.length)) {
      _audioPutArray=new double[_channels][];
    }
  }
 else   if (attribute == pathName) {
  }
 else   if (attribute == sampleRate) {
  }
 else   if (attribute == sampleSizeInBits) {
  }
 else   if (attribute == bufferSize) {
    int intBufferSize=((IntToken)bufferSize.getToken()).intValue();
    if (intBufferSize < _putFactor) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + intBufferSize + "String_Node_Str"+ "String_Node_Str"+ _putFactor+ "String_Node_Str");
    }
    _putSampleSize=intBufferSize / _putFactor;
    for (int i=0; i < _channels; i++) {
      _audioPutArray[i]=new double[_putSampleSize];
    }
  }
 else {
    super.attributeChanged(attribute);
    return;
  }
  if (_safeToInitialize == true) {
    _initializePlayback();
  }
}

Fixed version (ground truth):
/** 
 * Handle change requests for all parameters. An exception is thrown if the requested change is not allowed.
 * @exception IllegalActionException If the change is notallowed.
 */
public void attributeChanged(Attribute attribute) throws IllegalActionException {
  if (_debugging)   _debug("String_Node_Str" + attribute.getName());
  if (attribute == channels) {
    _channels=((IntToken)channels.getToken()).intValue();
    if (_channels < 1) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + _channels + "String_Node_Str"+ "String_Node_Str");
    }
    if ((_inArray == null) || (_channels != _inArray.length)) {
      _inArray=new Token[_channels][];
    }
    if ((_audioPutArray == null) || (_channels != _audioPutArray.length)) {
      _audioPutArray=new double[_channels][];
    }
    for (int i=0; i < _channels; i++) {
      _audioPutArray[i]=new double[_putSampleSize];
    }
  }
 else   if (attribute == pathName) {
  }
 else   if (attribute == sampleRate) {
  }
 else   if (attribute == sampleSizeInBits) {
  }
 else   if (attribute == bufferSize) {
    int intBufferSize=((IntToken)bufferSize.getToken()).intValue();
    if (intBufferSize < _putFactor) {
      throw new IllegalActionException(this,"String_Node_Str" + "String_Node_Str" + intBufferSize + "String_Node_Str"+ "String_Node_Str"+ _putFactor+ "String_Node_Str");
    }
    _putSampleSize=intBufferSize / _putFactor;
    for (int i=0; i < _channels; i++) {
      _audioPutArray[i]=new double[_putSampleSize];
    }
  }
 else {
    super.attributeChanged(attribute);
    return;
  }
  if (_safeToInitialize == true) {
    _initializePlayback();
  }
}