Repository: NationalSecurityAgency/ghidra
File: Ghidra/Features/Base/src/main/java/ghidra/plugin/importer/ImporterUtilities.java (Java)

Code before:
	}

	/**
	 * Ensure that a {@link Program}'s metadata includes its import origin.
	 *
	 * @param program imported {@link Program} to modify
	 * @param fsrl {@link FSRL} of the import source.
	 * @param monitor {@link TaskMonitor} to use when accessing filesystem stuff.
	 * @throws CancelledException if user cancels
	 * @throws IOException if IO error
	 */
	public static void setProgramProperties(Program program, FSRL fsrl, TaskMonitor monitor)
			throws CancelledException, IOException {
		int id = program.startTransaction("setImportProperties");
		try {
			fsrl = FileSystemService.getInstance().getFullyQualifiedFSRL(fsrl, monitor);

			Options propertyList = program.getOptions(Program.PROGRAM_INFO);
			propertyList.setString(ProgramMappingService.PROGRAM_SOURCE_FSRL, fsrl.toString());
			if ((program.getExecutableMD5() == null || program.getExecutableMD5().isEmpty()) &&
				fsrl.getMD5() != null) {
				program.setExecutableMD5(fsrl.getMD5());
			}
			if ((program.getExecutableSHA256() == null || program.getExecutableSHA256().isEmpty()) &&
				fsrl.getSHA256() != null) {
				program.setExecutableMD5(fsrl.getSHA256());
			}
		}
		finally {
			program.endTransaction(id, true);
		}
		if (program.canSave()) {
			program.save("Added import properties", monitor);
		}
	}

	/**
	 * Displays the appropriate import dialog for the specified {@link FSRL file}.
	 * <p>
	 * If the file is a container of other files, a batch import dialog will be used,
	 * otherwise the normal single file import dialog will be shown.
	 * <p>
	 *
	 * @param fsrl {@link FSRL} of the file to import.
	 * @param destFolder {@link DomainFolder} destination folder where the imported file
	 * will default to.  (the user will be able to choose a different location).
	 * @param suggestedDestinationPath optional string path that will automatically be pre-pended
	 * to the destination filename.
	 * @param tool {@link PluginTool} will be used as the parent tool for dialogs.
	 * @param programManager optional {@link ProgramManager} instance to use to open imported binaries with, or null.
	 */

Review comment (refactor):
This and the line above cause a compilation error (getSHA256 does not exist in FSRL). Also, I think you meant to call setExecutableSHA56, not MD5. I'm actually not certain why we try to populate the MD5 in `ImporterUtilties` at all.... That said, I don't think you need to populate the SHA256 here, either. I think your changes to `AbstractProgramLoader` would be sufficient, even when loaded from a special file system. I recommend deleting this change.

Code after:
	}

	/**
	 * Ensure that a {@link Program}'s metadata includes its import origin.
	 *
	 * @param program imported {@link Program} to modify
	 * @param fsrl {@link FSRL} of the import source.
	 * @param monitor {@link TaskMonitor} to use when accessing filesystem stuff.
	 * @throws CancelledException if user cancels
	 * @throws IOException if IO error
	 */
	public static void setProgramProperties(Program program, FSRL fsrl, TaskMonitor monitor)
			throws CancelledException, IOException {
		int id = program.startTransaction("setImportProperties");
		try {
			fsrl = FileSystemService.getInstance().getFullyQualifiedFSRL(fsrl, monitor);

			Options propertyList = program.getOptions(Program.PROGRAM_INFO);
			propertyList.setString(ProgramMappingService.PROGRAM_SOURCE_FSRL, fsrl.toString());
			if ((program.getExecutableMD5() == null || program.getExecutableMD5().isEmpty()) &&
				fsrl.getMD5() != null) {
				program.setExecutableMD5(fsrl.getMD5());
			}
		}
		finally {
			program.endTransaction(id, true);
		}
		if (program.canSave()) {
			program.save("Added import properties", monitor);
		}
	}

	/**
	 * Displays the appropriate import dialog for the specified {@link FSRL file}.
	 * <p>
	 * If the file is a container of other files, a batch import dialog will be used,
	 * otherwise the normal single file import dialog will be shown.
	 * <p>
	 *
	 * @param fsrl {@link FSRL} of the file to import.
	 * @param destFolder {@link DomainFolder} destination folder where the imported file
	 * will default to.  (the user will be able to choose a different location).
	 * @param suggestedDestinationPath optional string path that will automatically be pre-pended
	 * to the destination filename.
	 * @param tool {@link PluginTool} will be used as the parent tool for dialogs.
	 * @param programManager optional {@link ProgramManager} instance to use to open imported binaries with, or null.
	 */
	public static void showImportDialog(FSRL fsrl, DomainFolder destFolder,
			String suggestedDestinationPath, PluginTool tool, ProgramManager programManager) {

		Component parent = tool.getActiveWindow();