public static void clearBadBookmarks(Program program, Address start, Address end,
			TaskMonitor monitor) throws CancelledException {
		AddressSet set = new AddressSet(start, end);
		program.getBookmarkManager()
				.removeBookmarks(set, BookmarkType.ERROR, Disassembler.ERROR_BOOKMARK_CATEGORY,
					monitor);
	}
Follow code flow and identify address set to be cleared.
If offcut code is encountered, it will be cleared immediately.
@param program
@param firstAddr
@param clearSet code unit areas already decided to clear
@param todoStarts
@param monitor
@return
@throws CancelledException
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/clear/ClearFlowAndRepairCmd.java