[Demonstration 1]

[Buggy Method]
@Before
public void ensureLatchesAreZero() {
    injector = Guice.createInjector((Module) binder -> {
        binder.bind(ApplicationStartTestJob.class).asEagerSingleton();
        binder.bind(OnTestJob.class).asEagerSingleton();
        binder.bind(EveryTestJob.class).asEagerSingleton();
        binder.bind(DependencyTestJob.class).asEagerSingleton();
        binder.bind(ApplicationStopTestJob.class).asEagerSingleton();
    });
    jobManager = new GuiceJobManager(injector);
}

[Buggy Hunk]
jobManager = new GuiceJobManager(injector);

[Patch]
jobManager = new GuiceJobManager(new TestConfig(), injector);

[Demonstration 2]

[Buggy Method]
private JsonElement parseResponse(InputStream response) throws IOException {
    Reader reader = new InputStreamReader(response, UTF_8);
    try {
        return new JsonParser().parse(reader);
    } catch (JsonSyntaxException jse) {
        throw new IOException(String.format("Couldn't parse response: %n%s", CharStreams.toString(new InputStreamReader(response))), jse);
    } finally {
        reader.close();
    }
}

[Buggy Hunk]
throw new IOException(String.format("Couldn't parse response: %n%s", CharStreams.toString(new InputStreamReader(response))), jse);

[Patch]
throw new IOException(String.format("Couldn't parse response: %n%s", CharStreams.toString(reader)), jse);

[Demonstration 3]

[Buggy Method]
@Override
protected void configure() {
    bind(LoginPage.class).to(LoginAndCreateOnpremAccountPage.class);
    bind(Entrance.class).to(CookieEntrance.class);
}

[Buggy Hunk]
bind(Entrance.class).to(CookieEntrance.class);

[Patch]
bind(Entrance.class).to(OnpremEntranceImpl.class);