public static StackTraceElement[] movePastStackTracePattern(StackTraceElement[] trace,
			String pattern) {

		boolean foundIt = false;
		int desiredStartIndex = 0;
		for (int i = 0; i < trace.length; i++) {

			StackTraceElement element = trace[i];
			boolean matches = matchesAnyPattern(element, pattern);
			if (foundIt && !matches) {
				desiredStartIndex = i;
				break;
			}

			foundIt |= matches;
		}

		if (!foundIt) {
			// never contained the pattern--return the original
			return trace;
		}

		StackTraceElement[] updatedTrace =
			Arrays.copyOfRange(trace, desiredStartIndex, trace.length);
		return updatedTrace;
	}
Finds the first occurrence of the given pattern and then stops filtering when it finds
something that is not that pattern

@param trace the trace to update
@param pattern the non-regex patterns used to perform a
				  {@link String#contains(CharSequence)} on each {@link StackTraceElement} line
@return the updated trace
Ghidra/Framework/Utility/src/main/java/utilities/util/reflection/ReflectionUtilities.java