public static String getUserToSymbolString(Program program, Reference ref) {

		if (ref.isExternalReference()) {
			ExternalLocation extLoc = ((ExternalReference) ref).getExternalLocation();
			return extLoc.getLibraryName() + "::" + extLoc.getLabel();
		}
		long id = ref.getSymbolID();
		Symbol s = (id >= 0) ? program.getSymbolTable().getSymbol(id) : null;
		return (s != null) ? s.getName() : "";
	}
Returns the string representation of the specified reference's "to" symbol.
@param program the program containing the reference
@param ref the reference
@return the "to" symbol for the reference as a meaningful string for the user. 
The empty string, "", is returned if the reference isn't to a symbol.
Ghidra/Features/Base/src/main/java/ghidra/program/util/DiffUtility.java