private Variable getVariable(Function function, ProgramLocation currentLocation) {
		if (function == null) {
			return null;
		}
		if (currentLocation instanceof VariableLocation) {
			return ((VariableLocation) currentLocation).getVariable();
		}
		return null;
	}
Get a variable using the current location.
@param function the function
@return null if function is null or if current location is not
a stack variable location.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/function/VariableCommentAction.java