Program: 64239
Project: 64239
Buggy source:
/** 
 * Collect the resources that are newer than the corresponding entries (or missing) in the original archive. <p>If we are going to recreate the archive instead of updating it, all resources should be considered as new, if a single one is.  Because of this, subclasses overriding this method must call <code>super.getResourcesToAdd</code> and indicate with the third arg if they already know that the archive is out-of-date.</p>
 * @param filesets The filesets to grab resources from
 * @param zipFile intended archive file (may or may not exist)
 * @param needsUpdate whether we already know that the archive isout-of-date.  Subclasses overriding this method are supposed to set this value correctly in their call to super.getResourcesToAdd.
 * @return an array of resources to add for each fileset passed in.
 * @exception BuildException if it likes
 */
protected Resource[][] getResourcesToAdd(FileSet[] filesets,File zipFile,boolean needsUpdate) throws BuildException {
  if (zipFile.exists()) {
    try {
      originalManifest=getManifestFromJar(zipFile);
      if (originalManifest == null) {
        log("String_Node_Str",Project.MSG_VERBOSE);
        needsUpdate=true;
      }
 else {
        Manifest mf=createManifest();
        if (!mf.equals(originalManifest)) {
          log("String_Node_Str",Project.MSG_VERBOSE);
          needsUpdate=true;
        }
      }
    }
 catch (    Throwable t) {
      log("String_Node_Str" + t.getMessage(),Project.MSG_WARN);
      needsUpdate=true;
    }
  }
 else {
    needsUpdate=true;
  }
  createEmpty=needsUpdate;
  return super.getResourcesToAdd(filesets,zipFile,needsUpdate);
}

Fixed version (ground truth):
/** 
 * Collect the resources that are newer than the corresponding entries (or missing) in the original archive. <p>If we are going to recreate the archive instead of updating it, all resources should be considered as new, if a single one is.  Because of this, subclasses overriding this method must call <code>super.getResourcesToAdd</code> and indicate with the third arg if they already know that the archive is out-of-date.</p>
 * @param filesets The filesets to grab resources from
 * @param zipFile intended archive file (may or may not exist)
 * @param needsUpdate whether we already know that the archive isout-of-date.  Subclasses overriding this method are supposed to set this value correctly in their call to super.getResourcesToAdd.
 * @return an array of resources to add for each fileset passed in as wellas a flag that indicates whether the archive is uptodate.
 * @exception BuildException if it likes
 */
protected ArchiveState getResourcesToAdd(FileSet[] filesets,File zipFile,boolean needsUpdate) throws BuildException {
  if (zipFile.exists()) {
    try {
      originalManifest=getManifestFromJar(zipFile);
      if (originalManifest == null) {
        log("String_Node_Str",Project.MSG_VERBOSE);
        needsUpdate=true;
      }
 else {
        Manifest mf=createManifest();
        if (!mf.equals(originalManifest)) {
          log("String_Node_Str",Project.MSG_VERBOSE);
          needsUpdate=true;
        }
      }
    }
 catch (    Throwable t) {
      log("String_Node_Str" + t.getMessage(),Project.MSG_WARN);
      needsUpdate=true;
    }
  }
 else {
    needsUpdate=true;
  }
  createEmpty=needsUpdate;
  return super.getResourcesToAdd(filesets,zipFile,needsUpdate);
}