private String createUniqueExportFileName(ESide side) {
    String priName = "";

    if (primaryBinExportFile != null) {
      priName = primaryBinExportFile.getName();
    } else if (primaryIdbFile != null) {
      priName = primaryIdbFile.getName();
    }
    priName = BinDiffFileUtils.removeFileExtension(priName);

    String secName = "";
    if (secondaryBinExportFile != null) {
      secName = secondaryBinExportFile.getName();
    } else if (secondaryIdbFile != null) {
      secName = secondaryIdbFile.getName();
    }
    secName = BinDiffFileUtils.removeFileExtension(secName);

    if (priName.equals(secName)) {
      priName = priName + "_primary";
      secName = secName + "_secondary";
    }

    priName =
        BinDiffFileUtils.forceFilenameEndsWithExtension(
            priName, Constants.BINDIFF_BINEXPORT_EXTENSION);
    secName =
        BinDiffFileUtils.forceFilenameEndsWithExtension(
            secName, Constants.BINDIFF_BINEXPORT_EXTENSION);

    return side == ESide.PRIMARY ? priName : secName;
  }
Class NewDiffImplementation implements the UI flow for adding new .BinDiff results to the
workspace.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/tabpanels/projecttabpanel/implementations/NewDiffImplementation.java