@Override
	public ProgramFragment createFragment(String fragmentName) throws DuplicateNameException {

		lock.acquire();
		try {
			checkDeleted();
			if (moduleAdapter.getModuleRecord(fragmentName) != null ||
				fragmentAdapter.getFragmentRecord(fragmentName) != null) {
				throw new DuplicateNameException(fragmentName + " already exists");
			}
			DBRecord fragmentRecord = fragmentAdapter.createFragmentRecord(key, fragmentName);
			DBRecord pcRec = parentChildAdapter.addParentChildRecord(key, -fragmentRecord.getKey()); // negative value to indicates fragment
			updateChildCount(1);
			updateOrderField(pcRec, childCount - 1);

			FragmentDB frag = moduleMgr.getFragmentDB(fragmentRecord);
			moduleMgr.fragmentAdded(key, frag);
			return frag;
		}
		catch (IOException e) {
			moduleMgr.dbError(e);
		}
		finally {
			lock.release();
		}
		return null;
	}
Constructor
@param moduleMgr module manager
@param cache ModuleDB cache
@param record database record for this module
@throws IOException if database IO error occurs
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/ModuleDB.java