private boolean checkForAndAddPrettyPrintedClosureInvocation(StackTraceElement elem, List<StackTraceElement> trace) {
    if (!"doCall".equals(elem.getMethodName())) return false;
    Matcher matcher = CLOSURE_CLASS.matcher(elem.getClassName());
    if (!matcher.matches()) return false;

    trace.add(prettyPrintClosureInvocation(elem, matcher));
    return true;
  }
Filters an exception's stack trace. Removes internal Groovy and Spock methods, and
restores the original names of feature methods (as specified in source code).
Stack trace elements below a feature/fixture method invocation are truncated.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/runtime/StackTraceFilter.java