private void initializeProgram(Program program, boolean readOnly) {
		if (program == null) {
			return;
		}
		int id = -1;
		if (!readOnly) {
			id = program.startTransaction("Batch Processing");
			AutoAnalysisManager mgr = AutoAnalysisManager.getAnalysisManager(program);
			mgr.initializeOptions();
		}
		openPrograms.put(program, id);
	}
Executes the give command on the program.

@param cmd
           the command to be applied to the program.
@param program
           the program on which the command is to be applied.
Ghidra/Features/Base/src/main/java/ghidra/base/project/GhidraProject.java