Program: 13439
Project: 13439
Buggy source:
/** 
 * @throws Exception 
 */
private void run() throws Exception {
  String mapFilepath=commandLine.getOptionValue("String_Node_Str");
  File mapFile=new File(mapFilepath).getAbsoluteFile();
  checkExistsAndCanReadSystemExit(mapFile);
  DitaDxpOptions dxpOptions=new DitaDxpOptions();
  handleCommonDxpOptions(dxpOptions);
  if (!dxpOptions.isQuiet())   System.err.println("String_Node_Str" + mapFile.getAbsolutePath() + "String_Node_Str");
  File outputZipFile=null;
  String outputFilepath=null;
  if (commandLine.hasOption(OUTPUT_OPTION_ONE_CHAR)) {
    outputFilepath=commandLine.getOptionValue(OUTPUT_OPTION_ONE_CHAR);
    outputZipFile=new File(outputFilepath).getAbsoluteFile();
  }
 else {
    File parentDir=mapFile.getParentFile();
    String nameBase=FilenameUtils.getBaseName(mapFile.getName());
    outputZipFile=new File(parentDir,nameBase + DXP_EXTENSION);
  }
  File parentFile=outputZipFile.getParentFile();
  parentFile.mkdirs();
  if (!outputZipFile.getParentFile().canWrite()) {
    throw new RuntimeException("String_Node_Str" + outputZipFile.getAbsolutePath() + "String_Node_Str");
  }
  Document rootMap=null;
  BosConstructionOptions bosOptions=new BosConstructionOptions(log,new HashMap<URI,Document>());
  bosOptions.setQuiet(dxpOptions.isQuiet());
  boolean failOnAddressingFailure=false;
  if (commandLine.hasOption(ADDRESSING_FAILURE_OPTION_ONE_CHAR))   failOnAddressingFailure=true;
  bosOptions.setFailOnAddressResolutionFailure(failOnAddressingFailure);
  setupCatalogs(bosOptions);
  try {
    URL rootMapUrl=mapFile.toURL();
    rootMap=DomUtil.getDomForUri(new URI(rootMapUrl.toExternalForm()),bosOptions);
    Date startTime=TimingUtils.getNowTime();
    DitaBoundedObjectSet mapBos=DitaBosHelper.calculateMapBos(bosOptions,log,rootMap);
    if (!dxpOptions.isQuiet())     System.err.println("String_Node_Str" + TimingUtils.reportElapsedTime(startTime));
    DitaDxpHelper.zipMapBos(mapBos,outputZipFile,dxpOptions);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
  }
}

Fixed version (ground truth):
/** 
 * @throws Exception 
 */
private void run() throws Exception {
  String mapFilepath=commandLine.getOptionValue("String_Node_Str");
  File mapFile=new File(mapFilepath).getAbsoluteFile();
  checkExistsAndCanReadSystemExit(mapFile);
  DitaDxpOptions dxpOptions=new DitaDxpOptions();
  handleCommonBosProcessorOptions(dxpOptions);
  if (!dxpOptions.isQuiet())   System.err.println("String_Node_Str" + mapFile.getAbsolutePath() + "String_Node_Str");
  File outputZipFile=null;
  String outputFilepath=null;
  if (commandLine.hasOption(OUTPUT_OPTION_ONE_CHAR)) {
    outputFilepath=commandLine.getOptionValue(OUTPUT_OPTION_ONE_CHAR);
    outputZipFile=new File(outputFilepath).getAbsoluteFile();
  }
 else {
    File parentDir=mapFile.getParentFile();
    String nameBase=FilenameUtils.getBaseName(mapFile.getName());
    outputZipFile=new File(parentDir,nameBase + DXP_EXTENSION);
  }
  File parentFile=outputZipFile.getParentFile();
  parentFile.mkdirs();
  if (!outputZipFile.getParentFile().canWrite()) {
    throw new RuntimeException("String_Node_Str" + outputZipFile.getAbsolutePath() + "String_Node_Str");
  }
  Document rootMap=null;
  BosConstructionOptions bosOptions=new BosConstructionOptions(log,new HashMap<URI,Document>());
  bosOptions.setQuiet(dxpOptions.isQuiet());
  boolean failOnAddressingFailure=false;
  if (commandLine.hasOption(ADDRESSING_FAILURE_OPTION_ONE_CHAR))   failOnAddressingFailure=true;
  bosOptions.setFailOnAddressResolutionFailure(failOnAddressingFailure);
  setupCatalogs(bosOptions);
  try {
    URL rootMapUrl=mapFile.toURI().toURL();
    rootMap=DomUtil.getDomForUri(new URI(rootMapUrl.toExternalForm()),bosOptions);
    Date startTime=TimingUtils.getNowTime();
    DitaBoundedObjectSet mapBos=DitaBosHelper.calculateMapBos(bosOptions,log,rootMap);
    if (!dxpOptions.isQuiet())     System.err.println("String_Node_Str" + TimingUtils.reportElapsedTime(startTime));
    DitaDxpHelper.zipMapBos(mapBos,outputZipFile,dxpOptions);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
 finally {
  }
}