private ExternalLocation addExternal(String name, String namespacePath, Address address, SourceType sourceType,
			String name0, boolean isFunction) throws InvalidInputException, IOException {
		Namespace p = walkNamespace(program.getGlobalNamespace(), namespacePath + "::", address, sourceType, true);
		Library lib = getLibrary(p);
		ExternalLocation loc;
		ExternalManager extManager = program.getExternalManager();
		if (isFunction) {
			if (name0 != null) {
				loc = extManager.addExtFunction(lib == null ? p : lib, name0, address, sourceType, false);
				loc.setName(p, name, sourceType);
			} else {
				loc = extManager.addExtFunction(p, name, address, sourceType, true);
			}
		} else {
			if (name0 != null) {
				loc = extManager.addExtLocation(lib == null ? p : lib, name0, address, sourceType, false);
				loc.setName(p, name, sourceType);
			} else {
				loc = extManager.addExtLocation(p, name, address, sourceType, true);
			}
		}
		return loc;
	}
@param result
@param language
@param overwrite
Ghidra/Features/Sarif/src/main/java/sarif/managers/MarkupSarifMgr.java