[Demonstration 1]

[Buggy Method]
private void createTheme(@NotNull Project project, Module module) {
    String[] commands = { "echo", "0", "|", "php", "bin/plugin", "devtools", "new-theme", "--name", themeData.getName(), "--description", themeData.getDescription(), "--developer", themeData.getDeveloper(), "--email", themeData.getEmail() };
    GravProjectSettings settings = GravProjectSettings.getInstance(project);
    ModuleRootManager root = ModuleRootManager.getInstance(module);
    VirtualFile srcFile = null;
    for (VirtualFile file : root.getSourceRoots()) {
        if (file.isDirectory() && file.getName().contentEquals("src")) {
            srcFile = file;
            break;
        }
    }
    if (srcFile == null) {
        if (settings.withSrcDirectory) {
            NotificationHelper.showBaloon("No source root found in module '" + module.getName() + "'", MessageType.ERROR, project);
            return;
        } else {
            srcFile = FileCreateUtil.getParentDirectory(module.getModuleFile(), module.getName());
        }
    }
    VirtualFile finalSrcFile = srcFile;
    ProcessUtils processUtils = new ProcessUtils(commands, new File(finalSrcFile.getPath()));
    Task.Backgroundable t = new Task.Backgroundable(project, "Create New Grav Theme in Module '" + module.getName() + "'") {

        @Override
        public boolean shouldStartInBackground() {
            return true;
        }

        @Override
        public void onSuccess() {
            super.onSuccess();
            String output = processUtils.getOutputAsString();
            if (processUtils.getErrorOutput() != null) {
                NotificationHelper.showBaloon(processUtils.getErrorOutput(), MessageType.ERROR, project);
            } else {
                NotificationHelper.showBaloon("Theme '" + themeData.getName() + "' was created", MessageType.INFO, project);
            }
        }

        @Override
        public void run(@NotNull ProgressIndicator indicator) {
            processUtils.execute();
        }
    };
    ProgressManager.getInstance().run(t);
}

[Buggy Hunk]
if (settings.withSrcDirectory) {

[Patch]
if (settings != null && settings.withSrcDirectory) {

[Demonstration 2]

[Buggy Method]
@Override
public MultiBranchProjectFactory newInstance() {
    return new WorkflowMultiBranchProjectFactory(new WorkflowBranchProjectFactory());
}

[Buggy Hunk]
return new WorkflowMultiBranchProjectFactory(new WorkflowBranchProjectFactory());

[Patch]
return new WorkflowMultiBranchProjectFactory(factory != null ? factory : new WorkflowBranchProjectFactory());

[Demonstration 3]

[Buggy Method]
public static List<CurrencyCode> getAllBaseCurrencies() {
    return Lists.newArrayList(Iterables.filter(getAllBaseCurrencies(), input -> input.isBaseCurrency()));
}

[Buggy Hunk]
return Lists.newArrayList(Iterables.filter(getAllBaseCurrencies(),

[Patch]
return Lists.newArrayList(Iterables.filter(getAllCurrencies(),