@Override
	public FunctionTag createFunctionTag(String name, String comment) {

		lock.acquire();

		try {
			// First make sure a tag doesn't already exist with this name. If it does,
			// just return it.
			FunctionTag tag = getFunctionTag(name);
			if (tag != null) {
				return tag;
			}

			DBRecord record = functionTagAdapter.createTagRecord(name, comment);
			tag = getFunctionTagFromCache(record);
			fireTagCreatedNotification(ProgramEvent.FUNCTION_TAG_CREATED, tag);

			return tag;
		}
		catch (IOException e) {
			dbError(e);
		}
		finally {
			lock.release();
		}

		return null;
	}
Constructor.

@param handle handle to database
@param openMode either READ_ONLY, UPDATE, or UPGRADE
@param lock the program synchronization lock
@param monitor the task monitor to use while upgrading.
@throws VersionException if the database is incompatible with the current
schema
@throws IOException if there is a problem accessing the database.
@throws CancelledException if the program loading is cancelled
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/function/FunctionTagManagerDB.java