Program: 100863
Project: 100863
Buggy source:
/** 
 * Entry point of chunk module. Starting from map files, it parses and processes chunk attribute, writes out the "chunked" results and finally update references pointing to "chunked" topics in other dita topics.
 * @param input Input parameters and resources.
 * @return null
 * @throws DITAOTException exception
 */
public AbstractPipelineOutput execute(AbstractPipelineInput input) throws DITAOTException {
  String tempDir=((PipelineHashIO)input).getAttribute(Constants.ANT_INVOKER_PARAM_TEMPDIR);
  String ditaext=((PipelineHashIO)input).getAttribute(Constants.ANT_INVOKER_PARAM_DITAEXT);
  String transtype=((PipelineHashIO)input).getAttribute(Constants.ANT_INVOKER_EXT_PARAM_TRANSTYPE);
  DITAOTJavaLogger javaLogger=new DITAOTJavaLogger();
  if (!new File(tempDir).isAbsolute()) {
    String baseDir=((PipelineHashIO)input).getAttribute(Constants.ANT_INVOKER_PARAM_BASEDIR);
    tempDir=new File(baseDir,tempDir).getAbsolutePath();
  }
  File ditalist=new File(tempDir,Constants.FILE_NAME_DITA_LIST);
  File xmlDitalist=new File(tempDir,Constants.FILE_NAME_DITA_LIST_XML);
  ChunkMapReader mapReader=new ChunkMapReader();
  mapReader.setup(ditaext,transtype);
  Properties prop=new Properties();
  try {
    if (xmlDitalist.exists()) {
      prop.loadFromXML(new FileInputStream(xmlDitalist));
    }
 else {
      prop.load(new FileInputStream(ditalist));
    }
  }
 catch (  IOException ioe) {
    throw new DITAOTException(ioe);
  }
  String mapFile=new File(tempDir,prop.getProperty(Constants.INPUT_DITAMAP)).getAbsolutePath();
  try {
    DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
    DocumentBuilder builder=factory.newDocumentBuilder();
    Document doc=builder.parse(mapFile);
    Element root=doc.getDocumentElement();
    if (root.getAttribute(Constants.ATTRIBUTE_NAME_CLASS).contains("String_Node_Str") && transtype.equals(Constants.INDEX_TYPE_ECLIPSEHELP)) {
      StringTokenizer st=new StringTokenizer(prop.getProperty(Constants.FULL_DITAMAP_LIST),Constants.COMMA);
      while (st.hasMoreTokens()) {
        mapFile=new File(tempDir,st.nextToken()).getAbsolutePath();
        mapReader.read(mapFile);
      }
    }
 else {
      mapReader.read(mapFile);
    }
  }
 catch (  Exception e) {
    javaLogger.logException(e);
  }
  Content content=mapReader.getContent();
  if (content.getValue() != null) {
    updateList((LinkedHashMap<String,String>)content.getValue(),mapReader.getConflicTable(),input);
    updateRefOfDita(content,mapReader.getConflicTable(),input);
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Entry point of chunk module. Starting from map files, it parses and processes chunk attribute, writes out the "chunked" results and finally update references pointing to "chunked" topics in other dita topics.
 * @param input Input parameters and resources.
 * @return null
 * @throws DITAOTException exception
 */
public AbstractPipelineOutput execute(AbstractPipelineInput input) throws DITAOTException {
  String tempDir=((PipelineHashIO)input).getAttribute(Constants.ANT_INVOKER_PARAM_TEMPDIR);
  String ditaext=((PipelineHashIO)input).getAttribute(Constants.ANT_INVOKER_PARAM_DITAEXT);
  String transtype=((PipelineHashIO)input).getAttribute(Constants.ANT_INVOKER_EXT_PARAM_TRANSTYPE);
  DITAOTJavaLogger javaLogger=new DITAOTJavaLogger();
  if (!new File(tempDir).isAbsolute()) {
    String baseDir=((PipelineHashIO)input).getAttribute(Constants.ANT_INVOKER_PARAM_BASEDIR);
    tempDir=new File(baseDir,tempDir).getAbsolutePath();
  }
  File ditalist=new File(tempDir,Constants.FILE_NAME_DITA_LIST);
  File xmlDitalist=new File(tempDir,Constants.FILE_NAME_DITA_LIST_XML);
  ChunkMapReader mapReader=new ChunkMapReader();
  mapReader.setup(ditaext,transtype);
  Properties prop=new Properties();
  InputStream in=null;
  try {
    if (xmlDitalist.exists()) {
      in=new FileInputStream(xmlDitalist);
      prop.loadFromXML(in);
    }
 else {
      in=new FileInputStream(ditalist);
      prop.load(in);
    }
  }
 catch (  IOException ioe) {
    throw new DITAOTException(ioe);
  }
 finally {
    if (in != null) {
      try {
        in.close();
      }
 catch (      IOException e) {
        javaLogger.logException(e);
      }
    }
  }
  String mapFile=new File(tempDir,prop.getProperty(Constants.INPUT_DITAMAP)).getAbsolutePath();
  try {
    DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
    DocumentBuilder builder=factory.newDocumentBuilder();
    Document doc=builder.parse(mapFile);
    Element root=doc.getDocumentElement();
    if (root.getAttribute(Constants.ATTRIBUTE_NAME_CLASS).contains("String_Node_Str") && transtype.equals(Constants.INDEX_TYPE_ECLIPSEHELP)) {
      StringTokenizer st=new StringTokenizer(prop.getProperty(Constants.FULL_DITAMAP_LIST),Constants.COMMA);
      while (st.hasMoreTokens()) {
        mapFile=new File(tempDir,st.nextToken()).getAbsolutePath();
        mapReader.read(mapFile);
      }
    }
 else {
      mapReader.read(mapFile);
    }
  }
 catch (  Exception e) {
    javaLogger.logException(e);
  }
  Content content=mapReader.getContent();
  if (content.getValue() != null) {
    updateList((LinkedHashMap<String,String>)content.getValue(),mapReader.getConflicTable(),input);
    updateRefOfDita(content,mapReader.getConflicTable(),input);
  }
  return null;
}