private Address getNextPreviousSameBytes(TaskMonitor monitor, Program program,
			Address startAddress, byte[] bytes, boolean forward) {
		Memory memory = program.getMemory();
		byte[] mask = null; // null signals to use a full mask
		AddressSetView addresses = memory.getAllInitializedAddressSet();
		if (startAddress == null) {
			return null;
		}

		Address endAddress =
			forward ? addresses.getMaxAddress() : addresses.getMinAddress().previous();
		Address matchAddress = memory.findBytes(startAddress, endAddress, bytes,
			mask, forward, monitor);
		return matchAddress;
	}
Navigates to the same byte pattern value under the current code unit.  When negated, the search
will only consider a single byte, as it seems more useful to be able to skip runs of a 
particular byte.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/navigation/NextPreviousSameBytesAction.java