XSourcePosition (@NotNull XStackFrame frame, boolean isMainSourceKindPreferred) { if (isMainSourceKindPreferred) { XSourcePosition position = frame.getSourcePosition(); if (position != null) { return position; } } return session.getFrameSourcePosition(frame); }