Program: 39163
Project: 39163
Buggy source:
/** 
 * Method that takes in a MIDI file and prints out useful information about the note, whether the  note is on or off, the key, and the velocity. This is printed for each individual track in the  MIDI file. Not necessary for functioning of other methods, but contains useful information about  functioning of MIDI files (channels, tracks, notes, velocity, etc.)
 * @param audioFile input MIDI file
 */
public static void MIDIData(File audioFile){
  Sequence sequence;
  try {
    sequence=MidiSystem.getSequence(audioFile);
    int trackNumber=0;
    for (    Track track : sequence.getTracks()) {
      trackNumber++;
      System.out.println("String_Node_Str" + trackNumber + "String_Node_Str"+ track.size());
      System.out.println();
      for (int i=0; i < track.size(); i++) {
        MidiEvent event=track.get(i);
        System.out.print("String_Node_Str" + event.getTick() + "String_Node_Str");
        MidiMessage message=event.getMessage();
        if (message instanceof ShortMessage) {
          ShortMessage sm=(ShortMessage)message;
          System.out.print("String_Node_Str" + sm.getChannel() + "String_Node_Str");
          if (sm.getCommand() == NOTE_ON) {
            int key=sm.getData1();
            int octave=(key / 12) - 1;
            int note=key % 12;
            String noteName=NOTE_NAMES[note];
            int velocity=sm.getData2();
            System.out.println("String_Node_Str" + noteName + octave+ "String_Node_Str"+ key+ "String_Node_Str"+ velocity);
          }
 else           if (sm.getCommand() == NOTE_OFF) {
            int key=sm.getData1();
            int octave=(key / 12) - 1;
            int note=key % 12;
            String noteName=NOTE_NAMES[note];
            int velocity=sm.getData2();
            System.out.println("String_Node_Str" + noteName + octave+ "String_Node_Str"+ key+ "String_Node_Str"+ velocity);
          }
 else {
            System.out.println("String_Node_Str" + sm.getCommand());
          }
        }
 else {
          System.out.println("String_Node_Str" + message.getClass());
        }
      }
      System.out.println();
    }
  }
 catch (  InvalidMidiDataException|IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * Method that takes in a MIDI file and prints out useful information about the note, whether the  note is on or off, the key, and the velocity. This is printed for each individual track in the  MIDI file. Not necessary for functioning of other methods, but contains useful information about  functioning of MIDI files (channels, tracks, notes, velocity, etc.)
 * @param audioFile input MIDI file
 */
public static void MIDIData(File audioFile){
  Sequence sequence;
  try {
    sequence=MidiSystem.getSequence(audioFile);
    System.out.println("String_Node_Str" + sequence.getTickLength());
    System.out.println("String_Node_Str" + sequence.getMicrosecondLength());
    System.out.println("String_Node_Str" + sequence.getResolution());
    System.out.println("String_Node_Str" + sequence.getDivisionType());
    int trackNumber=0;
    for (    Track track : sequence.getTracks()) {
      trackNumber++;
      System.out.println("String_Node_Str" + trackNumber + "String_Node_Str"+ track.size());
      System.out.println();
      for (int i=0; i < track.size(); i++) {
        MidiEvent event=track.get(i);
        MidiMessage message=event.getMessage();
        if (message instanceof ShortMessage) {
          ShortMessage sm=(ShortMessage)message;
          if (sm.getCommand() == NOTE_ON) {
            int key=sm.getData1();
            int octave=(key / 12) - 1;
            int note=key % 12;
            String noteName=NOTE_NAMES[note];
            int velocity=sm.getData2();
          }
 else           if (sm.getCommand() == NOTE_OFF) {
            int key=sm.getData1();
            int octave=(key / 12) - 1;
            int note=key % 12;
            String noteName=NOTE_NAMES[note];
            int velocity=sm.getData2();
          }
 else {
          }
        }
 else {
        }
      }
      System.out.println();
    }
  }
 catch (  InvalidMidiDataException|IOException e) {
    e.printStackTrace();
  }
}