public String getDefaultName(StackComponentWrapper stackComponent) {
		int offset = stackComponent.getOffset();
		int paramBaseOffset = getParameterOffset();
		boolean isLocal = growsNegative ? (offset < paramBaseOffset) : (offset >= paramBaseOffset);
		if (isLocal) {
			return SymbolUtilities.getDefaultLocalName(function.getProgram(), offset, 0);
		}
		// NOTE: We really cannot produce good ordinal-based default param names since this does not
		// account for non-stack parameteres
		int index = getParameterIndex(stackComponent);
		if (index >= 0) {
			return STACK_PREFIX + SymbolUtilities.getDefaultParamName(index);
		}
		return UNKNOWN_PREFIX + Integer.toHexString(Math.abs(offset));
	}
Returns the default name for the indicated stack offset.

@param stackComponent stack element
@return the default stack variable name.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/stackeditor/StackFrameDataType.java