@Override
	protected void run() throws Exception {
		String md5string = currentProgram.getExecutableMD5();
		if ((md5string == null) || (md5string.length() < 10))
			throw new IOException("Could not get MD5 on file: " + currentProgram.getName());
		String basename = "sigs_" + md5string;
		File file = null;
		// This form of askString will work for both standalone execution or for parallel
		File workingdir = askDirectory("RegressionSignatures:", "Working directory");
		file = new File(workingdir, basename);

		LSHVectorFactory vectorFactory = FunctionDatabase.generateLSHVectorFactory();
		Configuration config = FunctionDatabase.loadConfigurationTemplate("medium_64");
		vectorFactory.set(config.weightfactory, config.idflookup, config.info.settings);
		GenSignatures gensig = new GenSignatures(true);
		gensig.setVectorFactory(vectorFactory);

		List<String> names = new ArrayList<String>();
		names.add("Test Category");
		gensig.addExecutableCategories(names);
		String repo = "ghidra://localhost/repo";
		String path = "/raw";
		gensig.openProgram(this.currentProgram, null, null, null, repo, path);
		FunctionManager fman = currentProgram.getFunctionManager();
		Iterator<Function> iter = fman.getFunctions(true);
		gensig.scanFunctions(iter, fman.getFunctionCount(), monitor);
		FileWriter fwrite = new FileWriter(file);
		DescriptionManager manager = gensig.getDescriptionManager();
		manager.saveXml(fwrite);
		fwrite.close();
	}
This script is used by the unit test BSimServerTest
Ghidra/Features/BSim/other/testscripts/RegressionSignatures.java