[Demonstration 1]

[Buggy Method]
@Test
public void testBunlde() throws Exception {
    Process process = ConfigurationStore.get().get(EntityType.PROCESS, "clicksummary");
    Cluster cluster = ConfigurationStore.get().get(EntityType.CLUSTER, "corp");
    OozieProcessMapper mapper = new OozieProcessMapper(process);
    Path stagPath = new Path(process.getStagingPath());
    Path bundlePath = mapper.convert(cluster, new Path(hdfsUrl + "/" + stagPath));
    FileSystem fs = new Path(hdfsUrl).getFileSystem(new Configuration());
    assertTrue(fs.exists(bundlePath));
    BUNDLEAPP bundle = getBundle(fs, bundlePath);
    assertEquals(process.getWorkflowName() + "_" + process.getName(), bundle.getName());
    assertEquals(1, bundle.getCoordinator().size());
    assertEquals(process.getWorkflowName() + "_" + process.getName() + "_DEFAULT", bundle.getCoordinator().get(0).getName());
    String coordPath = bundle.getCoordinator().get(0).getAppPath().replace("${nameNode}", "");
    COORDINATORAPP coord = getCoordinator(fs, new Path(coordPath));
    testDefCoordMap(process, coord);
}

[Buggy Hunk]
assertEquals(process.getWorkflowName() + "_" + process.getName() + "_DEFAULT", bundle.getCoordinator().get(0).getName());

[Patch]
assertEquals(process.getWorkflowName() + "_DEFAULT_" + process.getName(), bundle.getCoordinator().get(0).getName());

[Demonstration 2]

[Buggy Method]
public List<WebPageSnapshotContent> getWebPageSnapshotContentSince(String url, long since, String user) throws IOException {
    return convertList(getWebPageSnapshotsSince(url, since, user), WebPageSnapshotContent.class);
}

[Buggy Hunk]
String url, long since, String user) throws IOException {

[Patch]
String url, long since, final String user) throws IOException {

[Demonstration 3]

[Buggy Method]
@Test
public void readWithExternalReference() throws IOException {
    String body = "<!DOCTYPE MyBean SYSTEM \"http://192.168.28.42/1.jsp\" [" + "  <!ELEMENT root ANY >\n" + "  <!ENTITY ext SYSTEM \"" + new ClassPathResource("external.txt", getClass()).getURI() + "\" >]><MyBean><string>&ext;</string></MyBean>";
    MockHttpInputMessage inputMessage = new MockHttpInputMessage(body.getBytes("UTF-8"));
    inputMessage.getHeaders().setContentType(new MediaType("application", "xml"));
    this.thrown.expect(IOException.class);
    this.converter.read(MyBean.class, inputMessage);
}

[Buggy Hunk]
this.thrown.expect(IOException.class);

[Patch]
this.thrown.expect(HttpMessageNotReadableException.class);