[Demonstration 1]

[Buggy Method]
public CommentListBean getCommentLineMsgList(String accountId) {
    CommentListBean result = new CommentListBean();
    List<CommentBean> msgList = new ArrayList<CommentBean>();
    String sql = "select * from " + CommentsTable.TABLE_NAME + " where " + CommentsTable.ACCOUNTID + "  = " + accountId + " order by " + CommentsTable.MBLOGID + " desc";
    Cursor c = rsd.rawQuery(sql, null);
    Gson gson = new Gson();
    while (c.moveToNext()) {
        String json = c.getString(c.getColumnIndex(CommentsTable.JSONDATA));
        try {
            CommentBean value = gson.fromJson(json, CommentBean.class);
            msgList.add(value);
        } catch (JsonSyntaxException e) {
            AppLogger.e(e.getMessage().toString());
        }
    }
    result.setComments(msgList);
    return result;
}

[Buggy Hunk]
AppLogger.e(e.getMessage().toString());

[Patch]
AppLogger.e(e.getMessage());

[Demonstration 2]

[Buggy Method]
void sign_up(String username, String password, String email) {
    ParseUser user = new ParseUser();
    user.setUsername(username);
    user.setPassword(password);
    user.setEmail(email);
    user.put("phone", username);
    user.put("kind", "customer");
    user.put("wants_notification", "yes");
    user.put("is_signed_in", "yes");
    user.signUpInBackground(new SignUpCallback() {

        public void done(ParseException e) {
            if (e == null) {
                ParseInstallation installation = ParseInstallation.getCurrentInstallation();
                installation.put("notification_id", ParseUser.getCurrentUser().getString("phone"));
                installation.saveInBackground(new SaveCallback() {

                    public void done(ParseException e) {
                        Intent intent = new Intent(getBaseContext(), customer_orders.class);
                        startActivity(intent);
                    }
                });
            } else {
                final Button b = (Button) findViewById(R.id.login1);
                b.setEnabled(true);
                alertToast(e.getMessage());
                //Log.d("aaaa:", e.toString());
                //alertToast("Sign-up failed");
            }
        }
    });
}

[Buggy Hunk]
alertToast(e.getMessage());

[Patch]
alertToast(e.getMessage().replace("username", "phone number"));

[Demonstration 3]

[Buggy Method]
@Override
public Instruction execute(ThreadInfo ti) {
    StackFrame frame = ti.getModifiableTopFrame();
    ElementInfo ei = ti.getHeap().get(funcObjRef);
    if (ei == null || ei != lastFuncObj) {
        ClassInfo fiClassInfo;
        // First, resolve the functional interface
        try {
            fiClassInfo = ti.resolveReferencedClass(functionalInterfaceName);
        } catch (LoadOnJPFRequired lre) {
            return ti.getPC();
        }
        if (fiClassInfo.initializeClass(ti)) {
            return ti.getPC();
        }
        ClassInfo enclosingClass = this.getMethodInfo().getClassInfo();
        BootstrapMethodInfo bmi = enclosingClass.getBootstrapMethodInfo(bootstrapMethodIndex);
        VM vm = VM.getVM();
        FunctionObjectFactory funcObjFactory = vm.getFunctionObjectFacotry();
        Object[] freeVariableValues = frame.getArgumentsValues(ti, freeVariableTypes);
        funcObjRef = funcObjFactory.getFunctionObject(bootstrapMethodIndex, ti, fiClassInfo, samMethodName, bmi, freeVariableTypeNames, freeVariableValues);
        lastFuncObj = ti.getHeap().get(funcObjRef);
    }
    frame.pop(freeVariableTypes.length);
    frame.pushRef(funcObjRef);
    return getNext(ti);
}

[Buggy Hunk]
if(ei==null || ei!=lastFuncObj) {

[Patch]
if(ei==null || ei!=lastFuncObj || freeVariableTypes.length>0) {