Program: 39160
Project: 39160
Buggy source:
/** 
 * Loops through array of frequencies generated from a MIDI file and plays it using an array of CPPNS, essentially making the CPPN the "instrument" for each track. Uses similar code as the original  playMIDIWithCPPNFromString() method, but calculates double arrays for individual tracks so that they can be manipulated by unique CPPNs, and then adds all arrays together using zipAdd().
 * @param audio string representation of MIDI file being analyzed
 * @param cppn Input network being used as the "instrument" to generate MIDI file playback
 * @param noteLengthScale Specified playback speed from JSlider on Breedesizer interface
 */
public static AmplitudeArrayPlayer playMIDIWithCPPNsFromString(String audio,Network[] cppns,double noteLengthScale){
  File audioFile=new File(audio);
  Sequence sequence;
  try {
    sequence=MidiSystem.getSequence(audioFile);
    Track[] tracks=sequence.getTracks();
    int arrayLength=0;
    for (int i=0; i < tracks.length; i++) {
      arrayLength=Math.max(tracks[i].size(),arrayLength);
    }
    double[] data=new double[0];
    System.out.println("String_Node_Str" + arrayLength);
    for (int i=0; i < tracks.length; i++) {
      ArrayList<Triple<ArrayList<Double>,ArrayList<Long>,ArrayList<Long>>> sound=soundLines(tracks[i]);
      if (i > cppns.length - 1) {
        double[] lineData=lineToAmplitudeArray(audio,sound,cppns[i - cppns.length],noteLengthScale);
        data=ArrayUtil.zipAdd(data,lineData,Math.max(data.length,lineData.length));
      }
 else {
        double[] lineData=lineToAmplitudeArray(audio,sound,cppns[i],noteLengthScale);
        System.out.println("String_Node_Str" + data.length);
        System.out.println("String_Node_Str" + lineData.length);
        data=ArrayUtil.zipAdd(data,lineData,Math.max(data.length,lineData.length));
      }
    }
    return PlayDoubleArray.playDoubleArray(data);
  }
 catch (  InvalidMidiDataException|IOException e) {
    e.printStackTrace();
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Loops through array of frequencies generated from a MIDI file and plays it using an array of CPPNS, essentially making the CPPN the "instrument" for each track. Uses similar code as the original  playMIDIWithCPPNFromString() method, but calculates double arrays for individual tracks so that they can be manipulated by unique CPPNs, and then adds all arrays together using zipAdd().
 * @param audio string representation of MIDI file being analyzed
 * @param cppn Input network being used as the "instrument" to generate MIDI file playback
 * @param noteLengthScale Specified playback speed from JSlider on Breedesizer interface
 */
public static AmplitudeArrayPlayer playMIDIWithCPPNsFromString(String audio,Network[] cppns,double noteLengthScale){
  File audioFile=new File(audio);
  Sequence sequence;
  try {
    sequence=MidiSystem.getSequence(audioFile);
    Track[] tracks=sequence.getTracks();
    double[] data=new double[0];
    for (int i=0; i < tracks.length; i++) {
      ArrayList<Triple<ArrayList<Double>,ArrayList<Long>,ArrayList<Long>>> sound=soundLines(tracks[i]);
      if (i > cppns.length - 1) {
        double[] lineData=lineToAmplitudeArray(audio,sound,cppns[i - cppns.length],noteLengthScale);
        data=ArrayUtil.zipAdd(data,lineData,Math.max(data.length,lineData.length));
      }
 else {
        double[] lineData=lineToAmplitudeArray(audio,sound,cppns[i],noteLengthScale);
        data=ArrayUtil.zipAdd(data,lineData,Math.max(data.length,lineData.length));
      }
    }
    for (int i=0; i < data.length; i++) {
      data[i]/=tracks.length;
    }
    return PlayDoubleArray.playDoubleArray(data);
  }
 catch (  InvalidMidiDataException|IOException e) {
    e.printStackTrace();
  }
  return null;
}