[Demonstration 1]

[Buggy Method]
public static void main(String[] args) {
    // problem 8.3
    int[] arr = new int[] { 1, 2, 3, 4 };
    List<List<Integer>> subsets = subsets(arr, true);
    System.out.println(subsets.toString());
}

[Buggy Hunk]
System.out.println(subsets.toString());

[Patch]
hanoiTowers(5);

[Demonstration 2]

[Buggy Method]
public void close() {
    _frame.dispose();
}

[Buggy Hunk]
_frame.dispose();

[Patch]
_dialog.dispose();

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) {
    //Instantiate an instance of this demo module
    MultilineChartDrawer charter = new MultilineChartDrawer(0);
    //Create and set up the main window
    JFrame frame = new JFrame(charter.toString());
    frame.addWindowListener(new WindowAdapter() {

        public void windowClosing(WindowEvent e) {
            System.exit(0);
        }
    });
    frame.getContentPane().setBackground(Color.white);
    // Create the chart and put them in the content pane
    ChartViewer viewer = new ChartViewer();
    charter.createChart(viewer);
    frame.getContentPane().add(viewer);
    // Display the window
    frame.pack();
    frame.setVisible(true);
}

[Buggy Hunk]
charter.createChart(viewer);

[Patch]
charter.createChart(viewer,800,600);