public void load(Program program, AddressRange addressRange) throws InvalidInputException {

		// first clear out any current instructions.
		instructions.clear();

		// Do some initial checks on the program and addresses we want to load instructions
		// for.  If these are invalid, no need to proceed.
		if (program == null || addressRange == null || addressRange.getLength() == 0) {
			return;
		}

		// Now we have to use the sleigh logger to parse each of the code units in the 
		// requested address set.
		Listing listing = program.getListing();
		AddressSet addrSet = new AddressSet(addressRange);
		CodeUnitIterator cuIter = listing.getCodeUnits(addrSet, true);

		// Do a quick check to see if we have any valid code units in the selection.  If not,
		// display an error message.
		if (!cuIter.hasNext()) {
			throw new InvalidInputException("No instructions found in selection.");
		}

		TaskLauncher.launch(new LoadInstructionsTask(program, addrSet));

		modelChanged(UpdateType.RELOAD);
	}
Parses the given {@link AddressRange} from the given {@link Program} to
extract all instructions; results are stored in the local
{@link InstructionMetadata} list.

@param program the current program
@param addressRange the addresses to load instructions for
@throws InvalidInputException if there's an error parsing the
            instructions
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/instructionsearch/model/InstructionSearchData.java