private void initializeAddressSet() {
		if (searchAddresses == null) {
			searchAddresses = program.getMemory();
		}
		CodeUnit cu = program.getListing().getCodeUnitContaining(startAddress);
		Address start = options.isForward() ? cu.getMinAddress() : searchAddresses.getMinAddress();
		Address end = options.isForward() ? searchAddresses.getMaxAddress() : cu.getMaxAddress();
		if (start.compareTo(end) <= 0) {
			AddressSet restrictedSet = new AddressSet(program, start, end);
			searchAddresses = searchAddresses.intersect(restrictedSet);
		}
		else {
			searchAddresses = new AddressSet();
		}
	}
Constructor
@param tool the tool
@param program current program
@param startLocation location from where to begin searching
@param set address set; may be null
@param options search options
@param monitor progress monitor
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/searchtext/ListingDisplaySearcher.java