[Demonstration 1]

[Buggy Method]
@Override
public void deletePassport(HubContext hctx, String id) {
    ClassLoader old = Thread.currentThread().getContextClassLoader();
    try {
        Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
        logger.debug("Deleting device bootstrap: {}", id);
        persister.deleteDevicePassport(new MapDBCollectionPersistenceContext(db), id);
    } finally {
        Thread.currentThread().setContextClassLoader(old);
    }
}

[Buggy Hunk]
persister.deleteDevicePassport(new MapDBCollectionPersistenceContext(db), id);

[Patch]
persister.deleteDevicePassport(new MapDBCollectionPersistenceContext(db), hctx, id);

[Demonstration 2]

[Buggy Method]
@Override
protected void runner() throws Exception {
    Objects.requireNonNull("Cannot create instance of " + scriptClass);
    final Object script = libraryManager.newInstance(scriptClass);
    if (script instanceof ScriptInterface)
        ((ScriptInterface) script).run(variables);
    else if (script instanceof Runnable)
        ((Runnable) script).run();
    else
        throw new IllegalAccessException("Class execution not supported: " + scriptClass);
}

[Buggy Hunk]
final Object script = libraryManager.newInstance(scriptClass);

[Patch]
final Object script = scriptManager.classLoaderManager.newInstance(scriptClass);

[Demonstration 3]

[Buggy Method]
public static void main(String[] args) throws Exception {
    Launcher.setupLogger();
    System.setProperty("skcraftLauncher.killWithoutConfirm", "true");
    final Creator creator = new Creator();
    SwingUtilities.invokeAndWait(() -> {
        UIManager.getDefaults().put("SplitPane.border", BorderFactory.createEmptyBorder());
        SwingHelper.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
        try {
            creator.showWelcome();
        } catch (Exception e) {
            SwingHelper.showErrorDialog(null, "Failed to start the modpack creator program.", "Start Error", e);
        }
    });
}

[Buggy Hunk]
UIManager.getDefaults().put("SplitPane.border", BorderFactory.createEmptyBorder());

[Patch]
SwingHelper.setSwingProperties("Modpack Creator");