Program: 64241
Project: 64241
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 {
  Resource[][] initialResources=grabResources(filesets);
  if (isEmpty(initialResources)) {
    if (emptyBehavior.equals("String_Node_Str")) {
      if (doUpdate) {
        log(archiveType + "String_Node_Str" + zipFile+ "String_Node_Str",Project.MSG_VERBOSE);
      }
 else {
        log("String_Node_Str" + archiveType + "String_Node_Str"+ zipFile+ "String_Node_Str",Project.MSG_WARN);
      }
    }
 else     if (emptyBehavior.equals("String_Node_Str")) {
      throw new BuildException("String_Node_Str" + archiveType + "String_Node_Str"+ zipFile+ "String_Node_Str",getLocation());
    }
 else {
      createEmptyZip(zipFile);
    }
    return initialResources;
  }
  if (!zipFile.exists()) {
    return initialResources;
  }
  if (needsUpdate && !doUpdate) {
    return initialResources;
  }
  Resource[][] newerResources=new Resource[filesets.length][];
  for (int i=0; i < filesets.length; i++) {
    if (!(fileset instanceof ZipFileSet) || ((ZipFileSet)fileset).getSrc() == null) {
      File base=filesets[i].getDir(getProject());
      for (int j=0; j < initialResources[i].length; j++) {
        File resourceAsFile=fileUtils.resolveFile(base,initialResources[i][j].getName());
        if (resourceAsFile.equals(zipFile)) {
          throw new BuildException("String_Node_Str" + "String_Node_Str",getLocation());
        }
      }
    }
  }
  for (int i=0; i < filesets.length; i++) {
    if (initialResources[i].length == 0) {
      newerResources[i]=new Resource[]{};
      continue;
    }
    FileNameMapper myMapper=new IdentityMapper();
    if (filesets[i] instanceof ZipFileSet) {
      ZipFileSet zfs=(ZipFileSet)filesets[i];
      if (zfs.getFullpath() != null && !zfs.getFullpath().equals("String_Node_Str")) {
        MergingMapper fm=new MergingMapper();
        fm.setTo(zfs.getFullpath());
        myMapper=fm;
      }
 else       if (zfs.getPrefix() != null && !zfs.getPrefix().equals("String_Node_Str")) {
        GlobPatternMapper gm=new GlobPatternMapper();
        gm.setFrom("String_Node_Str");
        String prefix=zfs.getPrefix();
        if (!prefix.endsWith("String_Node_Str") && !prefix.endsWith("String_Node_Str")) {
          prefix+="String_Node_Str";
        }
        gm.setTo(prefix + "String_Node_Str");
        myMapper=gm;
      }
    }
    newerResources[i]=ResourceUtils.selectOutOfDateSources(this,initialResources[i],myMapper,getZipScanner());
    needsUpdate=needsUpdate || (newerResources[i].length > 0);
    if (needsUpdate && !doUpdate) {
      break;
    }
  }
  if (needsUpdate && !doUpdate) {
    return initialResources;
  }
  return newerResources;
}

Fixed version (ground truth):
public Resource[][] getResourcesToAdd(){
  return resourcesToAdd;
}