@Override
	public void setName(String name) throws DuplicateNameException {
		lock.acquire();
		try {
			checkIsValid();
			DBRecord r = fragmentAdapter.getFragmentRecord(name);
			if (r != null) {
				if (key != r.getKey()) {
					throw new DuplicateNameException(name + " already exists");
				}
				return; // no changes
			}
			if (fragmentAdapter.getFragmentRecord(name) != null) {
				throw new DuplicateNameException(name + " already exists");
			}
			String oldName = record.getString(FragmentDBAdapter.FRAGMENT_NAME_COL);
			record.setString(FragmentDBAdapter.FRAGMENT_NAME_COL, name);
			fragmentAdapter.updateFragmentRecord(record);
			moduleMgr.nameChanged(oldName, this);
		}
		catch (IOException e) {
			moduleMgr.dbError(e);

		}
		finally {
			lock.release();
		}
	}
Constructor
@param moduleMgr module manager
@param cache fragment DB cache
@param record fragment record
@param addrSet fragment address set
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/module/FragmentDB.java