Program: 19745
Project: 19745
Buggy source:
/** 
 * Handles the given Data in the case when mergeSpeechSegment is false.
 * @param audio the Data object to handle
 * @throws DataProcessingException if a data processor error occurs
 */
private Data handleNonMergingData(Data audio) throws DataProcessingException {
  Data next=audio;
  if (audio != null) {
    if (audio instanceof SpeechStartSignal) {
      numberSpeechSamples=0;
      if (inSpeech) {
        message("String_Node_Str" + "String_Node_Str");
        do {
          next=readData();
        }
 while (next != null && next instanceof SpeechStartSignal);
        if (next != null) {
          next=handleNonMergingData(next);
        }
      }
 else {
        inSpeech=true;
        discardMode=false;
        next=new DataStartSignal(((Signal)audio).getTime());
      }
    }
 else     if (audio instanceof SpeechEndSignal) {
      if (!inSpeech) {
        message("String_Node_Str" + "String_Node_Str");
        do {
          next=readData();
        }
 while (next != null && next instanceof SpeechEndSignal);
        if (next != null) {
          next=handleNonMergingData(next);
        }
      }
 else {
        inSpeech=false;
        discardMode=true;
        next=new DataEndSignal(getDuration(),((Signal)audio).getTime());
      }
    }
 else     if (discardMode) {
      while (next != null && !(next instanceof SpeechStartSignal) && !(next instanceof SpeechEndSignal)) {
        next=readData();
      }
      next=handleNonMergingData(next);
    }
 else     if (audio instanceof DoubleData) {
      DoubleData realData=(DoubleData)audio;
      numberSpeechSamples+=realData.getValues().length;
      sampleRate=realData.getSampleRate();
    }
  }
  return next;
}

Fixed version (ground truth):
/** 
 * Handles the given Data in the case when mergeSpeechSegment is false.
 * @param audio the Data object to handle
 * @throws DataProcessingException if a data processor error occurs
 */
private Data handleNonMergingData(Data audio) throws DataProcessingException {
  Data next=audio;
  if (audio != null) {
    if (audio instanceof SpeechStartSignal) {
      numberSpeechSamples=0;
      if (inSpeech) {
        message("String_Node_Str" + "String_Node_Str");
        do {
          next=readData();
        }
 while (next != null && next instanceof SpeechStartSignal);
        if (next != null) {
          next=handleNonMergingData(next);
        }
      }
 else {
        inSpeech=true;
        discardMode=false;
        next=new DataStartSignal(sampleRate,((Signal)audio).getTime());
      }
    }
 else     if (audio instanceof SpeechEndSignal) {
      if (!inSpeech) {
        message("String_Node_Str" + "String_Node_Str");
        do {
          next=readData();
        }
 while (next != null && next instanceof SpeechEndSignal);
        if (next != null) {
          next=handleNonMergingData(next);
        }
      }
 else {
        inSpeech=false;
        discardMode=true;
        next=new DataEndSignal(getDuration(),((Signal)audio).getTime());
      }
    }
 else     if (discardMode) {
      while (next != null && !(next instanceof SpeechStartSignal) && !(next instanceof SpeechEndSignal)) {
        next=readData();
      }
      next=handleNonMergingData(next);
    }
 else     if (audio instanceof DoubleData) {
      DoubleData realData=(DoubleData)audio;
      numberSpeechSamples+=realData.getValues().length;
      sampleRate=realData.getSampleRate();
    }
  }
  return next;
}