public static KeyValueList collectQueryDatabaseSpecialistBindings(ControlFrame frame, int firstargindex) {
    { Vector arguments = frame.proposition.arguments;
      KeyValueList bindings = KeyValueList.newKeyValueList();

      { Stella_Object arg = null;
        Vector vector000 = arguments;
        int index000 = 0;
        int length000 = vector000.length();
        int i = Stella.NULL_INTEGER;
        int iter000 = 0;

        for (;index000 < length000; index000 = index000 + 1, iter000 = iter000 + 1) {
          arg = (vector000.theArray)[index000];
          i = iter000;
          if ((i >= firstargindex) &&
              Logic.variableP(arg)) {
            RDBMS.collectVariableBinding(((PatternVariable)(arg)).skolemName.symbolName, Logic.logicalType(arg), Logic.argumentBoundTo(arg), bindings);
          }
        }
      }
      return (bindings);
    }
  }