Program: 19749
Project: 19749
Buggy source:
/** 
 * Returns the next Data object, which is the mel cepstrum of the input frame. However, it can also be other Data objects like DataStartSignal.
 * @return the next available Data object, returns null if noData object is available
 * @throws DataProcessingException if a data processing error occurs
 */
public Data getData() throws DataProcessingException {
  Data data=null;
  if (curPoint == -1) {
    data=new DataStartSignal();
    curPoint++;
  }
 else   if (curPoint == numPoints) {
    if (numPoints > 0) {
      firstSampleNumber=(firstSampleNumber - frameShift + frameSize - 1);
    }
    int numberFrames=curPoint / frameSize;
    int totalSamples=(numberFrames - 1) * frameShift + frameSize;
    long duration=(long)(((double)totalSamples / (double)sampleRate) * 1000.0);
    data=new DataEndSignal(duration);
    try {
      if (binary) {
        binaryStream.close();
      }
 else {
        est.close();
      }
      curPoint++;
    }
 catch (    IOException ioe) {
      throw new DataProcessingException("String_Node_Str");
    }
  }
 else   if (curPoint > numPoints) {
    data=null;
  }
 else {
    double[] vectorData=new double[cepstrumLength];
    long collectTime=System.currentTimeMillis();
    for (int i=0; i < cepstrumLength; i++) {
      try {
        if (binary) {
          if (bigEndian) {
            vectorData[i]=(double)binaryStream.readFloat();
          }
 else {
            vectorData[i]=(double)Utilities.readLittleEndianFloat(binaryStream);
          }
        }
 else {
          vectorData[i]=(double)est.getFloat("String_Node_Str");
        }
        curPoint++;
      }
 catch (      IOException ioe) {
        throw new DataProcessingException("String_Node_Str");
      }
    }
    data=new DoubleData(vectorData,sampleRate,collectTime,firstSampleNumber);
    firstSampleNumber+=frameShift;
  }
  return data;
}

Fixed version (ground truth):
/** 
 * Returns the next Data object, which is the mel cepstrum of the input frame. However, it can also be other Data objects like DataStartSignal.
 * @return the next available Data object, returns null if noData object is available
 * @throws DataProcessingException if a data processing error occurs
 */
public Data getData() throws DataProcessingException {
  Data data;
  if (curPoint == -1) {
    data=new DataStartSignal(sampleRate);
    curPoint++;
  }
 else   if (curPoint == numPoints) {
    if (numPoints > 0) {
      firstSampleNumber=(firstSampleNumber - frameShift + frameSize - 1);
    }
    int numberFrames=curPoint / frameSize;
    int totalSamples=(numberFrames - 1) * frameShift + frameSize;
    long duration=(long)(((double)totalSamples / (double)sampleRate) * 1000.0);
    data=new DataEndSignal(duration);
    try {
      if (binary) {
        binaryStream.close();
      }
 else {
        est.close();
      }
      curPoint++;
    }
 catch (    IOException ioe) {
      throw new DataProcessingException("String_Node_Str");
    }
  }
 else   if (curPoint > numPoints) {
    data=null;
  }
 else {
    double[] vectorData=new double[cepstrumLength];
    long collectTime=System.currentTimeMillis();
    for (int i=0; i < cepstrumLength; i++) {
      try {
        if (binary) {
          if (bigEndian) {
            vectorData[i]=(double)binaryStream.readFloat();
          }
 else {
            vectorData[i]=(double)Utilities.readLittleEndianFloat(binaryStream);
          }
        }
 else {
          vectorData[i]=(double)est.getFloat("String_Node_Str");
        }
        curPoint++;
      }
 catch (      IOException ioe) {
        throw new DataProcessingException("String_Node_Str");
      }
    }
    data=new DoubleData(vectorData,sampleRate,collectTime,firstSampleNumber);
    firstSampleNumber+=frameShift;
  }
  return data;
}