private boolean validateExportName(final ESide side) throws IOException {
    final File exportBinaryFile = getExportBinaryTargetFile(side);

    if (exportBinaryFile.exists()) {
      String sourceMd5 = diff.getBinExportMD5(side);
      String targetMd5 = exportFilePathToMd5.get(exportBinaryFile.getPath());
      if (targetMd5 == null) {
        targetMd5 = FileUtils.calcMD5(exportBinaryFile);
        exportFilePathToMd5.put(exportBinaryFile.getPath(), targetMd5);
      }

      if (!targetMd5.equals(sourceMd5)) {
        if (side == ESide.PRIMARY && !primaryExportOverwrite.isSelected()) {
          return false;
        }
        return side != ESide.SECONDARY || secondaryExportOverwrite.isSelected();
      }
    }

    return true;
  }
Save dialog for function diff views.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/dialogs/SaveFunctionDiffViewDialog.java