[Demonstration 1]

[Buggy Method]
public static Object[] valuesForUpdate(UserBo bo) {
    return new Object[] { bo.getData() };
}

[Buggy Hunk]
return new Object[] { bo.getData() };

[Patch]
return new Object[] { bo.getData(), bo.getId() };

[Demonstration 2]

[Buggy Method]
public void update(float deltaTime, int minRange, int maxRange) {
    if (updating) {
        throw new IllegalStateException("Cannot call update() on an Engine that is already updating.");
    }
    updating = true;
    ImmutableArray<EntitySystem> systems = systemManager.getSystems();
    try {
        for (int i = 0; i < systems.size(); ++i) {
            EntitySystem system = systems.get(i);
            if (system.priority >= minRange && system.priority <= maxRange) {
                if (system.checkProcessing()) {
                    system.update(deltaTime);
                }
            }
            componentOperationHandler.processOperations();
            entityManager.processPendingOperations();
        }
    } finally {
        updating = false;
    }
}

[Buggy Hunk]
if(system.priority >= minRange && system.priority <= maxRange) {

[Patch]
if(system.priority >= minRange && system.priority < maxRange) {

[Demonstration 3]

[Buggy Method]
public static void viewVolunteers() {
    // Display all the jobs of that park manager managed
    System.out.println("Select a job to view its volunteers:");
    // create list of Job -> calling Job class and getJob() in JobCOntroller
    List<Job> currentJobs = JobController.getAllJobs();
    if (currentJobs.isEmpty()) {
        System.out.println("You do not have any jobs -> so no volunteers!");
    } else {
        int i = 1;
        for (Job j : currentJobs) {
            System.out.print(i++ + ") ");
            System.out.print(j.getJobName() + " at ");
            System.out.print(j.getPark() + " on ");
            System.out.println(j.getDate());
            System.out.println();
        }
        // Ask user to choose from the list
        //keyboard = new Scanner(System.in);
        System.out.print("Enter a number from the list: ");
        int choice = keyboard.nextInt();
        while (choice < 0 || choice > currentJobs.size()) {
            System.out.print("Please make a selection from the list: ");
            choice = keyboard.nextInt();
        }
        // Display volunteers of the selected jobs:
        System.out.println();
        System.out.println("Volunteers:");
        boolean volunteerFound = false;
        // TODO: Fix the below code.
        /*
            for (String volunteer : currentJobs.get(choice-1).getVolunteer()) {
                for (User u : userController.getUserList()) {   //get user from UserController
                    if (u.equals(volunteer)) {
                        volunteerFound = true;
                        System.out.print(u.getFirstName() + " ");
                        System.out.print(u.getLastName() + ", ");
                    }
                }
            }
            */
        if (!volunteerFound) {
            System.out.println("No volunteers have signed up yet!");
        }
    }
    System.out.println();
}

[Buggy Hunk]
List <Job> currentJobs = JobController.getAllJobs();
                                  
[Patch]
List <Job> currentJobs = jobController.getAllJobs();