Program: 100777
Project: 100777
Buggy source:
private void updateList(final Map<String,String> changeTable,final Hashtable<String,String> conflictTable,final AbstractPipelineInput input){
  final File tempDir=new File(input.getAttribute(ANT_INVOKER_PARAM_TEMPDIR));
  if (!tempDir.isAbsolute()) {
    throw new IllegalArgumentException("String_Node_Str" + tempDir + "String_Node_Str");
  }
  final File xmlDitalist=new File(tempDir,"String_Node_Str");
  Job job=null;
  try {
    job=new Job(tempDir);
  }
 catch (  final IOException ex) {
    logger.logError(ex.getMessage(),ex);
  }
  final Set<String> hrefTopics=new HashSet<String>();
  for (  final FileInfo f : job.getFileInfo()) {
    if (f.isNonConrefTarget) {
      hrefTopics.add(f.file.getPath());
    }
  }
  for (  final FileInfo f : job.getFileInfo()) {
    if (f.isSkipChunk) {
      final String s=f.file.getPath();
      if (!StringUtils.isEmptyString(s) && getFragment(s) == null) {
        final Iterator<String> hrefit=hrefTopics.iterator();
        while (hrefit.hasNext()) {
          final String ent=hrefit.next();
          if (resolveFile(tempDir.getAbsolutePath(),ent).getPath().equals(resolveFile(tempDir.getAbsolutePath(),s).getPath())) {
            hrefit.remove();
          }
        }
      }
 else       if (!StringUtils.isEmptyString(s) && hrefTopics.contains(s)) {
        hrefTopics.remove(s);
      }
    }
  }
  final Set<String> topicList=new LinkedHashSet<String>(INT_128);
  final Set<String> oldTopicList=new HashSet<String>();
  for (  final FileInfo f : job.getFileInfo()) {
    if (f.isActive && ATTR_FORMAT_VALUE_DITA.equals(f.format)) {
      oldTopicList.add(f.file.getPath());
    }
  }
  for (  String t : hrefTopics) {
    t=stripFragment(t);
    t=getRelativeUnixPath(xmlDitalist.getAbsolutePath(),resolveFile(tempDir.getAbsolutePath(),t).getPath());
    topicList.add(t);
    if (oldTopicList.contains(t)) {
      oldTopicList.remove(t);
    }
  }
  final Set<String> chunkedTopicSet=new LinkedHashSet<String>(INT_128);
  final Set<String> chunkedDitamapSet=new LinkedHashSet<String>(INT_128);
  final Set<String> ditamapList=new HashSet<String>();
  for (  final FileInfo f : job.getFileInfo()) {
    if (f.isActive && ATTR_FORMAT_VALUE_DITAMAP.equals(f.format)) {
      ditamapList.add(f.file.getPath());
    }
  }
  for (  final Map.Entry<String,String> entry : changeTable.entrySet()) {
    final String oldFile=entry.getKey();
    if (entry.getValue().equals(oldFile)) {
      String newChunkedFile=entry.getValue();
      newChunkedFile=getRelativeUnixPath(xmlDitalist.getAbsolutePath(),newChunkedFile);
      final String extName=getExtension(newChunkedFile);
      if (extName != null && !extName.equalsIgnoreCase("String_Node_Str")) {
        chunkedTopicSet.add(newChunkedFile);
        if (!topicList.contains(newChunkedFile)) {
          topicList.add(newChunkedFile);
          if (oldTopicList.contains(newChunkedFile)) {
            oldTopicList.remove(newChunkedFile);
          }
        }
      }
 else {
        if (!ditamapList.contains(newChunkedFile)) {
          ditamapList.add(newChunkedFile);
          if (oldTopicList.contains(newChunkedFile)) {
            oldTopicList.remove(newChunkedFile);
          }
        }
        chunkedDitamapSet.add(newChunkedFile);
      }
    }
  }
  for (  final String s : oldTopicList) {
    if (!StringUtils.isEmptyString(s)) {
      final File f=new File(tempDir,s);
      if (f.exists()) {
        f.delete();
      }
    }
  }
  for (  final Map.Entry<String,String> entry : changeTable.entrySet()) {
    final String oldFile=entry.getKey();
    if (entry.getValue().equals(oldFile)) {
      final String targetPath=conflictTable.get(entry.getKey());
      if (targetPath != null) {
        final File target=new File(targetPath);
        if (!fileExists(target.getAbsolutePath())) {
          final File from=new File(entry.getValue());
          String relativePath=getRelativeUnixPath(xmlDitalist.getAbsolutePath(),from.getAbsolutePath());
          final String relativeTargetPath=getRelativeUnixPath(xmlDitalist.getAbsolutePath(),target.getAbsolutePath());
          if (relativeTargetPath.lastIndexOf(SLASH) != -1) {
            relativePath2fix.put(relativeTargetPath,relativeTargetPath.substring(0,relativeTargetPath.lastIndexOf(SLASH) + 1));
          }
          target.delete();
          from.renameTo(target);
          if (topicList.contains(relativePath)) {
            topicList.remove(relativePath);
          }
          if (chunkedTopicSet.contains(relativePath)) {
            chunkedTopicSet.remove(relativePath);
          }
          relativePath=getRelativeUnixPath(xmlDitalist.getAbsolutePath(),target.getAbsolutePath());
          topicList.add(relativePath);
          chunkedTopicSet.add(relativePath);
        }
 else {
          conflictTable.remove(entry.getKey());
        }
      }
    }
  }
  for (  final FileInfo f : job.getFileInfo()) {
    if (ATTR_FORMAT_VALUE_DITA.equals(f.format) || ATTR_FORMAT_VALUE_DITAMAP.equals(f.format)) {
      f.isActive=false;
    }
  }
  for (  final String file : topicList) {
    final FileInfo ff=job.getOrCreateFileInfo(file);
    ff.format=ATTR_FORMAT_VALUE_DITA;
    ff.isActive=true;
  }
  for (  final String file : ditamapList) {
    final FileInfo ff=job.getOrCreateFileInfo(file);
    ff.format=ATTR_FORMAT_VALUE_DITAMAP;
    ff.isActive=true;
  }
  for (  final String file : chunkedDitamapSet) {
    final FileInfo f=job.getOrCreateFileInfo(file);
    f.format=ATTR_FORMAT_VALUE_DITAMAP;
    f.isResourceOnly=false;
    f.isActive=true;
  }
  for (  final String file : chunkedTopicSet) {
    final FileInfo f=job.getOrCreateFileInfo(file);
    f.format=ATTR_FORMAT_VALUE_DITA;
    f.isResourceOnly=false;
    f.isActive=true;
  }
  try {
    job.write();
  }
 catch (  final IOException ex) {
    logger.logError(ex.getMessage(),ex);
  }
}

Fixed version (ground truth):
private void updateList(final Map<String,String> changeTable,final Hashtable<String,String> conflictTable,final AbstractPipelineInput input){
  final File tempDir=new File(input.getAttribute(ANT_INVOKER_PARAM_TEMPDIR));
  if (!tempDir.isAbsolute()) {
    throw new IllegalArgumentException("String_Node_Str" + tempDir + "String_Node_Str");
  }
  final File xmlDitalist=new File(tempDir,"String_Node_Str");
  Job job=null;
  try {
    job=new Job(tempDir);
  }
 catch (  final IOException ex) {
    logger.logError(ex.getMessage(),ex);
  }
  final Set<String> hrefTopics=new HashSet<String>();
  for (  final FileInfo f : job.getFileInfo()) {
    if (f.isNonConrefTarget) {
      hrefTopics.add(f.file.getPath());
    }
  }
  for (  final FileInfo f : job.getFileInfo()) {
    if (f.isSkipChunk) {
      final String s=f.file.getPath();
      if (!StringUtils.isEmptyString(s) && getFragment(s) == null) {
        final Iterator<String> hrefit=hrefTopics.iterator();
        while (hrefit.hasNext()) {
          final String ent=hrefit.next();
          if (resolveFile(tempDir.getAbsolutePath(),ent).getPath().equals(resolveFile(tempDir.getAbsolutePath(),s).getPath())) {
            hrefit.remove();
          }
        }
      }
 else       if (!StringUtils.isEmptyString(s) && hrefTopics.contains(s)) {
        hrefTopics.remove(s);
      }
    }
  }
  final Set<String> topicList=new LinkedHashSet<String>(INT_128);
  final Set<String> oldTopicList=new HashSet<String>();
  for (  final FileInfo f : job.getFileInfo()) {
    if (f.isActive && ATTR_FORMAT_VALUE_DITA.equals(f.format)) {
      oldTopicList.add(f.file.getPath());
    }
  }
  for (  String t : hrefTopics) {
    t=stripFragment(t);
    t=getRelativePath(xmlDitalist.getAbsolutePath(),resolveFile(tempDir.getAbsolutePath(),t).getPath(),File.separator);
    topicList.add(t);
    if (oldTopicList.contains(t)) {
      oldTopicList.remove(t);
    }
  }
  final Set<String> chunkedTopicSet=new LinkedHashSet<String>(INT_128);
  final Set<String> chunkedDitamapSet=new LinkedHashSet<String>(INT_128);
  final Set<String> ditamapList=new HashSet<String>();
  for (  final FileInfo f : job.getFileInfo()) {
    if (f.isActive && ATTR_FORMAT_VALUE_DITAMAP.equals(f.format)) {
      ditamapList.add(f.file.getPath());
    }
  }
  for (  final Map.Entry<String,String> entry : changeTable.entrySet()) {
    final String oldFile=entry.getKey();
    if (entry.getValue().equals(oldFile)) {
      String newChunkedFile=entry.getValue();
      newChunkedFile=getRelativePath(xmlDitalist.getAbsolutePath(),newChunkedFile,File.separator);
      final String extName=getExtension(newChunkedFile);
      if (extName != null && !extName.equalsIgnoreCase("String_Node_Str")) {
        chunkedTopicSet.add(newChunkedFile);
        if (!topicList.contains(newChunkedFile)) {
          topicList.add(newChunkedFile);
          if (oldTopicList.contains(newChunkedFile)) {
            oldTopicList.remove(newChunkedFile);
          }
        }
      }
 else {
        if (!ditamapList.contains(newChunkedFile)) {
          ditamapList.add(newChunkedFile);
          if (oldTopicList.contains(newChunkedFile)) {
            oldTopicList.remove(newChunkedFile);
          }
        }
        chunkedDitamapSet.add(newChunkedFile);
      }
    }
  }
  for (  final String s : oldTopicList) {
    if (!StringUtils.isEmptyString(s)) {
      final File f=new File(tempDir,s);
      if (f.exists()) {
        f.delete();
      }
    }
  }
  for (  final Map.Entry<String,String> entry : changeTable.entrySet()) {
    final String oldFile=entry.getKey();
    if (entry.getValue().equals(oldFile)) {
      final String targetPath=conflictTable.get(entry.getKey());
      if (targetPath != null) {
        final File target=new File(targetPath);
        if (!fileExists(target.getAbsolutePath())) {
          final File from=new File(entry.getValue());
          String relativePath=getRelativePath(xmlDitalist.getAbsolutePath(),from.getAbsolutePath(),File.separator);
          final String relativeTargetPath=getRelativePath(xmlDitalist.getAbsolutePath(),target.getAbsolutePath(),File.separator);
          if (relativeTargetPath.lastIndexOf(SLASH) != -1) {
            relativePath2fix.put(relativeTargetPath,relativeTargetPath.substring(0,relativeTargetPath.lastIndexOf(SLASH) + 1));
          }
          target.delete();
          from.renameTo(target);
          if (topicList.contains(relativePath)) {
            topicList.remove(relativePath);
          }
          if (chunkedTopicSet.contains(relativePath)) {
            chunkedTopicSet.remove(relativePath);
          }
          relativePath=getRelativePath(xmlDitalist.getAbsolutePath(),target.getAbsolutePath(),File.separator);
          topicList.add(relativePath);
          chunkedTopicSet.add(relativePath);
        }
 else {
          conflictTable.remove(entry.getKey());
        }
      }
    }
  }
  for (  final FileInfo f : job.getFileInfo()) {
    if (ATTR_FORMAT_VALUE_DITA.equals(f.format) || ATTR_FORMAT_VALUE_DITAMAP.equals(f.format)) {
      f.isActive=false;
    }
  }
  for (  final String file : topicList) {
    final FileInfo ff=job.getOrCreateFileInfo(file);
    ff.format=ATTR_FORMAT_VALUE_DITA;
    ff.isActive=true;
  }
  for (  final String file : ditamapList) {
    final FileInfo ff=job.getOrCreateFileInfo(file);
    ff.format=ATTR_FORMAT_VALUE_DITAMAP;
    ff.isActive=true;
  }
  for (  final String file : chunkedDitamapSet) {
    final FileInfo f=job.getOrCreateFileInfo(file);
    f.format=ATTR_FORMAT_VALUE_DITAMAP;
    f.isResourceOnly=false;
    f.isActive=true;
  }
  for (  final String file : chunkedTopicSet) {
    final FileInfo f=job.getOrCreateFileInfo(file);
    f.format=ATTR_FORMAT_VALUE_DITA;
    f.isResourceOnly=false;
    f.isActive=true;
  }
  try {
    job.write();
  }
 catch (  final IOException ex) {
    logger.logError(ex.getMessage(),ex);
  }
}