Program: 7599
Project: 7599
Buggy source:
@Test public void testBundler() throws Exception {
  LocationFactory lf=new LocalLocationFactory();
  Location out=lf.create(File.createTempFile("String_Node_Str","String_Node_Str").toURI());
  try {
    Manifest manifest=new Manifest();
    manifest.getMainAttributes().put(ManifestFields.MANIFEST_VERSION,"String_Node_Str");
    manifest.getMainAttributes().put(ManifestFields.MAIN_CLASS,"String_Node_Str");
    manifest.getMainAttributes().put(ManifestFields.PROCESSOR_TYPE,"String_Node_Str");
    manifest.getMainAttributes().put(ManifestFields.SPEC_FILE,"String_Node_Str");
    Location jarfile=lf.create(JarFinder.getJar(WebCrawlApp.class));
    ArchiveBundler bundler=new ArchiveBundler(jarfile);
    bundler.clone(out,manifest,ImmutableMap.of("String_Node_Str",ByteStreams.newInputStreamSupplier("String_Node_Str".getBytes(Charsets.UTF_8))));
    Assert.assertTrue(out.exists());
    JarFile file=new JarFile(new File(out.toURI()));
    Enumeration<JarEntry> entries=file.entries();
    Manifest newManifest=file.getManifest();
    Assert.assertTrue(newManifest.getMainAttributes().get(ManifestFields.MANIFEST_VERSION).equals("String_Node_Str"));
    Assert.assertTrue(newManifest.getMainAttributes().get(ManifestFields.MAIN_CLASS).equals("String_Node_Str"));
    Assert.assertTrue(newManifest.getMainAttributes().get(ManifestFields.PROCESSOR_TYPE).equals("String_Node_Str"));
    Assert.assertTrue(newManifest.getMainAttributes().get(ManifestFields.SPEC_FILE).equals("String_Node_Str"));
    JarResources oldJar=new JarResources(jarfile);
    boolean found_app_json=false;
    while (entries.hasMoreElements()) {
      JarEntry entry=entries.nextElement();
      if (entry.getName().contains("String_Node_Str")) {
        found_app_json=true;
      }
 else       if (!entry.isDirectory() && !entry.getName().equals(JarFile.MANIFEST_NAME)) {
        Assert.assertNotNull(oldJar.getResource(entry.getName()));
      }
    }
    Assert.assertTrue(found_app_json);
  }
  finally {
    out.delete();
  }
}

Fixed version (ground truth):
@Test public void testBundler() throws Exception {
  LocationFactory lf=new LocalLocationFactory();
  Location out=lf.create(File.createTempFile("String_Node_Str","String_Node_Str").toURI());
  try {
    Manifest manifest=new Manifest();
    manifest.getMainAttributes().put(ManifestFields.MANIFEST_VERSION,"String_Node_Str");
    manifest.getMainAttributes().put(ManifestFields.MAIN_CLASS,"String_Node_Str");
    manifest.getMainAttributes().put(ManifestFields.PROCESSOR_TYPE,"String_Node_Str");
    manifest.getMainAttributes().put(ManifestFields.SPEC_FILE,"String_Node_Str");
    Location jarfile=lf.create(JarFinder.getJar(WebCrawlApp.class));
    ArchiveBundler bundler=new ArchiveBundler(jarfile);
    bundler.clone(out,manifest,ImmutableMap.of("String_Node_Str",ByteStreams.newInputStreamSupplier("String_Node_Str".getBytes(Charsets.UTF_8))));
    Assert.assertTrue(out.exists());
    JarFile file=new JarFile(new File(out.toURI()));
    Enumeration<JarEntry> entries=file.entries();
    Manifest newManifest=file.getManifest();
    Assert.assertTrue(newManifest.getMainAttributes().get(ManifestFields.MANIFEST_VERSION).equals("String_Node_Str"));
    Assert.assertTrue(newManifest.getMainAttributes().get(ManifestFields.MAIN_CLASS).equals("String_Node_Str"));
    Assert.assertTrue(newManifest.getMainAttributes().get(ManifestFields.PROCESSOR_TYPE).equals("String_Node_Str"));
    Assert.assertTrue(newManifest.getMainAttributes().get(ManifestFields.SPEC_FILE).equals("String_Node_Str"));
    JarResources oldJar=new JarResources(jarfile);
    boolean foundAppJson=false;
    while (entries.hasMoreElements()) {
      JarEntry entry=entries.nextElement();
      if (entry.getName().contains("String_Node_Str")) {
        foundAppJson=true;
      }
 else       if (!entry.isDirectory() && !entry.getName().equals(JarFile.MANIFEST_NAME)) {
        Assert.assertNotNull(oldJar.getResource(entry.getName()));
      }
    }
    Assert.assertTrue(foundAppJson);
  }
  finally {
    out.delete();
  }
}