[Demonstration 1]

[Buggy Method]
private Alarm select(String column, long id) {
    Cursor cursor = select(null, column, new String[] { Long.toString(id) }, null, null, null);
    AlarmCursorWrapper wrapper = new AlarmCursorWrapper(cursor);
    if (wrapper.moveToFirst()) {
        return wrapper.getAlarm();
    } else {
        throw new SQLException("Failed to select Alarm with id " + id);
    }
}

[Buggy Hunk]
Cursor cursor = select(null, column, new String[]{Long.toString(id)},

[Patch]
Cursor cursor = select(null, column + "=?", new String[]{Long.toString(id)},

[Demonstration 2]

[Buggy Method]
public void setDebugMode(boolean debugMode) {
    DataCenter center = DataCenter.getInstance();
    center.setDebugMode(debugMode);
}

[Buggy Hunk]
public void setDebugMode(boolean debugMode) {

[Patch]
public static void setDebugMode(boolean debugMode) {

[Demonstration 3]

[Buggy Method]
public void connect() {
    String host = control.view.tfSever.getText();
    String name = control.view.tfID.getText();
    if (host.equals(null) || name.equals(null)) {
        return;
    }
    try {
        socket = new Socket(host, PORT);
        in = new Scanner(socket.getInputStream());
        out = new PrintWriter(socket.getOutputStream());
    } catch (UnknownHostException uhe) {
        control.view.errors.setText(uhe.getMessage());
    } catch (IOException ioe) {
        control.view.errors.setText(ioe.getMessage());
    }
    thread = new ReadThread(in, control.view.result);
    thread.setName(name);
    thread.start();
    //change view
    control.view.sendButton.setEnabled(true);
    control.view.sendButton.setContentAreaFilled(true);
    control.view.setTitle(name);
    control.view.connectButton.setText("Disconnect");
    control.view.userInput.setText("");
}

[Buggy Hunk]
if (host.equals(null) || name.equals(null)) {

[Patch]
if (host.equals("") || name.equals("")) {