code: private static void maybeSetTextbox(final QueryString qs,
                                        final String key,
                                        final TextBox tb) {
      final ArrayList<String> values = qs.get(key);
      if (values == null) {
        tb.setText("");
        return;
      }
      tb.setText(values.get(0));
    }
docs: Maybe sets the text of a {@link TextBox} from a query string parameter.
  @param qs A parsed query string.
  @param key Name of the query string parameter.
  If this parameter wasn't passed, the {@link TextBox} will be emptied.
  @param tb The {@link TextBox} to change.