[Demonstration 1]

[Buggy Method]
private void get_user_info() {
    String jsonString = "{\"id\":" + Integer.toString(id) + "}";
    String msg = RequestHandler.sendPostRequest(Data.url + "/get_user_info", jsonString);
    if (msg == "false") {
        Toast.makeText(getActivity().getApplicationContext(), "连接失败，请检查网络是否连接并重试", Toast.LENGTH_SHORT).show();
    } else {
        try {
            JSONObject jO = new JSONObject(msg);
            if (jO.getInt("status") != 200) {
                Toast.makeText(getActivity().getApplicationContext(), "未找到用户信息！", Toast.LENGTH_SHORT).show();
                return;
            } else {
                nickname = "";
                age = "";
                phone = "";
                gender = "";
                if (!jO.isNull("nickname")) {
                    this.nickname = jO.getString("nickname");
                }
                if (!jO.isNull("age")) {
                    this.age = Integer.toString(jO.getInt("age"));
                }
                if (!jO.isNull("phone")) {
                    this.phone = Integer.toString(jO.getInt("phone"));
                }
                if (!jO.isNull("gender")) {
                    if (jO.getInt("gender") == 0) {
                        this.gender = "男";
                    } else {
                        this.gender = "女";
                    }
                }
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }
}

[Buggy Hunk]
this.phone = Integer.toString(jO.getInt("phone"));

[Patch]
this.phone = jO.getString("phone");

[Demonstration 2]

[Buggy Method]
@Override
public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
    Intent intent = new Intent(cordova.getActivity(), BackgroundAudioPlayerService.class);
    intent.putExtra("action", action);
    if (action.equals(BackgroundAudioPlayer.ACTION_PLAY)) {
        intent.putExtra("audioUrl", args.getString(0));
        intent.putExtra("radioId", args.getInt(1));
        cordova.getActivity().startService(intent);
    } else if (action.equals(BackgroundAudioPlayer.ACTION_STOP)) {
        cordova.getActivity().startService(intent);
    } else if (action.equals(BackgroundAudioPlayer.ACTION_SET_VOLUME)) {
        intent.putExtra("volume", args.getString(0));
        cordova.getActivity().startService(intent);
    } else if (action.equals(BackgroundAudioPlayer.ACTION_GET_STATUS)) {
        if (BackgroundAudioPlayerService.IsPlaying) {
            callbackContext.success(1);
        } else {
            callbackContext.success(0);
        }
    } else if (action.equals(BackgroundAudioPlayer.ACTION_SET_VOLUME)) {
        callbackContext.success(Float.toString(BackgroundAudioPlayerService.CurrentVolume));
    } else if (action.equals(BackgroundAudioPlayer.ACTION_GET_CURRENT_RADIO)) {
        callbackContext.success(BackgroundAudioPlayerService.CurrentRadio);
    }
    return true;
}

[Buggy Hunk]
else if(action.equals(BackgroundAudioPlayer.ACTION_SET_VOLUME)){

[Patch]
else if(action.equals(BackgroundAudioPlayer.ACTION_GET_VOLUME)){

[Demonstration 3]

[Buggy Method]
public static Result service(String ownerName, String projectName, String service, boolean isAdvertise) throws IOException, UnsupportedOperationException, ServletException {
    if (!isSupportedService(service)) {
        return forbidden(String.format("Unsupported service: '%s'", service));
    }
    Project project = Project.findByOwnerAndProjectName(ownerName, projectName);
    if (project == null) {
        return notFound();
    }
    models.User user = UserApp.currentUser();
    if (!isAllowed(project, service)) {
        if (user.isAnonymous()) {
            return BasicAuthAction.unauthorized(response());
        } else {
            // If you want the Git client showing your custom message to
            // the user, the Content-Type should be exact "text/plain"
            // without any parameter. For more details, see the code at
            // https://github.com/git/git/commit/426e70d4a11ce3b4f70636d57c6a0ab16ae08a00#diff-eea0ad565ec5903a11b6023755d491cfR154
            response().setHeader("Content-Type", "text/plain");
            return forbidden(String.format("'%s' has no permission to '%s/%s'.", user.name, ownerName, projectName));
        }
    }
    if (isAdvertise) {
        return ok(RepositoryService.gitAdvertise(project, service, response()));
    } else {
        if (request().body().isMaxSizeExceeded()) {
            return status(REQUEST_ENTITY_TOO_LARGE);
        } else {
            user.visits(project);
            return ok(RepositoryService.gitRpc(project, service, request(), response()));
        }
    }
}

[Buggy Hunk]
user.name, ownerName, projectName));

[Patch]
user.loginId, ownerName, projectName));