[Demonstration 1]

[Buggy Method]
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
    AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity());
    dialog.setTitle(R.string.logout_zeeguu_confirmation);
    dialog.setCancelable(true);
    dialog.setPositiveButton(R.string.logout, new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface dialog, int which) {
            callback.getConnectionManager().getAccount().logout();
        }
    });
    dialog.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener() {

        @Override
        public void onClick(DialogInterface dlg, int which) {
            dlg.cancel();
        }
    });
    return dialog.create();
}

[Buggy Hunk]
dialog.setNegativeButton(R.string.button_cancel, new DialogInterface.OnClickListener()

[Patch]
dialog.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener()

[Demonstration 2]

[Buggy Method]
private void showResults(ArrayList<String> results) {
    searchResults.removeAll();
    DefaultListModel listModel = new DefaultListModel();
    results.forEach(listModel::addElement);
    searchResults.setModel(listModel);
}

[Buggy Hunk]
searchResults.removeAll();

[Patch]
resultsLabel.setText("Search Results:\n");

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) throws SQLException {
    Connection conn = DriverManager.getConnection("jdbc:h2:./main");
    () -> {
    }.start();
    Statement stmt = conn.createStatement();
    stmt.execute("CREATE TABLE id IDENTITY, username VARCHAR, address VARCHAR, email VARCHAR");
}

[Buggy Hunk]
().start();

[Patch]
Server.createWebServer().start();