@Override
	public Namespace getOrCreateNameSpace(Namespace parent, String name, SourceType source)
			throws DuplicateNameException, InvalidInputException {

		lock.acquire();
		try {

			checkValidNamespaceArgument(parent);

			Symbol namespaceSymbol = getFirstSymbol(name, parent, s -> {
				return s.getSymbolType() == SymbolType.NAMESPACE ||
					s.getSymbolType() == SymbolType.CLASS;
			});

			if (namespaceSymbol != null) {
				return (Namespace) namespaceSymbol.getObject();
			}

			// Note: We know there are no namespaces with the name; do we still have to check for
			//       duplicates?  Assuming yes, as another symbol type may exist with this name.
			NamespaceSymbol s =
				createNamespaceSymbol(name, parent, source, true /*check for duplicates*/);

			return new NamespaceDB(s, namespaceMgr);
		}
		finally {
			lock.release();
		}
	}
Creates variable symbols.
<p>
Note this is not a method defined in the Symbol Table interface. It is intended to be used by
Ghidra program internals.

@param name the name of the variable
@param function the function that contains the variable.
@param type the type of the variable (can only be PARAMETER or LOCAL_VAR)
@param firstUseOffsetOrOrdinal the offset in the function where the variable is first used.
@param storage the VariableStorage (stack, registers, etc.)
@param source the symbol source type (user defined, analysis, etc.)
@return the new VariableSymbol that was created.
@throws DuplicateNameException if there is another variable in this function with that name.
@throws InvalidInputException if the name contains illegal characters (space for example)
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/symbol/SymbolManager.java