### Question:
ProcessThread extends ModelObject { @Override public void toString(PrintStream stream, Mode mode) { state.toString(stream, mode); } protected  ProcessThread(@Nonnull RuntimeType runtime, @Nonnull Builder<?> builder); @Nonnull RuntimeType getRuntime(); @Nonnull String getName(); @CheckForNull Long getId(); @CheckForNull Long getNid(); @CheckForNull Long getTid(); @Nonnull ThreadStatus getStatus(); @CheckForNull Thread.State getState(); Integer getPriority(); boolean isDaemon(); @Nonnull StackTrace getStackTrace(); @CheckForNull ThreadLock getWaitingOnLock(); @CheckForNull ThreadLock getWaitingToLock(); @Nonnull Set<ThreadLock> getAcquiredLocks(); @Nonnull Set<ThreadLock> getAcquiredMonitors(); @Nonnull Set<ThreadLock> getAcquiredSynchronizers(); @Nonnull SetType getBlockedThreads(); @Nonnull SetType getBlockingThreads(); @CheckForNull ThreadType getBlockingThread(); @Nonnull String getHeader(); void printHeader(PrintStream stream, Mode mode); @Override void toString(PrintStream stream, Mode mode); @Override boolean equals(Object rhs); @Override int hashCode(); static @Nonnull Predicate nameIs(final @Nonnull String name); static @Nonnull Predicate nameContains(final @Nonnull Pattern pattern); static @Nonnull Predicate nameContains(final @Nonnull String pattern); static @Nonnull Predicate waitingOnLock(final @Nonnull String className); static @Nonnull Predicate waitingToLock(final @Nonnull String className); static @Nonnull Predicate acquiredLock(final @Nonnull String className); static @Nonnull Predicate evaluating(final @Nonnull String pattern);  }### Answer:
@Test public void printLocksOnCorrectPosionInStackTrace() { String dump = factory.fromStream(Util.resource("jstack/producer-consumer.log")).getThreads().toString(); assertThat(dump, containsString(Util.formatTrace( "at hudson.model.Queue.getItem(Queue.java:719)", "- waiting to lock <0x4063a9378> (a hudson.model.Queue)", "at hudson.model.AbstractProject.getQueueItem(AbstractProject.java:927)" ))); assertThat(dump, containsString(Util.formatTrace( "at hudson.model.Queue.maintain(Queue.java:1106)", "- locked <0x4063a9378> (a hudson.model.Queue)", "at hudson.model.Queue.pop(Queue.java:935)", "- locked <0x4063a9378> (a hudson.model.Queue)", "at hudson.model.Executor.grabJob(Executor.java:297)", "at hudson.model.Executor.run(Executor.java:211)", "- locked <0x4063a9378> (a hudson.model.Queue)" ))); }