import java.util.*;
import java.io.*;

public class Util
{
    public static final String YOUR_TICKET = "your ticket:";
    public static final String NEARBY_TICKETS = "nearby tickets:";

    public static final String OR = "or";

    public static final Vector<Category> loadData (String inputFile, boolean debug)
    {
        /*
         * Open the data file and read it in.
         */

        BufferedReader reader = null;
        Vector<Category> values = new Vector<Category>();

        try
        {
            reader = new BufferedReader(new FileReader(inputFile));

            String line = null;

            while ((line = reader.readLine()) != null)
            {
                if (YOUR_TICKET.equals(line) || (NEARBY_TICKETS.equals(line)))
                    break;

                int colonIndex = line.indexOf(":");
                String type = line.substring(0, colonIndex);

                int orIndex = line.indexOf(OR);
                String firstRange = line.substring(colonIndex +1, orIndex).trim();
                String secondRange = line.substring(orIndex + OR.length()).trim();

                int r1 = Integer.parseInt(firstRange.substring(0, firstRange.indexOf("-")));
                int r2 = Integer.parseInt(firstRange.substring(firstRange.indexOf("-") +1));
                int r3 = Integer.parseInt(secondRange.substring(0, secondRange.indexOf("-")));
                int r4 = Integer.parseInt(secondRange.substring(secondRange.indexOf("-") +1));

                values.add(new Category(type, r1, r2, r3, r4, debug));
            }
        }
        catch (Throwable ex)
        {
            ex.printStackTrace();
        }
        finally
        {
            try
            {
                reader.close();
            }
            catch (Throwable ex)
            {
            }
        }

        return values;
    }

    private Util ()
    {
    }
}
@@ -1865,24 +1865,898 @@
 ues;%0A    %7D%0A%0A
+    public static final Vector%3CTicket%3E loadTickets (String inputFile, boolean debug)%0A    %7B%0A        /*%0A         * Open the data file and read it in.%0A         */%0A%0A        BufferedReader reader = null;%0A        Vector%3CTicket%3E values = new Vector%3CTicket%3E();%0A%0A        try%0A        %7B%0A            reader = new BufferedReader(new FileReader(inputFile));%0A%0A            String line = null;%0A%0A            while ((line = reader.readLine()) != null)%0A            %7B%0A                if (YOUR_TICKET.equals(line) %7C%7C (NEARBY_TICKETS.equals(line)))%0A                %7B%0A%0A                %7D%0A            %7D%0A        %7D%0A        catch (Throwable ex)%0A        %7B%0A            ex.printStackTrace();%0A        %7D%0A        finally%0A        %7B%0A            try%0A            %7B%0A                reader.close();%0A            %7D%0A            catch (Throwable ex)%0A            %7B%0A            %7D%0A        %7D%0A%0A        return values;%0A    %7D%0A%0A
     private 

Update Util.java