[Demonstration 1]

[Buggy Method]
private Event addInvitedUsers(HashSet<String> emails, Event event) {
    //In case no users are invited, invite only the host user.
    if (emails == null) {
        emails = new HashSet<>(1);
    }
    //Add the host to the set of emails.
    emails.add(event.getHost().getEmail());
    mLogger.info("Inviting the following users: {}", emails);
    //The size allocated is for the users in the given set of emails.
    ArrayList<InvitedUser> invitedUsers = new ArrayList<>(emails.size());
    //Loop over each email in the given collection, and invite each user.
    for (String email : emails) {
        try {
            InvitedUser invitedUser = new InvitedUser(mUserService.getUserByEmail(email), event);
            invitedUsers.add(invitedUser);
        } catch (ServiceException e) {
            //The ServiceException is caught in case that there is no user with the given email.
            //In this case, print the exception and don't invite the user.
            mLogger.error(e.getMessage());
        }
    }
    //Set the invited users list to the event entity.
    event.setInvitedUsers(invitedUsers);
    return event;
}

[Buggy Hunk]
event.setInvitedUsers(invitedUsers);

[Patch]
event.inviteUsers(invitedUsers);

[Demonstration 2]

[Buggy Method]
@Override
public int hashCode() {
    return Objects.hashCode(id, idStr);
}

[Buggy Hunk]
return Objects.hashCode(id, idStr);

[Patch]
return Objects.hash(id, idStr);