[Demonstration 1]

[Buggy Method]
void newRound() {
    if (cardsPerHand == 1) {
        cardsPerHand = 6;
    }
    if (cardsPerHand * 4 > deck.undealedCards.size()) {
        deck = new Deck();
    }
    players.stream().forEach((player) -> {
        for (int i = 0; i < cardsPerHand; i++) {
            Card card = deck.undealedCards.get(new Random().nextInt(deck.undealedCards.size() - 1));
            deck.undealedCards.remove(card);
            player.getCards().add(card);
        }
    });
    cardsPerHand--;
}

[Buggy Hunk]
players.stream().forEach((player) -> {

[Patch]
players.stream().forEach(player -> {

[Demonstration 2]

[Buggy Method]
public void hit(ArrayList<Card> deck) {
    addHand(deck.get(deck.size() - 1));
    deck.remove(deck.size() - 1);
    if (TotalScore() > 21)
        stay();
    // if player is greater than 21, stay
}

[Buggy Hunk]
addHand(deck.get(deck.size()-1));

[Patch]
deck.add(deck.get(deck.size()-1)); // addHand?

[Demonstration 3]

[Buggy Method]
@Override
public void handle(InputStream stream) throws IOException {
    BufferedReader reader = new BufferedReader(new InputStreamReader(stream, charset));
    boolean listingFound = false;
    boolean salesFound = false;
    boolean buyOrdersFound = false;
    boolean immediateSaleFound = false;
    StringBuilder stringBuilder = new StringBuilder();
    String line;
    while ((line = reader.readLine()) != null) {
        if (logger.isDebugEnabled()) {
            stringBuilder.append(line).append('\n');
        }
        if (!buyOrdersFound) {
            if (line.indexOf("market_commodity_order_block") > -1) {
                buyOrders = true;
                buyOrdersFound = true;
            }
        }
        if (line.indexOf("There are no listings for this item") > -1) {
            noListingForThisItem = true;
            return;
        }
        if (line.indexOf("There is no price history available") > -1) {
            noPricingHistoryForThisItem = true;
            return;
        }
        if (line.indexOf("This item may no longer be bought or sold on the market") > -1) {
            noLongerSold = true;
            return;
        }
        if (!immediateSaleFound) {
            if (line.indexOf("either in-game or on the Steam Community Market") > -1) {
                immediateSaleFound = true;
                immediateSale = line.indexOf("Note: Items purchased for") == -1;
            }
        }
        if (!listingFound) {
            int listingStart = line.indexOf("g_rgListingInfo");
            if (listingStart > -1) {
                int objectStart = line.indexOf('{', listingStart);
                if (objectStart > -1) {
                    listingInfo = om.readTree(line.substring(objectStart, line.length() - 1));
                    listingFound = true;
                }
            }
        }
        if (!salesFound) {
            int salesStart = line.indexOf("line1");
            if (salesStart > -1) {
                int objectStart = line.indexOf('[', salesStart);
                if (objectStart <= -1) {
                    continue;
                }
                priceHistoryInfo = om.readTree(line.substring(objectStart, line.length() - 1));
                salesFound = true;
            }
        }
    }
    if (!salesFound) {
        logger.warn("No sales info found!");
    }
    if (!listingFound) {
        logger.warn("No listing info found!");
    }
    if (!(salesFound && listingFound) && logger.isDebugEnabled()) {
        logger.debug("Content: " + stringBuilder.toString());
        try (PrintWriter printWriter = new PrintWriter(new File("listing-page-" + new Random().nextLong() + ".html"))) {
            printWriter.print(stringBuilder.toString());
            printWriter.flush();
        }
    }
}

[Buggy Hunk]
try (PrintWriter printWriter = new PrintWriter(new File("listing-page-" + new Random().nextLong() + ".html"))) {

[Patch]
try (PrintWriter printWriter = new PrintWriter(new File("listing-page-" + random.nextLong() + ".html"))) {