[Demonstration 1]

[Buggy Method]
private void save() {
    try {
        FileOutputStream teamSave = new FileOutputStream("teams.ser");
        FileOutputStream playerSave = new FileOutputStream("players.ser");
        ObjectOutputStream team = new ObjectOutputStream(teamSave);
        ObjectOutputStream player = new ObjectOutputStream(playerSave);
        player.writeObject(players);
        team.writeObject(teams);
        player.close();
        team.close();
        teamSave.close();
        playerSave.close();
        System.out.println("Teams successfully saved!");
    } catch (IOException e) {
        e.printStackTrace();
    }
}

[Buggy Hunk]
e.printStackTrace();

[Patch]
System.out.println("Problem saving teams. You will have to start over next time.");

[Demonstration 2]

[Buggy Method]
public static void save(ArrayList<Lesson> lessons) throws IOException {
    ObjectOutputStream stream = new ObjectOutputStream(new FileOutputStream("lessons.watson"));
    stream.writeObject(lessons);
    stream.close();
}

[Buggy Hunk]
ObjectOutputStream stream = new ObjectOutputStream(new FileOutputStream("lessons.watson"));

[Patch]
ObjectOutputStream stream = new ObjectOutputStream(new FileOutputStream(filename));

[Demonstration 3]

[Buggy Method]
private void sizeOptimization(View view) {
    ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
    if (!isNull(layoutParams) && !isOptimizationDisable(VIEW_OPTIMIZATION, view.getId())) {
        int width = layoutParams.width;
        int height = layoutParams.height;
        int properWidth = width != WRAP_CONTENT && width != MATCH_PARENT ? getProperWidth(width) : width;
        int properHeight = height != WRAP_CONTENT && height != MATCH_PARENT ? getProperHeight(height) : height;
        properHeight = getProperParam(properHeight == 0 ? ++properHeight : properHeight);
        properWidth = width == height ? properHeight : getProperParam(properWidth == 0 ? ++properWidth : properWidth);
        layoutParams.width = properWidth;
        layoutParams.height = properHeight;
        view.setLayoutParams(layoutParams);
    }
}

[Buggy Hunk]
if (!isNull(layoutParams) && !isOptimizationDisable(VIEW_OPTIMIZATION, view.getId())) {

[Patch]
if (!isNull(layoutParams) && !isOptimizationDisable(VIEW, view.getId())) {