[Demonstration 1]

[Buggy Method]
@Test
public void beforeParamAndAfterParamValidation() {
    fLog = "";
    final Result result = JUnitCore.runClasses(BeforeParamAndAfterParamError.class);
    assertEquals(1, result.getFailureCount());
    assertThat(result.getFailures().get(0).getMessage(), containsString("beforeParam() should be static"));
    assertThat(result.getFailures().get(0).getMessage(), containsString("afterParam() should be public"));
}

[Buggy Hunk]
final Result result = JUnitCore.runClasses(BeforeParamAndAfterParamError.class);

[Patch]
Result result = JUnitCore.runClasses(BeforeParamAndAfterParamError.class);

[Demonstration 2]

[Buggy Method]
@Override
public int compare(Comment o1, Comment o2) {
    return (int) (o2.getCreationTime() - o1.getCreationTime());
}

[Buggy Hunk]
return (int) (o2.getCreationTime() - o1.getCreationTime());

[Patch]
return Long.compare(o1.getCreationTime(), o2.getCreationTime());

[Demonstration 3]

[Buggy Method]
@Test
public void testCmeToAcuoAndBackWithOne() throws IOException {
    List<IrSwap> trades = mapper.fromCmeFile(itrsOne.getContent());
    assertThat(trades.size()).isEqualTo(1);
    String file = mapper.toCmeFile(trades, LocalDate.of(2016, 8, 15));
    assertThat(file).isEqualTo(itrsOne.getContent());
}

[Buggy Hunk]
assertThat(trades.size()).isEqualTo(1);

[Patch]
assertThat(trades.size()).isEqualTo(2);