[Demonstration 1]

[Buggy Method]
public static Activator doEvolution(Model model, Properties properties) {
    TrainingSet.model = model;
    // Evolve new network
    Activator result = null;
    try {
        Evolver evolver = new Evolver();
        evolver.init(properties);
        evolver.run();
        ActivatorTranscriber transcriber = (ActivatorTranscriber) properties.newObjectProperty(TRANSCRIBER_CLASS_KEY);
        result = transcriber.newActivator(evolver.getChamp());
    } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    return result;
}

[Buggy Hunk]
TrainingSet.model = model;

[Patch]
TrainingSet.model = new Model(model);

[Demonstration 2]

[Buggy Method]
@Test
public void shouldNavigateToHome() throws Exception {
    Model model = Mockito.mock(Model.class);
    String navigateTo = new NavigationController().home(model);
    assertThat(navigateTo, is("home"));
}

[Buggy Hunk]
Model model = Mockito.mock(Model.class);

[Patch]
ModelMap model = new ModelMap();

[Demonstration 3]

[Buggy Method]
private void updateParents(int N, int[][] M) {
    for (int r = 0; r < N; r++) {
        for (int c = r; c < N; c++) {
            if (M[r][c] == 1) {
                if (find(r) != find(c)) {
                    union(r, c);
                }
            }
        }
    }
}

[Buggy Hunk]
union(r, c);

[Patch]
union(r, c, N);