private AddressSetView adjustToCodeUnitBoundaries(AddressSetView startSet,
			ProgramLocationActionContext context) {
		Program program = context.getProgram();
		AddressSet newSet = new AddressSet();
		AddressRangeIterator it = startSet.getAddressRanges();
		Listing listing = program.getListing();
		while (it.hasNext()) {
			AddressRange range = it.next();
			newSet.add(range);
			Address start = range.getMinAddress();
			CodeUnit cu = listing.getCodeUnitContaining(start);
			if (cu != null && !cu.getMinAddress().equals(start)) {
				newSet.addRange(cu.getMinAddress(), cu.getMaxAddress());
			}
		}
		return newSet;
	}
<code>getUndefined</code> returns the undefined data associated with the selection
or with the program if there isn't a selection.

@param taskMonitor The task monitor that will monitor task progress.
@return AddressSet the undefined data address set.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/select/qualified/QualifiedSelectionPlugin.java