[Demonstration 1]

[Buggy Method]
@When("^the client post http post message to Maxx restful service$")
public void the_client_post_http_post_message_to_Maxx_restful_service() throws Throwable {
    httpSaveResponse = restTemplate.postForEntity(getBaseUrl() + "/auditlog", auditLog, String.class);
}

[Buggy Hunk]
httpSaveResponse = restTemplate.postForEntity(getBaseUrl() + "/auditlog", auditLog, String.class);

[Patch]
httpSaveResponse = restTemplate.postForEntity(getBaseUrl() + AUDIT_LOG_URL, auditLog, String.class);

[Demonstration 2]

[Buggy Method]
public ArrayList<JNode> requiredChildren() {
    if (type() == "H") {
        return children;
    }
    ;
    ArrayList<Integer> e = col.getEventualities();
    ArrayList<JNode> r = new ArrayList<JNode>();
    if (col.state_E < 0)
        for (int f : e) {
            JNode c = satisfied_by.get(f);
            if (c != null && r.indexOf(c) == -1 && c != parent)
                r.add(c);
        }
    if (!JNode.use_no_star)
        return r;
    //if (type()!="H") return true;
    e = col.getEventualities_AU();
    for (int f : e) {
        //if (type()=="H" || (f == col.state_E))
        //if ((f == col.state_E) && satsifiedBy_AU(f,-1) == null) {
        JNode c = satisfied_by_AU.get(new Pair(f, -1));
        if (c != null && r.indexOf(c) == -1 && c != parent)
            r.add(c);
        ArrayList<Integer> e2 = col.getEventualities_AU2();
        for (int f2 : e2) {
            c = satisfied_by_AU.get(new Pair(f, f2));
            if (c != null && r.indexOf(c) == -1 && c != parent)
                r.add(c);
        }
    }
    if (r.size() == 0)
        for (JNode c : children) {
            if (!c.col.pruned) {
                r.add(c);
                return r;
            }
        }
    return r;
}

[Buggy Hunk]
JNode c=satisfied_by.get(f);

[Patch]
JNode c=satisfied_by_D.get(f);

[Demonstration 3]

[Buggy Method]
@Override
public void onBackPressed() {
    if ((r == null && Utils.isEmpty(title) && img.equals("")) || (r != null && r.getTitle().equals(title.getText().toString()) && r.getImg().equals(img))) {
        finish();
    } else {
        new AlertDialog.Builder(MyDialog.this).setTitle(getResources().getString(R.string.attention)).setMessage(getResources().getString(R.string.ask_exit) + "?").setPositiveButton(R.string.action_exit_editor, new DialogInterface.OnClickListener() {

            public void onClick(DialogInterface dialog, int whichButton) {
                finish();
            }
        }).setNegativeButton(android.R.string.no, null).show();
    }
}

[Buggy Hunk]
if ((r == null && Utils.isEmpty(title) && img.equals("")) || (r != null && r.getTitle().equals(title.getText().toString()) && r.getImg().equals(img))) {

[Patch]
if (from_notifications || (r == null && Utils.isEmpty(title) && img.equals("")) || (r != null && r.getTitle().equals(title.getText().toString()) && r.getImg().equals(img))) {