public Variable getVariable() {
		Function function = program.getFunctionManager().getFunctionAt(functionAddr);
		if (function == null) {
			return null;
		}
		if (isParameter) { // return or parameter
			return function.getParameter(ordinalOrfirstUseOffset);
		}
		if (variableAddress == null || !variableAddress.isVariableAddress()) {
			return null;
		}
		for (Variable var : function.getLocalVariables()) {
			if (var.getFirstUseOffset() == ordinalOrfirstUseOffset &&
				var.getSymbol().getAddress().equals(variableAddress)) {
				return var;
			}
		}
		return null;
	}
Get the variable associated with this variable location
@return associated function variable
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/util/VariableLocation.java