@Override
	public boolean applyTo(Program program) {

		Function f = program.getFunctionManager().getFunctionAt(fnEntry);
		if (f == null) {
			status = "Function not found";
			return false;
		}

		Symbol s = program.getSymbolTable().getParameterSymbol(varName, f);
		if (s == null) {
			s = program.getSymbolTable().getLocalVariableSymbol(varName, f);
		}
		if (s == null) {
			status = "Variable not found";
			return false;
		}

		Variable var = (Variable) s.getObject();
		isParm = var instanceof Parameter;
		try {
			var.setName(newName, source);
			return true;
		}
		catch (DuplicateNameException e) {
			status = e.getMessage();
		}
		catch (InvalidInputException e) {
			status = e.getMessage();
		}
		return false;
	}
Constructs a new command to rename a stack/reg variable.
@param fnEntry
@param varName
@param newName
@param source
Ghidra/Features/Base/src/main/java/ghidra/app/cmd/function/SetVariableNameCmd.java