Location () { // getting location from the event set is much faster than obtaining the frame and getting it from there if (myEventSet != null) { LocatableEvent event = StreamEx.of(myEventSet).select(LocatableEvent.class).findFirst().orElse(null); if (event != null) { if (myThread != null && !myThread.getThreadReference().equals(event.thread())) { LOG.error("Invalid thread"); } return event.location(); } } try { StackFrameProxyImpl frameProxy = getFrameProxy(); return frameProxy != null ? frameProxy.location() : null; } catch (Throwable e) { LOG.debug(e); } return null; }