Program: 10807
Project: 10807
Buggy source:
public void generatePartialWarFile(Set<String> knownResourceNames){
  Iterable<Entry> localEntries=getEntries();
  Map<String,AbstractModuleResourceEntryAdapter> missingChangedEntries=new HashMap<String,AbstractModuleResourceEntryAdapter>();
  Set<IModuleResource> missingChangedResources=new HashSet<IModuleResource>();
  for (  Entry entry : localEntries) {
    if (entry.isDirectory() || !knownResourceNames.contains(entry.getName())) {
      missingChangedEntries.put(entry.getName(),(AbstractModuleResourceEntryAdapter)entry);
      missingChangedResources.add(((AbstractModuleResourceEntryAdapter)entry).getResource());
    }
  }
  try {
    File partialWar=CloudUtil.createWarFile(getModuleResources(),getModule(),missingChangedResources,null);
    if (partialWar.exists()) {
      fileName=partialWar.getName();
      ZipFile zipPartialWar=new ZipFile(partialWar);
      Enumeration<? extends ZipEntry> zipEntries=zipPartialWar.entries();
      List<Entry> toDeploy=new ArrayList<ApplicationArchive.Entry>();
      while (zipEntries.hasMoreElements()) {
        ZipEntry zipEntry=zipEntries.nextElement();
        AbstractModuleResourceEntryAdapter archiveEntry=missingChangedEntries.get(zipEntry.getName());
        if (archiveEntry != null) {
          DeployedResourceEntry deployedResourcesEntry=archiveEntry instanceof ZipModuleFileEntryAdapter ? ((ZipModuleFileEntryAdapter)archiveEntry).getDeployedResourcesEntry() : null;
          toDeploy.add(new PartialZipEntryAdapter(deployedResourcesEntry,zipEntry,zipPartialWar));
        }
      }
      entries=toDeploy;
    }
  }
 catch (  CoreException e) {
    CloudFoundryPlugin.logError(e);
  }
catch (  ZipException e) {
    CloudFoundryPlugin.logError(e);
  }
catch (  IOException e) {
    CloudFoundryPlugin.logError(e);
  }
}

Fixed version (ground truth):
public void generatePartialWarFile(Set<String> knownResourceNames){
  Iterable<Entry> localEntries=getEntries();
  Map<String,AbstractModuleResourceEntryAdapter> missingChangedEntries=new HashMap<String,AbstractModuleResourceEntryAdapter>();
  Set<IModuleResource> missingChangedResources=new HashSet<IModuleResource>();
  for (  Entry entry : localEntries) {
    if (entry.isDirectory() || !knownResourceNames.contains(entry.getName())) {
      missingChangedEntries.put(entry.getName(),(AbstractModuleResourceEntryAdapter)entry);
      missingChangedResources.add(((AbstractModuleResourceEntryAdapter)entry).getResource());
    }
  }
  try {
    File partialWar=CloudUtil.createWarFile(getModuleResources(),getModule(),missingChangedResources,null);
    if (partialWar.exists()) {
      fileName=partialWar.getName();
      ZipFile zipPartialWar=new ZipFile(partialWar);
      Enumeration<? extends ZipEntry> zipEntries=zipPartialWar.entries();
      List<Entry> toDeploy=new ArrayList<ApplicationArchive.Entry>();
      while (zipEntries.hasMoreElements()) {
        ZipEntry zipEntry=zipEntries.nextElement();
        AbstractModuleResourceEntryAdapter archiveEntry=missingChangedEntries.get(zipEntry.getName());
        if (archiveEntry != null) {
          DeployedResourceEntry deployedResourcesEntry=archiveEntry instanceof ZipModuleFileEntryAdapter ? ((ZipModuleFileEntryAdapter)archiveEntry).getDeployedResourcesEntry() : null;
          toDeploy.add(new PartialZipEntryAdapter(deployedResourcesEntry,zipEntry,zipPartialWar));
        }
      }
      entries=toDeploy;
    }
  }
 catch (  CoreException e) {
    CloudFoundryPlugin.log(e);
  }
catch (  ZipException e) {
    CloudFoundryPlugin.logError(e);
  }
catch (  IOException e) {
    CloudFoundryPlugin.logError(e);
  }
}