[Demonstration 1]

[Buggy Method]
public OkHttpClient getOkHttpClient() {
    if (okHttpClient == null) {
        OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder().addNetworkInterceptor(new TvdbInterceptor()).authenticator(new TvdbAuthenticator(this));
        okHttpClient = okHttpClientBuilder.build();
    }
    return okHttpClient;
}

[Buggy Hunk]
.addNetworkInterceptor(new TvdbInterceptor()).authenticator(new TvdbAuthenticator(this));

[Patch]
.addNetworkInterceptor(new TvdbInterceptor()).authenticator(new TvdbAuthenticator());

[Demonstration 2]

[Buggy Method]
private Exponent.BundleListener kernelBundleListener() {
    return new Exponent.BundleListener() {

        @Override
        public void onBundleLoaded(final String localBundlePath) {
            if (!BuildConfig.DEBUG) {
                mExponentSharedPreferences.setString(ExponentSharedPreferences.KERNEL_REVISION_ID, getKernelRevisionId());
            }
            Exponent.getInstance().runOnUiThread(new Runnable() {

                @Override
                public void run() {
                    ReactInstanceManagerBuilder builder = ReactInstanceManager.builder().setApplication(mApplicationContext).setJSBundleFile(localBundlePath).addPackage(new MainReactPackage()).addPackage(ExponentPackage.kernelExponentPackage(mExponentManifest.getKernelManifest())).setInitialLifecycleState(LifecycleState.RESUMED);
                    if (!KernelConfig.FORCE_NO_KERNEL_DEBUG_MODE && mExponentManifest.isDebugModeEnabled(mExponentManifest.getKernelManifest())) {
                        if (Exponent.getInstance().shouldRequestDrawOverOtherAppsPermission()) {
                            new AlertDialog.Builder(mActivityContext).setTitle("Please enable \"Permit drawing over other apps\"").setMessage("Click \"ok\" to open settings. Once you've enabled the setting you'll have to restart the app.").setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {

                                public void onClick(DialogInterface dialog, int which) {
                                    Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + mActivityContext.getPackageName()));
                                    mActivityContext.startActivityForResult(intent, KernelConstants.OVERLAY_PERMISSION_REQUEST_CODE);
                                }
                            }).setCancelable(false).show();
                            return;
                        }
                        Exponent.enableDeveloperSupport("UNVERSIONED", mExponentManifest.getKernelManifestField(ExponentManifest.MANIFEST_DEBUGGER_HOST_KEY), mExponentManifest.getKernelManifestField(ExponentManifest.MANIFEST_MAIN_MODULE_NAME_KEY), RNObject.wrap(builder));
                    }
                    mReactInstanceManager = builder.build();
                    mReactInstanceManager.createReactContextInBackground();
                    if (getActivityContext() != null) {
                        // RN expects an activity in some places.
                        mReactInstanceManager.onHostResume(getActivityContext(), null);
                    }
                    mIsRunning = true;
                    EventBus.getDefault().postSticky(new KernelStartedRunningEvent());
                    EXL.d(TAG, "Kernel started running.");
                    // Reset this flag if we crashed
                    mExponentSharedPreferences.setBoolean(ExponentSharedPreferences.SHOULD_NOT_USE_KERNEL_CACHE, false);
                }
            });
        }

        @Override
        public void onError(Exception e) {
            setHasError();
            if (ExpoViewBuildConfig.DEBUG) {
                handleError("Can't load kernel. Are you sure your packager is running and your phone is on the same wifi? " + e.getMessage());
            } else {
                handleError("Expo requires an internet connection.");
                EXL.d(TAG, "Expo requires an internet connection." + e.getMessage());
            }
        }
    };
}

[Buggy Hunk]
if (!BuildConfig.DEBUG) {

[Patch]
if (!ExpoViewBuildConfig.DEBUG) {

[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));