[Demonstration 1]

[Buggy Method]
public void notifyGameIsOver(GameSession gameSession) {
    final boolean exists = gameSessions.remove(gameSession);
    final List<GameUser> players = gameSession.getPlayers();
    for (GameUser player : players) {
        usersMap.remove(player.getId());
        if (exists) {
            remotePointService.cutDownConnection(player.getId(), CloseStatus.SERVER_ERROR);
        }
    }
    LOGGER.info("--------------------------------------------------------");
    LOGGER.info("Game is over, total rooms: {}", gameSessions.size());
}

[Buggy Hunk]
LOGGER.info("Game is over, total rooms: {}", gameSessions.size());

[Patch]
LOGGER.info("Game #{} is over, total rooms: {}", gameSession.getId(), gameSessions.size());

[Demonstration 2]

[Buggy Method]
public static void main(String[] args) {
    System.out.println("Results of " + SHUFFLE_COUNT + " consecutive perfect shuffles:");
    int[] values1 = { 0, 1 };
    for (int j = 1; j <= SHUFFLE_COUNT; j++) {
        //perfectShuffle(values1);
        System.out.print("  " + j + ":");
        for (int k = 0; k < values1.length; k++) {
            System.out.print(" " + values1[k]);
        }
        System.out.println();
    }
    System.out.println();
    System.out.println("Results of " + SHUFFLE_COUNT + " consecutive realistic shuffles:");
    for (int j = 1; j <= SHUFFLE_COUNT; j++) {
        realisticShuffle(values1);
        System.out.print("  " + j + ":");
        for (int k = 0; k < values1.length; k++) {
            System.out.print(" " + values1[k]);
        }
        System.out.println();
    }
    System.out.println();
    System.out.println("Results of " + SHUFFLE_COUNT + " consecutive efficient selection shuffles:");
    for (int j = 1; j <= SHUFFLE_COUNT; j++) {
        selectionShuffle(values1);
        System.out.print("  " + j + ":");
        for (int k = 0; k < values1.length; k++) {
            System.out.print(" " + values1[k]);
        }
        System.out.println();
    }
    System.out.println();
}

[Buggy Hunk]
int[] values1 = {0,1};

[Patch]
int[] values1 = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14};

[Demonstration 3]

[Buggy Method]
public ArrayList<ArrayList<Integer>> prettyPrint(int a) {
    if (a == 0)
        return new ArrayList<ArrayList<Integer>>();
    int row = 2 * a - 1;
    int col = 2 * a - 1;
    ArrayList<ArrayList<Integer>> res = new ArrayList<ArrayList<Integer>>();
    ArrayList<Integer> list = new ArrayList<Integer>();
    for (int i = 0; i < row; i++) {
        for (int j = 0; j < col; j++) {
            if (i < a && j < a) {
                int val = Math.max(a - i, a - j);
                list.add(val);
                continue;
            }
            if (i < a && j >= a) {
                int val = Math.max((a - i), a - (col - 1 - j));
                list.add(val);
                continue;
            }
            if (i >= a && j < a) {
                int val = Math.max(a - (row - 1 - i), a - j);
                list.add(val);
                continue;
            }
            if (i >= a && j >= a) {
                int val = Math.max(a - row + i + 1, a - col + j + 1);
                list.add(val);
                continue;
            }
        }
        res.add(new ArrayList(list));
        list.clear();
    }
    return res;
}

[Buggy Hunk]
public ArrayList<ArrayList<Integer>> prettyPrint(int a) {

[Patch]
public static ArrayList<ArrayList<Integer>> prettyPrint(int a) {