Function adds the keys into the TopDict
@param fdarrayRef OffsetItem for the FDArray
@param fdselectRef OffsetItem for the FDSelect
@param charsetRef OffsetItem for the CharSet
@param charstringsRef OffsetItem for the CharString
772862
protected void CreateKeys(OffsetItem fdarrayRef,OffsetItem fdselectRef,OffsetItem charsetRef,OffsetItem charstringsRef)
	{
	    // create an FDArray key
        OutputList.addLast(fdarrayRef);
        OutputList.addLast(new UInt8Item((char)12));
        OutputList.addLast(new UInt8Item((char)36));
        // create an FDSelect key
        OutputList.addLast(fdselectRef);
        OutputList.addLast(new UInt8Item((char)12));
        OutputList.addLast(new UInt8Item((char)37));
        // create an charset key
        OutputList.addLast(charsetRef);
        OutputList.addLast(new UInt8Item((char)15));
        // create a CharStrings key
        OutputList.addLast(charstringsRef);
        OutputList.addLast(new UInt8Item((char)17));
	}
621337
public void setRdfa(String rdfa) {

        if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(rdfa)) {
            m_rdfa = rdfa.trim();
        } else {
            m_rdfa = rdfa;
        }
    }
402757
static void addQueryParams(Set<Entry<String, Object>> entrySet, StringBuilder buf) {
    // (similar to UrlEncodedContent)
    boolean first = true;
    for (Map.Entry<String, Object> nameValueEntry : entrySet) {
      Object value = nameValueEntry.getValue();
      if (value != null) {
        String name = CharEscapers.escapeUriQuery(nameValueEntry.getKey());
        if (value instanceof Collection<?>) {
          Collection<?> collectionValue = (Collection<?>) value;
          for (Object repeatedValue : collectionValue) {
            first = appendParam(first, buf, name, repeatedValue);
          }
        } else {
          first = appendParam(first, buf, name, value);
        }
      }
    }
  }
45623
private void addValuesToSelection(Selection results, byte key) {
        if (key != DEFAULT_RETURN_VALUE) {
            int i = 0;
            for (byte next : values) {
                if (key == next) {
                    results.add(i);
                }
                i++;
            }
        }
    }
472898
public static StringBuilder appendKeyDqValue(final StringBuilder sb, final String key, final Object value) {
        return sb.append(key).append(Chars.EQ).append(Chars.DQUOTE).append(value).append(Chars.DQUOTE);
    }
894519
public void addItem(String term, Integer offsetStart, Integer offsetEnd,
      Integer posIncr, BytesRef payload, Integer flags) {
    if (!closed) {
      tokenNumber++;
      MtasUpdateRequestProcessorResultItem item = new MtasUpdateRequestProcessorResultItem(
          term, offsetStart, offsetEnd, posIncr, payload, flags);
      try {
        objectOutputStream.writeObject(item);
        objectOutputStream.reset();
        objectOutputStream.flush();
      } catch (IOException e) {
        forceCloseAndDelete();
        log.debug(e);
      }
    }
  }
864884
def makeref2namesdct(name2refdct):
    """"""
    ref2namesdct = {}
    for key, values in name2refdct.items():
        for value in values:
            ref2namesdct.setdefault(value, set()).add(key)
    return ref2namesdct
566890
public function setString($nsKey, $itemKey, $string, $mode)
    {
        $this->prepareCache($nsKey);
        switch ($mode) {
            case self::MODE_WRITE:
                $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_START);
                break;
            case self::MODE_APPEND:
                $fp = $this->getHandle($nsKey, $itemKey, self::POSITION_END);
                break;
            default:
                throw new Swift_SwiftException(
                    'Invalid mode ['.$mode.'] used to set nsKey='.
                    $nsKey.', itemKey='.$itemKey
                    );
                break;
        }
        fwrite($fp, $string);
        $this->freeHandle($nsKey, $itemKey);
    }
135210
@Override
	public void updateRef(final int columnIndex, final Ref x) throws SQLException {
		wrapped.updateRef(columnIndex, x);
	}
231511
public static void appendString(final StringBuffer buf, final String s) {
        buf.append('\"');
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (c == '\n') {
                buf.append("\\n");
            } else if (c == '\r') {
                buf.append("\\r");
            } else if (c == '\\') {
                buf.append("\\\\");
            } else if (c == '"') {
                buf.append("\\\"");
            } else if (c < 0x20 || c > 0x7f) {
                buf.append("\\u");
                if (c < 0x10) {
                    buf.append("000");
                } else if (c < 0x100) {
                    buf.append("00");
                } else if (c < 0x1000) {
                    buf.append('0');
                }
                buf.append(Integer.toString(c, 16));
            } else {
                buf.append(c);
            }
        }
        buf.append('\"');
    }
135004
static void appendKey(Key model, final Key tKey, final Key dtKey, final String tString, final int tree_id) {
    final int selfIdx = H2O.SELF.index();
    new TAtomic<SpeeDRFModel>() {
      @Override public SpeeDRFModel atomic(SpeeDRFModel old) {
        if(old == null) return null;
        return SpeeDRFModel.make(old, tKey, dtKey, selfIdx, tString, tree_id);
      }
    }.invoke(model);
  }
1328619
public void add(OrafileDef def) {
        CaseInsensitiveString name = new CaseInsensitiveString(def.getName());
        {
            List<OrafileVal> list = map.get(name);
            if (list == null) {
                list = new ArrayList<OrafileVal>();
                map.put(name, list);
            }
            list.add(def.getVal());
        }
        list.add(def);
    }
1213405
function CFFDict_setByKey(key, value) {
      if (!(key in this.keyToNameMap)) {
        return false;
      }
      // ignore empty values
      if (value.length === 0) {
        return true;
      }
      var type = this.types[key];
      // remove the array wrapping these types of values
      if (type === 'num' || type === 'sid' || type === 'offset') {
        value = value[0];
      }
      this.values[key] = value;
      return true;
    }
1092215
def vsreenqueue(item_id, item_s, args, **kwargs):
    '''
    '''
    charset = kwargs.get('charset', _c.FSQ_CHARSET)
    if kwargs.has_key('charset'):
        del kwargs['charset']

    kwargs['item_id'] = item_id
    # we coerce here because StringIO.StringIO will coerce on file-write,
    # and cStringIO.StringIO has a bug which injects NULs for unicode
    if isinstance(item_s, unicode):
        try:
            item_s = item_s.encode(charset)
        except UnicodeEncodeError:
            raise FSQCoerceError(errno.EINVAL, u'cannot encode item with'\
                                 u' charset {0}'.format(charset))

    return vreenqueue(StringIO(item_s), item_id, args, **kwargs)
292289
public void put(String key, Character value) {
		if (this.compiledStatement != null) {
			if (value == null) {
				this.compiledStatement.bindNull(compiledStatementBindIndex++);
			} else {
				compiledStatement.bindLong(compiledStatementBindIndex++, Character.getNumericValue(value));
			}
		} else if (values != null) {
			values.put(key, Character.getNumericValue(value));
			return;
		}

		names.add(key);
		// values.put(key, value);
		args.add(value);
		valueType.add(ParamType.CHARACTER);
	}
867848
private void appendClazzColumnForSelect(StringBuffer buf)
    {
        ClassDescriptor cld = getSearchClassDescriptor();
        ClassDescriptor[] clds = getMultiJoinedClassDescriptors(cld);

        if (clds.length == 0)
        {
            return;
        }
        
        buf.append(",CASE");

        for (int i = clds.length; i > 0; i--)
        {
            buf.append(" WHEN ");

            ClassDescriptor subCld = clds[i - 1];
            FieldDescriptor[] fieldDescriptors = subCld.getPkFields();

            TableAlias alias = getTableAliasForClassDescriptor(subCld);
            for (int j = 0; j < fieldDescriptors.length; j++)
            {
                FieldDescriptor field = fieldDescriptors[j];
                if (j > 0)
                {
                    buf.append(" AND ");
                }
                appendColumn(alias, field, buf);
                buf.append(" IS NOT NULL");
            }
            buf.append(" THEN '").append(subCld.getClassNameOfObject()).append("'");
        }
        buf.append(" ELSE '").append(cld.getClassNameOfObject()).append("'");
        buf.append(" END AS " + SqlHelper.OJB_CLASS_COLUMN);
    }
888572
public static String sprintf( String s, int[] params ) {
        if ((s == null) || (params == null)) {
            return s;
        }
        StringBuffer result = new StringBuffer("");
        String[] ss = split(s);
        int p = 0;
        for( int i = 0; i < ss.length; i++ ) {
            char c = ss[i].charAt(0);
            String t = ss[i].substring(1);
            if (c == '+') {
                result.append(t);
            } else {
                int param = params[p];
                result.append(new Format(t).form(param));
                p++;
            }
        }
        return result.toString();
    }