[Demonstration 1]

[Buggy Method]
@Override
public void onCreate() {
    super.onCreate();
    SalesforceReactSDKManager.initReactNative(getApplicationContext(), new ReactNativeKeyImpl(), MainActivity.class);
    /*
		 * Uncomment the following line to enable browser based login. This will use a
 		 * Chrome custom tab to login instead of the default WebView. You will also need
		 * to uncomment a few lines of code in SalesforceSDK library project's AndroidManifest.xml.
  		 */
    // SalesforceReactSDKManager.getInstance().setBrowserLoginEnabled(true);
}

[Buggy Hunk]
SalesforceReactSDKManager.initReactNative(getApplicationContext(), new ReactNativeKeyImpl(), MainActivity.class);

[Patch]
SalesforceReactSDKManager.initReactNative(getApplicationContext(), null, MainActivity.class);

[Demonstration 2]

[Buggy Method]
@Override
public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
    if (exc == null) {
        try {
            Files.delete(dir);
            logger.info("Deleted directory: " + dir);
        } catch (IOException e) {
            logger.error("There was an error deleting the directory: " + dir, e);
        }
    }
    return FileVisitResult.CONTINUE;
}

[Buggy Hunk]
if (exc == null) {

[Patch]
if (exc == null && (!innerOnly || !Files.isSameFile(dir, directory))) {

[Demonstration 3]

[Buggy Method]
@OnClick(R.id.uploadButton)
public void onViewClicked() {
    if (NetworkUtil.isInternetAvailable(mContext)) {
        if (photoPaths.size() > 0 && photoPaths != null) {
            customProgressDialog.show();
            String investigationIds = "";
            imageUploadedCount = 0;
            imageUploadFailedCount = 0;
            for (InvestigationData dataObject : investigation) {
                if (dataObject.isSelected() && !dataObject.isUploaded()) {
                    investigationIds = investigationIds + "," + dataObject.getId();
                }
            }
            for (Image image : photoPaths) {
                try {
                    /*UploadNotificationConfig uploadNotificationConfig = new UploadNotificationConfig();
                    uploadNotificationConfig.setTitleForAllStatuses("Document Upload");
                    uploadNotificationConfig.setIconColorForAllStatuses(Color.parseColor("#04abdf"));*/
                    Device device = Device.getInstance(mContext);
                    String baseUrl = Config.BASE_URL;
                    String authorizationString = RescribePreferencesManager.getString(RescribePreferencesManager.RESCRIBE_PREFERENCES_KEY.AUTHTOKEN, mContext);
                    String uploadId = new MultipartUploadRequest(SelectedDocsActivity.this, baseUrl + Config.INVESTIGATION_UPLOAD).//                            .setNotificationConfig(uploadNotificationConfig)
                    setMaxRetries(RescribeConstants.MAX_RETRIES).addHeader(RescribeConstants.AUTHORIZATION_TOKEN, authorizationString).addHeader(RescribeConstants.DEVICEID, device.getDeviceId()).addHeader(RescribeConstants.OS, device.getOS()).addHeader(RescribeConstants.OSVERSION, device.getOSVersion()).addHeader(RescribeConstants.DEVICE_TYPE, device.getDeviceType()).addHeader("imgId", image.getImageId()).addHeader("invId", investigationIds).addFileToUpload(image.getImagePath(), "investigationDoc").setDelegate(SelectedDocsActivity.this).startUpload();
                    CommonMethods.Log("ImagedUploadId", uploadId);
                } catch (Exception exc) {
                    Log.e("AndroidUploadService", exc.getMessage(), exc);
                }
            }
        } else
            CommonMethods.showToast(mContext, "Please select at least one document");
    } else
        CommonMethods.showToast(mContext, getResources().getString(R.string.internet));
}

[Buggy Hunk]
Log.e("AndroidUploadService", exc.getMessage(), exc);

[Patch]
CommonMethods.Log("AndroidUploadService", exc.getMessage());