private void clearCode(AddressRange range, boolean clearInstructions, boolean clearData)
			throws CancelledException {

		if (clearData && clearInstructions) {
			clearCodeUnits(range);
			return;
		}

		AddressSet set = clearInstructions ? getInstructionRanges(range) : getDataRanges(range);

		for (AddressRange r : set.getAddressRanges()) {
			clearCodeUnits(r);
		}

		// also increment monitor for skipped address
		monitor.incrementProgress(range.getLength() - set.getNumAddresses());
	}
Clears over the given range, <b>clearing only code</b>.  To clear other items,
use {@link #ClearCmd(AddressSetView,ClearOptions)}.

@param view the addresses over which to clear
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/clear/ClearCmd.java