[Demonstration 1]

[Buggy Method]
@Test
public void testDoFnWithNoExtraContext() throws Exception {
    final Invocations invocations = new Invocations("AnonymousClass");
    DoFn<String, String> fn = new DoFn<String, String>() {

        @ProcessElement
        public void processElement(ProcessContext c) throws Exception {
            invocations.wasProcessElementInvoked = true;
            assertSame(c, mockContext);
        }
    };
    assertFalse(DoFnReflector.getSignature(fn.getClass()).processElement.usesSingleWindow());
    checkInvokeProcessElementWorks(fn, invocations);
}

[Buggy Hunk]
assertFalse(DoFnReflector.getSignature(fn.getClass()).processElement.usesSingleWindow());

[Patch]
assertFalse(DoFnReflector.getSignature(fn.getClass()).getProcessElement().usesSingleWindow());

[Demonstration 2]

[Buggy Method]
private int evaluateCommand(@NotNull Command cmd) {
    return dangAfterAction(cmd);
}

[Buggy Hunk]
private int evaluateCommand(@NotNull Command cmd) {

[Patch]
private int evaluateCommand(Command cmd) {

[Demonstration 3]

[Buggy Method]
public void testResultsWithAuth() throws Exception {
    BasicAuthAwareSearchEngine se = new BasicAuthAwareSearchEngine(_searcher, _config);
    Set<SearchMatch> both = unmodifiableSet(ImmutableSet.of(new SearchMatch(true, WIKI_NAME, PAGE_THE_NAME, null), new SearchMatch(true, WIKI_NAME, PAGE_THE_NAME2, null)));
    startRequest(se.getRequestLifecycleAware(), ViewTypeConstants.CTYPE_TEXT, true);
    try {
        assertEquals(both, se.search("content", false, false));
    } finally {
        se.getRequestLifecycleAware().destroy();
    }
    startRequest(se.getRequestLifecycleAware(), ViewTypeConstants.CTYPE_DEFAULT, true);
    try {
        assertEquals(both, se.search("content", false, false));
    } finally {
        se.getRequestLifecycleAware().destroy();
    }
}

[Buggy Hunk]
Set<SearchMatch> both = unmodifiableSet(ImmutableSet.of(new SearchMatch(true, WIKI_NAME, PAGE_THE_NAME, null), new SearchMatch(true, WIKI_NAME, PAGE_THE_NAME2, null)));

[Patch]
Set<SearchMatch> both = unmodifiableSet(ImmutableSet.of(new SearchMatch(true, WIKI_NAME, PAGE_THE_NAME, null), new SearchMatch(true, WIKI_NAME2, PAGE_THE_NAME2, null)));