code: @CheckForNull
      public static hudson.model.Item getItemOf(@Nonnull SubTask t) {
          Queue.Task p = t.getOwnerTask();
          while (!(p instanceof hudson.model.Item)) {
              Queue.Task o = p.getOwnerTask();
              if (o == p) {
                  break;
              }
              p = o;
          }
          return p instanceof hudson.model.Item ? (hudson.model.Item)p : null;
      }
docs: Gets the {@link hudson.model.Item} most closely associated with the supplied {@link SubTask}.
  @param t the {@link SubTask}.
  @return the {@link hudson.model.Item} associated with the {@link SubTask} or {@code null} if this
  {@link SubTask} is not associated with an {@link hudson.model.Item}
  @since 2.55