Program: 100853
Project: 100853
Buggy source:
/** 
 * @see org.dita.dost.module.AbstractPipelineModule#execute(org.dita.dost.pipeline.AbstractPipelineInput)
 */
public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException {
  if (logger == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  final Date executeStartTime=TimingUtils.getNowTime();
  final String msg="String_Node_Str";
  fileLogger.logInfo(msg);
  try {
    final String baseDir=input.getAttribute(Constants.ANT_INVOKER_PARAM_BASEDIR);
    String ditavalFile=input.getAttribute(Constants.ANT_INVOKER_PARAM_DITAVAL);
    tempDir=input.getAttribute(Constants.ANT_INVOKER_PARAM_TEMPDIR);
    final String ext=input.getAttribute(Constants.ANT_INVOKER_PARAM_DITAEXT);
    ditaDir=input.getAttribute(Constants.ANT_INVOKER_EXT_PARAM_DITADIR);
    final String transtype=input.getAttribute(Constants.ANT_INVOKER_EXT_PARAM_TRANSTYPE);
    final String setSystemid_tmp=input.getAttribute(Constants.ANT_INVOKER_EXT_PARAN_SETSYSTEMID);
    if (setSystemid_tmp.equals("String_Node_Str")) {
      setSystemid=true;
    }
 else {
      setSystemid=false;
    }
    DitaValReader.initXMLReader(setSystemid);
    inputDir=null;
    extName=ext.startsWith(Constants.DOT) ? ext : (Constants.DOT + ext);
    if (!new File(tempDir).isAbsolute()) {
      tempDir=new File(baseDir,tempDir).getAbsolutePath();
    }
    if (ditavalFile != null && !new File(ditavalFile).isAbsolute()) {
      ditavalFile=new File(baseDir,ditavalFile).getAbsolutePath();
    }
    final ListReader listReader=new ListReader();
    listReader.setLogger(logger);
    listReader.read(null);
    final LinkedList<String> parseList=(LinkedList<String>)listReader.getContent().getCollection();
    inputDir=(String)listReader.getContent().getValue();
    inputMap=new File(inputDir + File.separator + listReader.getInputMap()).getAbsolutePath();
    this.outputSubjectScheme();
    if (!new File(inputDir).isAbsolute()) {
      inputDir=new File(baseDir,inputDir).getAbsolutePath();
    }
    final DitaValReader filterReader=new DitaValReader();
    Content content;
    if (ditavalFile != null) {
      filterReader.read(ditavalFile);
      content=filterReader.getContent();
      FilterUtils.setFilterMap(filterReader.getFilterMap());
    }
 else {
      content=new ContentImpl();
    }
    final DitaWriter fileWriter=new DitaWriter();
    fileWriter.setLogger(fileLogger);
    try {
      final boolean xmlValidate=Boolean.valueOf(input.getAttribute("String_Node_Str"));
      fileWriter.initXMLReader(ditaDir,xmlValidate,setSystemid);
    }
 catch (    final SAXException e) {
      throw new DITAOTException(e.getMessage(),e);
    }
    content.setValue(tempDir);
    fileWriter.setContent(content);
    fileWriter.setExtName(extName);
    fileWriter.setTranstype(transtype);
    String filePathPrefix=null;
    if (inputDir != null) {
      filePathPrefix=inputDir + Constants.STICK;
    }
    final Map<String,Set<String>> dic=readMapFromXML(Constants.FILE_NAME_SUBJECT_DICTIONARY);
    while (!parseList.isEmpty()) {
      final String filename=parseList.removeLast();
      final String message="String_Node_Str" + filename + "String_Node_Str";
      fileLogger.logInfo(message);
      final Set<String> schemaSet=dic.get(filename);
      filterReader.reset();
      if (schemaSet != null) {
        final Iterator<String> iter=schemaSet.iterator();
        while (iter.hasNext()) {
          filterReader.loadSubjectScheme(FileUtils.resolveFile(DebugAndFilterModule.tempDir,iter.next()) + "String_Node_Str");
        }
        if (ditavalFile != null) {
          filterReader.filterReset();
          filterReader.read(ditavalFile);
          FilterUtils.setFilterMap(filterReader.getFilterMap());
        }
 else {
          FilterUtils.setFilterMap(null);
        }
        fileWriter.setValidateMap(filterReader.getValidValuesMap());
        fileWriter.setDefaultValueMap(filterReader.getDefaultValueMap());
      }
 else {
        if (ditavalFile != null) {
          FilterUtils.setFilterMap(filterReader.getFilterMap());
        }
 else {
          FilterUtils.setFilterMap(null);
        }
      }
      if (!new File(inputDir,filename).exists()) {
        System.out.println("String_Node_Str");
        continue;
      }
      fileWriter.write(new StringBuffer().append(filePathPrefix).append(filename).toString());
    }
    updateList(tempDir);
    updateDictionary(tempDir);
    final File xmlListFile=new File(tempDir,Constants.FILE_NAME_DITA_LIST_XML);
    if (xmlListFile.exists()) {
      listReader.read(xmlListFile.getAbsolutePath());
    }
 else {
      listReader.read(new File(tempDir,Constants.FILE_NAME_DITA_LIST).getAbsolutePath());
    }
    performCopytoTask(tempDir,listReader.getCopytoMap());
  }
 catch (  final Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
 finally {
    fileLogger.logInfo("String_Node_Str" + TimingUtils.reportElapsedTime(executeStartTime));
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @see org.dita.dost.module.AbstractPipelineModule#execute(org.dita.dost.pipeline.AbstractPipelineInput)
 */
public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException {
  if (logger == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  final Date executeStartTime=TimingUtils.getNowTime();
  final String msg="String_Node_Str";
  fileLogger.logInfo(msg);
  try {
    final String baseDir=input.getAttribute(Constants.ANT_INVOKER_PARAM_BASEDIR);
    String ditavalFile=input.getAttribute(Constants.ANT_INVOKER_PARAM_DITAVAL);
    tempDir=input.getAttribute(Constants.ANT_INVOKER_PARAM_TEMPDIR);
    final String ext=input.getAttribute(Constants.ANT_INVOKER_PARAM_DITAEXT);
    ditaDir=input.getAttribute(Constants.ANT_INVOKER_EXT_PARAM_DITADIR);
    final String transtype=input.getAttribute(Constants.ANT_INVOKER_EXT_PARAM_TRANSTYPE);
    final String setSystemid_tmp=input.getAttribute(Constants.ANT_INVOKER_EXT_PARAN_SETSYSTEMID);
    if (setSystemid_tmp.equals("String_Node_Str")) {
      setSystemid=true;
    }
 else {
      setSystemid=false;
    }
    DitaValReader.initXMLReader(setSystemid);
    inputDir=null;
    extName=ext.startsWith(Constants.DOT) ? ext : (Constants.DOT + ext);
    if (!new File(tempDir).isAbsolute()) {
      tempDir=new File(baseDir,tempDir).getAbsolutePath();
    }
    if (ditavalFile != null && !new File(ditavalFile).isAbsolute()) {
      ditavalFile=new File(baseDir,ditavalFile).getAbsolutePath();
    }
    final ListReader listReader=new ListReader();
    listReader.setLogger(logger);
    listReader.read(null);
    final LinkedList<String> parseList=(LinkedList<String>)listReader.getContent().getCollection();
    inputDir=(String)listReader.getContent().getValue();
    inputMap=new File(inputDir + File.separator + listReader.getInputMap()).getAbsolutePath();
    this.outputSubjectScheme();
    if (!new File(inputDir).isAbsolute()) {
      inputDir=new File(baseDir,inputDir).getAbsolutePath();
    }
    final DitaValReader filterReader=new DitaValReader();
    Content content;
    if (ditavalFile != null) {
      filterReader.read(ditavalFile);
      content=filterReader.getContent();
      FilterUtils.setFilterMap(filterReader.getFilterMap());
    }
 else {
      content=new ContentImpl();
    }
    final DitaWriter fileWriter=new DitaWriter();
    fileWriter.setLogger(logger);
    try {
      final boolean xmlValidate=Boolean.valueOf(input.getAttribute("String_Node_Str"));
      fileWriter.initXMLReader(ditaDir,xmlValidate,setSystemid);
    }
 catch (    final SAXException e) {
      throw new DITAOTException(e.getMessage(),e);
    }
    content.setValue(tempDir);
    fileWriter.setContent(content);
    fileWriter.setExtName(extName);
    fileWriter.setTranstype(transtype);
    String filePathPrefix=null;
    if (inputDir != null) {
      filePathPrefix=inputDir + Constants.STICK;
    }
    final Map<String,Set<String>> dic=readMapFromXML(Constants.FILE_NAME_SUBJECT_DICTIONARY);
    while (!parseList.isEmpty()) {
      final String filename=parseList.removeLast();
      final String message="String_Node_Str" + filename + "String_Node_Str";
      fileLogger.logInfo(message);
      final Set<String> schemaSet=dic.get(filename);
      filterReader.reset();
      if (schemaSet != null) {
        final Iterator<String> iter=schemaSet.iterator();
        while (iter.hasNext()) {
          filterReader.loadSubjectScheme(FileUtils.resolveFile(DebugAndFilterModule.tempDir,iter.next()) + "String_Node_Str");
        }
        if (ditavalFile != null) {
          filterReader.filterReset();
          filterReader.read(ditavalFile);
          FilterUtils.setFilterMap(filterReader.getFilterMap());
        }
 else {
          FilterUtils.setFilterMap(null);
        }
        fileWriter.setValidateMap(filterReader.getValidValuesMap());
        fileWriter.setDefaultValueMap(filterReader.getDefaultValueMap());
      }
 else {
        if (ditavalFile != null) {
          FilterUtils.setFilterMap(filterReader.getFilterMap());
        }
 else {
          FilterUtils.setFilterMap(null);
        }
      }
      if (!new File(inputDir,filename).exists()) {
        System.out.println("String_Node_Str");
        continue;
      }
      fileWriter.write(new StringBuffer().append(filePathPrefix).append(filename).toString());
    }
    updateList(tempDir);
    updateDictionary(tempDir);
    final File xmlListFile=new File(tempDir,Constants.FILE_NAME_DITA_LIST_XML);
    if (xmlListFile.exists()) {
      listReader.read(xmlListFile.getAbsolutePath());
    }
 else {
      listReader.read(new File(tempDir,Constants.FILE_NAME_DITA_LIST).getAbsolutePath());
    }
    performCopytoTask(tempDir,listReader.getCopytoMap());
  }
 catch (  final Exception e) {
    System.err.println("String_Node_Str");
    e.printStackTrace();
  }
 finally {
    fileLogger.logInfo("String_Node_Str" + TimingUtils.reportElapsedTime(executeStartTime));
  }
  return null;
}