[Demonstration 1]

[Buggy Method]
private boolean hasNewSuggestion(List<String> addedLabels, Optional<String> suggestion) {
    return suggestion.isPresent() && !initialLabels.contains(suggestion.get()) && !addedLabels.contains(suggestion.get());
}

[Buggy Hunk]
return suggestion.isPresent() && !initialLabels.contains(suggestion.get()) && !addedLabels.contains(suggestion.get());

[Patch]
return suggestion.isPresent() && !(issue.getLabels()).contains(suggestion.get()) && !addedLabels.contains(suggestion.get());

[Demonstration 2]

[Buggy Method]
@Override
public void onEnable() {
    PluginLogger.info("Setting up toaster.");
    toasts = new ArrayList<>();
    toastCounter = 0;
    loadComponents(Gui.class, Commands.class, ToasterWorker.class, SidebarScoreboard.class);
    Commands.register("toaster", AddCommand.class, OpenCommand.class);
    getServer().getPluginManager().registerEvents(this, this);
    toasterSidebar = new ToasterSidebar();
    for (Player player : getServer().getOnlinePlayers()) toasterSidebar.addRecipient(player);
    toasterSidebar.runAutoRefresh(true);
}

[Buggy Hunk]
Commands.register("toaster", AddCommand.class, OpenCommand.class);

[Patch]
Commands.register("toaster", AddCommand.class, OpenCommand.class, ListCommand.class);

[Demonstration 3]

[Buggy Method]
public void suggest(Player player, Collection<Card> suggestion) throws CluelessException {
    Point playerLocation = board.getLocation(player.getSuspect());
    Room playerRoom = board.getRoom(playerLocation);
    Card suggestionRoom = getTypeFromProposal(suggestion, EntityType.ROOM);
    Set<PlayerAction> allowed = allowedActions.get(player.getID());
    // Validate request
    validateActionCommon(player, "suggest");
    if (!allowed.contains(PlayerAction.SUGGEST)) {
        throw new CluelessException(String.format("Not allowed to suggest. Valid actions=%s", allowed));
    }
    if (isValidProposal(suggestion)) {
        throw new CluelessException(String.format("Invalid suggestion=%s. Must include exactly one suspect, weapon, " + "and room", suggestion));
    }
    if (playerRoom != suggestionRoom) {
        throw new CluelessException(String.format("Player is in room=%s, but made a suggestion about room=%s", playerRoom, suggestionRoom));
    }
    // Move suggestion's suspect to suggestion's room, if necessary
    Suspect suggestedSuspect = (Suspect) getTypeFromProposal(suggestion, EntityType.SUSPECT);
    Point locationSuggestedSuspect = board.getLocation(suggestedSuspect);
    if (!locationSuggestedSuspect.equals(playerLocation)) {
        board.move(suggestedSuspect, playerLocation, true);
        Player suggestedPlayer = players.get(suggestedSuspect);
        if (suggestedPlayer != null) {
            Set<PlayerAction> allowedSuggestedPlayer = allowedActions.get(suggestedPlayer.getID());
            allowedSuggestedPlayer.add(PlayerAction.SUGGEST);
        }
    }
    allowed.remove(PlayerAction.SUGGEST);
    // Save this player's suggestion for comparison against responses
    currentSuggestion = suggestion;
    // Initialize rotation for players' responses
    indexPlayerResponding = rotatePlayerIndex(indexPlayerTurn, false);
}

[Buggy Hunk]
if (isValidProposal(suggestion))  {

[Patch]
if (!isValidProposal(suggestion))  {