Program: 103820
Project: 103820
Buggy source:
/** 
 * Gets the <tt>SourceStream</tt>s (in the form of <tt>InputStreamDesc</tt>) of the <tt>DataSource</tt>s from which this <tt>AudioMixer</tt> reads data which produce data in a specific <tt>AudioFormat</tt>. When an input <tt>DataSource</tt> does not have such <tt>SourceStream</tt>s, an attempt is made to transcode its tracks so that such <tt>SourceStream</tt>s can be retrieved from it after transcoding.
 * @param outputFormat the <tt>AudioFormat</tt> in which the retrieved <tt>SourceStream</tt>s are to produce data
 * @param existingInputStreams
 * @return a new collection of <tt>SourceStream</tt>s (in the form of<tt>InputStreamDesc</tt>) retrieved from the input <tt>DataSource</tt>s of this <tt>AudioMixer</tt> and producing data in the specified <tt>AudioFormat</tt>
 * @throws IOException
 */
private Collection<InputStreamDesc> getInputStreamsFromInputDataSources(AudioFormat outputFormat,InputStreamDesc[] existingInputStreams) throws IOException {
  List<InputStreamDesc> inputStreams=new ArrayList<InputStreamDesc>();
synchronized (inputDataSources) {
    for (    InputDataSourceDesc inputDataSourceDesc : inputDataSources) {
      boolean got=getInputStreamsFromInputDataSource(inputDataSourceDesc,outputFormat,existingInputStreams,inputStreams);
      if (!got) {
        DataSource transcodingDataSource=createTranscodingDataSource(inputDataSourceDesc.getEffectiveInputDataSource(),outputFormat);
        if (transcodingDataSource != null) {
          inputDataSourceDesc.setTranscodingDataSource(transcodingDataSource);
          getInputStreamsFromInputDataSource(inputDataSourceDesc,outputFormat,existingInputStreams,inputStreams);
        }
      }
    }
  }
  return inputStreams;
}

Fixed version (ground truth):
/** 
 * Gets the <tt>SourceStream</tt>s (in the form of <tt>InputStreamDesc</tt>) of the <tt>DataSource</tt>s from which this <tt>AudioMixer</tt> reads data which produce data in a specific <tt>AudioFormat</tt>. When an input <tt>DataSource</tt> does not have such <tt>SourceStream</tt>s, an attempt is made to transcode its tracks so that such <tt>SourceStream</tt>s can be retrieved from it after transcoding.
 * @param outputFormat the <tt>AudioFormat</tt> in which the retrieved<tt>SourceStream</tt>s are to produce data
 * @param existingInputStreams the <tt>SourceStream</tt>s which are alreadyknown to this <tt>AudioMixer</tt>
 * @return a new collection of <tt>SourceStream</tt>s (in the form of<tt>InputStreamDesc</tt>) retrieved from the input <tt>DataSource</tt>s of this <tt>AudioMixer</tt> and producing data in the specified <tt>AudioFormat</tt>
 * @throws IOException if anything wrong goes while retrieving the input<tt>SourceStream</tt>s from the input <tt>DataSource</tt>s
 */
private Collection<InputStreamDesc> getInputStreamsFromInputDataSources(AudioFormat outputFormat,InputStreamDesc[] existingInputStreams) throws IOException {
  List<InputStreamDesc> inputStreams=new ArrayList<InputStreamDesc>();
synchronized (inputDataSources) {
    for (    InputDataSourceDesc inputDataSourceDesc : inputDataSources) {
      boolean got=getInputStreamsFromInputDataSource(inputDataSourceDesc,outputFormat,existingInputStreams,inputStreams);
      if (!got) {
        DataSource transcodingDataSource=createTranscodingDataSource(inputDataSourceDesc.getEffectiveInputDataSource(),outputFormat);
        if (transcodingDataSource != null) {
          inputDataSourceDesc.setTranscodingDataSource(transcodingDataSource);
          getInputStreamsFromInputDataSource(inputDataSourceDesc,outputFormat,existingInputStreams,inputStreams);
        }
      }
    }
  }
  return inputStreams;
}