@Override
	public Parameter getParameter(int ordinal) {
		manager.lock.acquire();
		try {
			checkIsValid();
			if (thunkedFunction != null) {
				Parameter parameter = thunkedFunction.getParameter(ordinal);
				return parameter != null ? adjustThunkThisParameter(parameter) : null;
			}
			if (ordinal == Parameter.RETURN_ORIDINAL) {
				return getReturn();
			}
			if (ordinal < 0) {
				return null;
			}
			loadVariables();
			if (autoParams != null) {
				if (ordinal < autoParams.size()) {
					return autoParams.get(ordinal);
				}
				ordinal -= autoParams.size();
			}
			if (ordinal < params.size()) {
				return params.get(ordinal);
			}
			return null;
		}
		finally {
			manager.lock.release();
		}
	}
Return the Variable for the given symbol.

@param symbol variable symbol
@return Variable which corresponds to specified symbol
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionDB.java