private void moveIntoFragment(String name, AddressSetView addrs, String fileName) {
		if (fileName != null) {
			ProgramModule module = null;
			int index = rootModule.getIndex(fileName);
			if (index == -1) {
				try {
					module = rootModule.createModule(fileName);
				}
				catch (DuplicateNameException e) {
					Msg.error(this, "Error while moving fragment %s (%s)".formatted(name, addrs),
						e);
					return;
				}
			}
			else {
				Group[] children = rootModule.getChildren();//TODO add a getChildAt(index) method...
				module = (ProgramModule) children[index];
			}
			if (module != null) {
				try {
					ProgramFragment frag = null;
					index = module.getIndex(name);
					if (index == -1) {
						frag = module.createFragment(name);
					}
					else {
						Group[] children = module.getChildren();//TODO add a getChildAt(index) method...
						frag = (ProgramFragment) children[index];
					}
					for (AddressRange rng : addrs.getAddressRanges()) {
						frag.move(rng.getMinAddress(), rng.getMaxAddress());
					}
				}
				catch (NotFoundException e) {
					Msg.error(this, "Error while moving fragment %s (%s)".formatted(name, addrs),
						e);
					return;
				}
				catch (DuplicateNameException e) {
					//TODO: Thrown by createFragment if fragment name exists in any other module
				}
			}
		}
	}
Move an address range into a fragment.
@param name name of the fragment
@param addrs set of addresses that belong to the item
@param fileName source filename that contained the item
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/dwarf/DWARFFunctionImporter.java