public ProgramModule createRootModule(String treeName) throws DuplicateNameException {

		lock.acquire();
		try {
			if (treeMap.containsKey(treeName)) {
				throw new DuplicateNameException(
					"Root module named " + treeName + " already exists");
			}
			DBRecord record = treeAdapter.createRecord(treeName);
			ModuleManager m = new ModuleManager(this, record, OpenMode.CREATE, TaskMonitor.DUMMY);
			treeMap.put(treeName, m);
			addMemoryBlocks(m);
			if (program != null) {
				// no notification for initial default tree
				program.programTreeAdded(record.getKey(), ProgramEvent.PROGRAM_TREE_CREATED, null,
					treeName);
			}
			return m.getRootModule();
		}
		catch (IOException e) {
			errHandler.dbError(e);
		}
		catch (VersionException | CancelledException e) {
			throw new RuntimeException(e); // unexpected exception
		}
		finally {
			lock.release();
		}
		return null;
	}
Create a new tree with given name.
@param treeName name of the tree (not the root module)
@return root module for the new tree
@throws DuplicateNameException if there is already tree named
treeName
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/TreeManager.java