Program: 100661
Project: 100661
Buggy source:
private void processFile(final FileInfo f){
  currentFile=new File(f.src);
  if (!currentFile.exists()) {
    logger.debug("String_Node_Str" + f.file);
    return;
  }
  outputFile=new File(job.tempDir,f.file.getPath());
  final File outputDir=outputFile.getParentFile();
  if (!outputDir.exists() && !outputDir.mkdirs()) {
    logger.error("String_Node_Str" + outputDir.getAbsolutePath());
    return;
  }
  logger.info("String_Node_Str" + f.src);
  final Set<URI> schemaSet=dic.get(f.uri);
  if (schemaSet != null && !schemaSet.isEmpty()) {
    logger.debug("String_Node_Str");
    subjectSchemeReader.reset();
    for (    final URI schema : schemaSet) {
      subjectSchemeReader.loadSubjectScheme(new File(job.tempDir.toURI().resolve(schema.getPath() + SUBJECT_SCHEME_EXTENSION)));
    }
    validateMap=subjectSchemeReader.getValidValuesMap();
    defaultValueMap=subjectSchemeReader.getDefaultValueMap();
  }
 else {
    validateMap=Collections.EMPTY_MAP;
    defaultValueMap=Collections.EMPTY_MAP;
  }
  if (profilingEnabled) {
    filterUtils=baseFilterUtils.refine(subjectSchemeReader.getSubjectSchemeMap());
  }
  OutputStream out=null;
  try {
    out=new FileOutputStream(outputFile);
    reader.setErrorHandler(new DITAOTXMLErrorHandler(currentFile.getAbsolutePath(),logger));
    final TransformerFactory tf=TransformerFactory.newInstance();
    final Transformer serializer=tf.newTransformer();
    XMLReader xmlSource=getXmlReader(f.format);
    for (    final XMLFilter filter : getProcessingPipe(currentFile.toURI())) {
      filter.setParent(xmlSource);
      xmlSource=filter;
    }
    xmlSource.setContentHandler(null);
    final Source source=new SAXSource(xmlSource,new InputSource(f.src.toString()));
    final Result result=new StreamResult(out);
    serializer.transform(source,result);
  }
 catch (  final RuntimeException e) {
    throw e;
  }
catch (  final Exception e) {
    logger.error(e.getMessage(),e);
  }
 finally {
    if (out != null) {
      try {
        out.close();
      }
 catch (      final Exception e) {
        logger.error(e.getMessage(),e);
      }
    }
  }
  if (isFormatDita(f.format)) {
    f.format=ATTR_FORMAT_VALUE_DITA;
  }
}

Fixed version (ground truth):
private void processFile(final FileInfo f){
  currentFile=f.src;
  if (!exists(currentFile)) {
    logger.debug("String_Node_Str" + f.file);
    return;
  }
  outputFile=new File(job.tempDir,f.file.getPath());
  final File outputDir=outputFile.getParentFile();
  if (!outputDir.exists() && !outputDir.mkdirs()) {
    logger.error("String_Node_Str" + outputDir.getAbsolutePath());
    return;
  }
  logger.info("String_Node_Str" + f.src);
  final Set<URI> schemaSet=dic.get(f.uri);
  if (schemaSet != null && !schemaSet.isEmpty()) {
    logger.debug("String_Node_Str");
    subjectSchemeReader.reset();
    for (    final URI schema : schemaSet) {
      subjectSchemeReader.loadSubjectScheme(new File(job.tempDir.toURI().resolve(schema.getPath() + SUBJECT_SCHEME_EXTENSION)));
    }
    validateMap=subjectSchemeReader.getValidValuesMap();
    defaultValueMap=subjectSchemeReader.getDefaultValueMap();
  }
 else {
    validateMap=Collections.EMPTY_MAP;
    defaultValueMap=Collections.EMPTY_MAP;
  }
  if (profilingEnabled) {
    filterUtils=baseFilterUtils.refine(subjectSchemeReader.getSubjectSchemeMap());
  }
  OutputStream out=null;
  try {
    out=new FileOutputStream(outputFile);
    reader.setErrorHandler(new DITAOTXMLErrorHandler(currentFile.toString(),logger));
    final TransformerFactory tf=TransformerFactory.newInstance();
    final Transformer serializer=tf.newTransformer();
    XMLReader xmlSource=getXmlReader(f.format);
    for (    final XMLFilter filter : getProcessingPipe(currentFile)) {
      filter.setParent(xmlSource);
      xmlSource=filter;
    }
    xmlSource.setContentHandler(null);
    final Source source=new SAXSource(xmlSource,new InputSource(f.src.toString()));
    final Result result=new StreamResult(out);
    serializer.transform(source,result);
  }
 catch (  final RuntimeException e) {
    throw e;
  }
catch (  final Exception e) {
    logger.error(e.getMessage(),e);
  }
 finally {
    if (out != null) {
      try {
        out.close();
      }
 catch (      final Exception e) {
        logger.error(e.getMessage(),e);
      }
    }
  }
  if (isFormatDita(f.format)) {
    f.format=ATTR_FORMAT_VALUE_DITA;
  }
}