/*
Append the names of all the elements in the set of resolutions to the
string buffer.  This is only used for error messages.
333640
private <T> void appendNameList(StringBuffer sb,
                                    java.util.Set<T> resolutions,
                                    String sep) {
        for (T oneRes : resolutions) {
            sb.append(sep).append(oneRes.toString());
            sep = ", ";
        }
    }
177963
public static void appendPair(StringBuffer b, String s1, String s2,
                                  String separator, String terminator) {

        b.append(s1);
        b.append(separator);
        b.append(s2);
        b.append(terminator);
    }
1163174
private static Iterable<String> append(final Response res,
        final int length) throws IOException {
        final String header = "Content-Length";
        return new RsWithHeader(
            new RsWithoutHeader(res, header),
            header,
            Integer.toString(length)
        ).head();
    }
1237395
private final void appendContents(StringBuffer buf,
                                      CharacterIterator iterator) {
        int index = iterator.getBeginIndex();
        int end = iterator.getEndIndex();

        while (index < end) {
            iterator.setIndex(index++);
            buf.append(iterator.current());
        }
    }
89455
public void appendNsName(final StringBuilder sb,
                           final QName nm) {
    String uri = nm.getNamespaceURI();
    String abbr;

    if ((defaultNS != null) && uri.equals(defaultNS)) {
      abbr = null;
    } else {
      abbr = keyUri.get(uri);
      if (abbr == null) {
        abbr = uri;
      }
    }

    if (abbr != null) {
      sb.append(abbr);
      sb.append(":");
    }

    sb.append(nm.getLocalPart());
  }
727020
private void appendParams(List<DAParameter> params) throws IOException {
    if (params.isEmpty()) {
      commons.append("()");
      return;
    }

    commons.append("(");
    Iterator<DAParameter> it = params.iterator();
    while (it.hasNext()) {
      DAParameter parameter = it.next();
      commons.appendInlineAnnotations(parameter.getAnnotations());
      commons.appendType(parameter.getType());
      commons.append(" ").append(parameter.getName());
      if (it.hasNext()) {
        commons.append(", ");
      }
    }
    commons.append(")");
  }
129181
def append(self, lines, index=-1):
        """"""
        if isinstance(lines, (basestring, bytes)):
            lines = [lines]
        return self.request('nvim_buf_set_lines', index, index, True, lines)
867765
private static void formatNames(Iterable<List<String>> names) {
    if (names != null) {
      for (List<String> list : names) {
        String name = list.get(0);
        String[] components = new String[5];
        int start = 0;
        int end;
        int componentIndex = 0;
        while (componentIndex < components.length - 1 && (end = name.indexOf(';', start)) >= 0) {
          components[componentIndex] = name.substring(start, end);
          componentIndex++;
          start = end + 1;
        }
        components[componentIndex] = name.substring(start);
        StringBuilder newName = new StringBuilder(100);
        maybeAppendComponent(components, 3, newName);
        maybeAppendComponent(components, 1, newName);
        maybeAppendComponent(components, 2, newName);
        maybeAppendComponent(components, 0, newName);
        maybeAppendComponent(components, 4, newName);
        list.set(0, newName.toString().trim());
      }
    }
  }
865263
@VisibleForTesting
  static void appendSpaces(StringBuilder sb, int numSpaces) {
    if (numSpaces > 16) {
      logger.warning("Tracer.appendSpaces called with large numSpaces");
      // Avoid long loop in case some bug in the caller
      numSpaces = 16;
    }
    while (numSpaces >= 5) {
      sb.append("     ");
      numSpaces -= 5;
    }

    // We know it's less than 5 now
    switch (numSpaces) {
      case 1:
        sb.append(" ");
        break;
      case 2:
        sb.append("  ");
        break;
      case 3:
        sb.append("   ");
        break;
      case 4:
        sb.append("    ");
        break;
    }
  }
393724
public void append(XMLString s) {
        append(s.ch, s.offset, s.length);
    }
885001
public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb)
  {
    XString xstring = (XString)xstr();
    xstring.appendToFsb(fsb);
  }
1084485
public void append(String str, int off, int len) {
	int restLength = buffer.length - pos;
	if (len < restLength) {
	    str.getChars(off, off + len, buffer, pos);
	    pos += len;
	}
	else {
	    str.getChars(off, off + restLength, buffer, pos);
	    curr.next = new Entity(buffer);
	    curr = curr.next;
	    length += buffer.length;
	    buffer = new char[(buffer.length > len - restLength) ? buffer.length : len - restLength];

	    str.getChars(off + restLength, off + len, buffer, 0);
	    pos = len - restLength;

	}
    }
422302
static private void append(StringBuilder tgt, String pfx, int dgt, long val) {
		tgt.append(pfx);
		if (dgt > 1) {
			int pad = (dgt - 1);
			for (long xa = val; xa > 9 && pad > 0; xa /= 10) {
				pad--;
			}
			for (int xa = 0; xa < pad; xa++) {
				tgt.append('0');
			}
		}
		tgt.append(val);
	}
152428
static void appendLengthInfo(int numLetters, Version version, Mode mode, BitArray bits) throws WriterException {
    int numBits = mode.getCharacterCountBits(version);
    if (numLetters >= (1 << numBits)) {
      throw new WriterException(numLetters + " is bigger than " + ((1 << numBits) - 1));
    }
    bits.appendBits(numLetters, numBits);
  }
55782
private static String[] appendToStringArray(String[] array, String element) {
		if (array != null) {
			String[] newArray = new String[array.length + 1];
			for (int i = 0; i < array.length; i++) {
				newArray[i] = array[i];
			}
			newArray[array.length] = element;
			return newArray;
		} else {
			return new String[] { element };
		}
	}
453338
public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb)
  {
    fsb.append((char[])m_obj, m_start, m_length);
  }
1254530
public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb)
  {
    fsb.append(str());
  }