[Demonstration 1]

[Buggy Method]
private void postRequest(Context context, String url, JSONObject jsonObject, final HttpCallback callback) {
    StringEntity entity = null;
    try {
        entity = new StringEntity(jsonObject.toString());
    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    }
    Log.d("lxk", "url = " + url);
    Log.d("lxk", "param = " + jsonObject.toString());
    entity.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json"));
    mHttpClient.post(context, url, entity, "application/json", new JsonHttpResponseHandler() {

        @Override
        public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) {
            super.onFailure(statusCode, headers, responseString, throwable);
            callback.onError(statusCode, "error");
            Log.d("lxk", "<onFailure> 1 response = " + responseString);
        }

        @Override
        public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONArray errorResponse) {
            // TODO Auto-generated method stub
            super.onFailure(statusCode, headers, throwable, errorResponse);
            callback.onError(statusCode, "error");
            Log.d("lxk", "<onFailure> 2 response = " + errorResponse);
        }

        @Override
        public void onFailure(int statusCode, Header[] headers, Throwable throwable, JSONObject errorResponse) {
            // TODO Auto-generated method stub
            super.onFailure(statusCode, headers, throwable, errorResponse);
            Log.d("lxk", "<onFailure> 3 response = " + errorResponse);
            callback.onError(statusCode, "error");
        }

        @Override
        public void onSuccess(int statusCode, Header[] headers, JSONObject response) {
            super.onSuccess(statusCode, headers, response);
            Log.d("lxk", "<onSuccess>  response = " + response);
            int state = response.optInt(NetConstance.PARAM_STATE);
            String info = response.optString(NetConstance.PARAM_INFO);
            if (state == NetConstance.ERROR_CODE_SUCCESS) {
                callback.onSuccess(response);
            } else {
                callback.onError(state, info);
            }
        }
    });
}

[Buggy Hunk]
entity = new StringEntity(jsonObject.toString());

[Patch]
entity = new StringEntity(jsonObject.toString(),"utf-8");

[Demonstration 2]

[Buggy Method]
@Override
public void onResume() {
    super.onResume();
    mEmotionClickDisposable = mEventBus.get().ofType(EmoticonClickEvent.class).subscribe(event -> {
        mReplyView.getText().replace(mReplyView.getSelectionStart(), mReplyView.getSelectionEnd(), event.getEmoticonEntity());
    });
    RxJavaUtil.disposeIfNotNull(mCacheDisposable);
    mCacheDisposable = null;
    if (!TextUtils.isEmpty(getCacheKey()) && TextUtils.isEmpty(mReplyView.getText())) {
        mCacheDisposable = resumeFromCache(Single.just(getCacheKey()).map(editorDiskCache::get));
    }
}

[Buggy Hunk]
.map(editorDiskCache::get));

[Patch]
.flatMap(key -> RxJavaUtil.neverNull(editorDiskCache.get(key))));

[Demonstration 3]

[Buggy Method]
@Get("json")
public Student loginStudent() {
    if (!RestApp.getInstance().authenticate(getRequest(), getResponse())) {
        throw new NotAuthorizedException();
    }
    String email = "";
    try {
        email = getAttribute("email");
    } catch (Exception e) {
        throw new GenericException("Please provide an email!");
    }
    return ss.getStudent(email);
}

[Buggy Hunk]
email = getAttribute("email");

[Patch]
email = getQueryValue("email");