[Demonstration 1]

[Buggy Method]
private void initialize() {
    imgSignupPortrait = (ImageView) findViewById(R.id.imgSignupPortrait);
    imgSignupPortrait.setImageResource(R.drawable.icon_user_default);
    etName = (EditText) findViewById(R.id.etName);
    etUsername = (EditText) findViewById(R.id.etUserName);
    etPassword = (EditText) findViewById(R.id.etPassword);
    etRepeatPassword = (EditText) findViewById(R.id.etRepeatPassword);
    etEmail = (EditText) findViewById(R.id.etEmail);
    etPhone = (EditText) findViewById(R.id.etPhone);
    etTown = (EditText) findViewById(R.id.etTown);
    etStreet = (EditText) findViewById(R.id.etStreet);
    etNumber = (EditText) findViewById(R.id.etNumber);
    etAbout = (EditText) findViewById(R.id.etAbout);
    bCurrentLocation = (Button) findViewById(R.id.bCurrentLocation);
    bCancel = (Button) findViewById(R.id.bCancel);
    bConfirm = (Button) findViewById(R.id.bConfirm);
    bConfirm.setOnClickListener(this);
    bCancel.setOnClickListener(this);
    bCurrentLocation.setOnClickListener(this);
    imgSignupPortrait.setOnClickListener(this);
    Intent i = new Intent(this, MyLocation.class);
    bindService(i, this.myLocServiceConn, 0);
}

[Buggy Hunk]
bindService(i, this.myLocServiceConn, 0);

[Patch]
this.isBound = bindService(i, this.myLocServiceConn, 0);

[Demonstration 2]

[Buggy Method]
@Override
public boolean test(final String input) {
    if (null == input) {
        return false;
    }
    if (ignoreCase) {
        return value.toLowerCase().contains(input.toLowerCase());
    }
    return value.contains(input);
}

[Buggy Hunk]
return value.toLowerCase().contains(input.toLowerCase());

[Patch]
return value.toLowerCase(Locale.ENGLISH).contains(input.toLowerCase(Locale.ENGLISH));

[Demonstration 3]

[Buggy Method]
@Override
protected String parse(String url, BufferedReader reader, Strip strip) throws IOException {
    String str;
    String final_str = null;
    String final_title = null;
    String final_title1 = null;
    String final_itext = null;
    while ((str = reader.readLine()) != null) {
        int index1 = str.indexOf("<img src=\"http://imgs.xkcd.com/comics");
        if (index1 != -1) {
            final_str = str;
            final_itext = str;
        }
        int index3 = str.indexOf("Permanent link to this comic");
        if (index3 != -1) {
            final_title = str;
        }
        if (str.indexOf("<title>") != -1) {
            final_title1 = str;
        }
    }
    final_str = final_str.replaceAll(".*src=\"", "");
    final_str = final_str.replaceAll("\".*", "");
    final_title = final_title.replaceAll(".*.com/", "");
    final_title = final_title.replaceAll("/.*", "");
    final_title1 = final_title1.replaceAll(".*<title>", "");
    final_title1 = final_title1.replaceAll("xkcd: ", "");
    final_title1 = final_title1.replaceAll("</title>.*", "");
    final_itext = final_itext.replaceAll(".*title=\"", "");
    final_itext = final_itext.replaceAll("\" alt.*", "");
    strip.setTitle("Xkcd: " + final_title1 + " : " + final_title);
    strip.setText(final_itext);
    return final_str;
}

[Buggy Hunk]
final_itext = final_itext.replaceAll("\" alt.*","");

[Patch]
final_itext = final_itext.replaceAll("\".*","");