Program: 1719
Project: 1719
Buggy source:
@SuppressWarnings("String_Node_Str") private ApplicationArchive processApplicationArchiveFileUpload(ApplicationArchive archive,List<ProcessingEvent> events){
  GlobalSettings settings=modelManager.getGlobalSettings();
  File tempFile=new File(archive.getNewFileUploaded());
  Long size=tempFile.length();
  String pathError=settings.validateTemporaryStoragePath();
  if (pathError != null) {
    logger.error("String_Node_Str" + settings.validateTemporaryStoragePath() + "String_Node_Str",pathError);
    events.add(new MessagesEvent("String_Node_Str" + settings.validateTemporaryStoragePath() + "String_Node_Str"+ pathError));
    return null;
  }
  FileInputStream is=null;
  File destinationFile=null;
  try {
    if (archive.getId() != null) {
      ArchiveFileHelper.maintainFileSystemCleanliness(modelManager,fileManager,archive,events);
    }
    String hashValue=null;
    ApplicationArchive archiveExists=null;
    try {
      is=new FileInputStream(tempFile);
      hashValue=Utils.hashInputStream("String_Node_Str",is);
      archiveExists=modelManager.getModelService().findApplicationArchiveByHashAndAlgorithm(archive.getApplication(),hashValue,"String_Node_Str");
      if (archiveExists != null) {
        if (!tempFile.delete()) {
          String mesg=String.format("String_Node_Str",tempFile.getName());
          logger.error(mesg);
          events.add(new MessagesEvent(mesg));
        }
        return archiveExists;
      }
    }
 catch (    DigestException de) {
      throw new PersistenceException(de);
    }
 finally {
      is.close();
    }
    archive.setHashAlgorithm("String_Node_Str");
    archive.setHash(hashValue);
    destinationFile=archive.getFile(settings.getTemporaryStoragePath());
    if (destinationFile.exists() && !destinationFile.delete()) {
      String mesg=String.format("String_Node_Str",destinationFile.getName());
      logger.error(mesg);
      events.add(new MessagesEvent(mesg));
      if (!tempFile.delete()) {
        mesg=String.format("String_Node_Str",tempFile.getName());
        logger.error(mesg);
        events.add(new MessagesEvent(mesg));
      }
    }
 else     if (tempFile.renameTo(destinationFile)) {
      String mesg=String.format("String_Node_Str",tempFile.getName(),destinationFile.getName());
      logger.debug(mesg);
      events.add(new MessagesEvent(mesg));
      ArchiveFileHelper.unzipFile(modelManager,fileManager,archive,destinationFile,events);
    }
 else {
      String mesg=String.format("String_Node_Str",tempFile.getName(),destinationFile.getName());
      logger.error(mesg);
      events.add(new MessagesEvent(mesg));
      return null;
    }
  }
 catch (  IOException ioe) {
    events.add(new MessagesEvent(ioe.getMessage()));
    return null;
  }
  try {
    archive.setBytesLength(size.intValue());
    ZipFile zipFile=null;
    try {
      zipFile=new ZipFile(destinationFile);
      Integer uncompressedSize=ZipUtils.getUncompressedSize(zipFile).intValue();
      archive.setBytesLengthUncompressed(new Long(uncompressedSize).intValue());
    }
  finally {
      if (zipFile != null) {
        zipFile.close();
      }
    }
  }
 catch (  IOException ioe) {
    logger.error("String_Node_Str",ioe);
    events.add(new MessagesEvent(String.format("String_Node_Str",ioe.getMessage())));
    return null;
  }
  archive.setUrl(ApplicationArchive.URL_TEMPLATE);
  return archive;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private ApplicationArchive processApplicationArchiveFileUpload(ApplicationArchive archive,List<ProcessingEvent> events){
  GlobalSettings settings=modelManager.getGlobalSettings();
  File tempFile=new File(archive.getNewFileUploaded());
  Long size=tempFile.length();
  String pathError=settings.validateTemporaryStoragePath();
  if (pathError != null) {
    logger.error("String_Node_Str" + settings.validateTemporaryStoragePath() + "String_Node_Str",pathError);
    events.add(new MessagesEvent("String_Node_Str" + settings.validateTemporaryStoragePath() + "String_Node_Str"+ pathError));
    return null;
  }
  FileInputStream is=null;
  File destinationFile=null;
  try {
    if (archive.getId() != null) {
      ArchiveFileHelper.maintainFileSystemCleanliness(modelManager,fileManager,archive,events);
    }
    String hashValue=null;
    ApplicationArchive archiveExists=null;
    try {
      is=new FileInputStream(tempFile);
      hashValue=Utils.hashInputStream("String_Node_Str",is);
      archiveExists=modelManager.getModelService().findApplicationArchiveByHashAndAlgorithm(archive.getApplication(),hashValue,"String_Node_Str");
      if (archiveExists != null) {
        if (!tempFile.delete()) {
          String mesg=String.format("String_Node_Str",tempFile.getName());
          logger.error(mesg);
          events.add(new MessagesEvent(mesg));
        }
        return archiveExists;
      }
 else {
        archive=archive.clone();
        archive.setId(null);
      }
    }
 catch (    DigestException de) {
      throw new PersistenceException(de);
    }
 finally {
      is.close();
    }
    archive.setHashAlgorithm("String_Node_Str");
    archive.setHash(hashValue);
    destinationFile=archive.getFile(settings.getTemporaryStoragePath());
    if (destinationFile.exists() && !destinationFile.delete()) {
      String mesg=String.format("String_Node_Str",destinationFile.getName());
      logger.error(mesg);
      events.add(new MessagesEvent(mesg));
      if (!tempFile.delete()) {
        mesg=String.format("String_Node_Str",tempFile.getName());
        logger.error(mesg);
        events.add(new MessagesEvent(mesg));
      }
    }
 else     if (tempFile.renameTo(destinationFile)) {
      String mesg=String.format("String_Node_Str",tempFile.getName(),destinationFile.getName());
      logger.debug(mesg);
      events.add(new MessagesEvent(mesg));
      ArchiveFileHelper.unzipFile(modelManager,fileManager,archive,destinationFile,events);
    }
 else {
      String mesg=String.format("String_Node_Str",tempFile.getName(),destinationFile.getName());
      logger.error(mesg);
      events.add(new MessagesEvent(mesg));
      return null;
    }
  }
 catch (  IOException ioe) {
    events.add(new MessagesEvent(ioe.getMessage()));
    return null;
  }
  try {
    archive.setBytesLength(size.intValue());
    ZipFile zipFile=null;
    try {
      zipFile=new ZipFile(destinationFile);
      Integer uncompressedSize=ZipUtils.getUncompressedSize(zipFile).intValue();
      archive.setBytesLengthUncompressed(new Long(uncompressedSize).intValue());
    }
  finally {
      if (zipFile != null) {
        zipFile.close();
      }
    }
  }
 catch (  IOException ioe) {
    logger.error("String_Node_Str",ioe);
    events.add(new MessagesEvent(String.format("String_Node_Str",ioe.getMessage())));
    return null;
  }
  archive.setUrl(ApplicationArchive.URL_TEMPLATE);
  return archive;
}