appendTo is where the formatted string is appended.
540527
private StringBuilder formatNumeric(
            Date duration,
            DateFormat formatter,
            DateFormat.Field smallestField,
            Number smallestAmount,
            StringBuilder appendTo) {
        // Format the smallest amount ahead of time.
        String smallestAmountFormatted;

        // Format the smallest amount using this object's number format, but keep track
        // of the integer portion of this formatted amount. We have to replace just the
        // integer part with the corresponding value from formatting the date. Otherwise
        // when formatting 0 minutes 9 seconds, we may get "00:9" instead of "00:09"
        FieldPosition intFieldPosition = new FieldPosition(NumberFormat.INTEGER_FIELD);
        smallestAmountFormatted = numberFormat.format(
                smallestAmount, new StringBuffer(), intFieldPosition).toString();
        // Give up if there is no integer field.
        if (intFieldPosition.getBeginIndex() == 0 && intFieldPosition.getEndIndex() == 0) {
            throw new IllegalStateException();
        }
        // Format our duration as a date, but keep track of where the smallest field is
        // so that we can use it to replace the integer portion of the smallest value.
        FieldPosition smallestFieldPosition = new FieldPosition(smallestField);
        String draft = formatter.format(
                duration, new StringBuffer(), smallestFieldPosition).toString();

        // If we find the smallest field
        if (smallestFieldPosition.getBeginIndex() != 0
                || smallestFieldPosition.getEndIndex() != 0) {
            // add everything up to the start of the smallest field in duration.
            appendTo.append(draft, 0, smallestFieldPosition.getBeginIndex());

            // add everything in the smallest field up to the integer portion
            appendTo.append(smallestAmountFormatted, 0, intFieldPosition.getBeginIndex());

            // Add the smallest field in formatted duration in lieu of the integer portion
            // of smallest field
            appendTo.append(
                    draft,
                    smallestFieldPosition.getBeginIndex(),
                    smallestFieldPosition.getEndIndex());

            // Add the rest of the smallest field
            appendTo.append(
                    smallestAmountFormatted,
                    intFieldPosition.getEndIndex(),
                    smallestAmountFormatted.length());
            appendTo.append(draft, smallestFieldPosition.getEndIndex(), draft.length());
        } else {
            // As fallback, just use the formatted duration.
            appendTo.append(draft);
        }
        return appendTo;
    }
1334514
public void append(final Object text) {
		if (text instanceof Message) {
			append(translate(text), true);
		} else if (text != null) {
			append(text.toString(), true);
		}
	}
1046707
protected void append(Object object, int index) {
		if (object == null)
			return;
		if (object instanceof String) {
			append((String) object, index);
		} else if (object instanceof StringConcatenation) {
			StringConcatenation other = (StringConcatenation) object;
			appendSegments(index, other.getSignificantContent(), other.lineDelimiter);
		} else if (object instanceof StringConcatenationClient) {
			StringConcatenationClient other = (StringConcatenationClient) object;
			other.appendTo(new SimpleTarget(this, index));
		} else {
			final String text = getStringRepresentation(object);
			if (text != null) {
				append(text, index);
			}
		}
	}
548164
private static void appendEncoded(StringBuilder sb, String value) {
        for (char ch : value.toCharArray()) {
            if (isUnreserved(ch)) sb.append(ch);
            else appendEscapedByte(sb, (byte) ch);
        }
    }
1347965
public IStringBuffer append( String str )
    {
        if ( str == null )
            throw new NullPointerException();
        //check the necessary to resize the buffer.
        if ( count + str.length() > buff.length ) {
            resizeTo( (count + str.length()) * 2 + 1 );
        }
        
        for ( int j = 0; j < str.length(); j++ ) {
            buff[count++] = str.charAt(j);
        }
        
        return this;
    }
827263
public static void appendAsString(
        final StringBuilder sb, final DirectBuffer buffer, final int index, final Encoding encoding)
    {
        switch (encoding.primitiveType())
        {
            case CHAR:
                sb.append('\'').append((char)buffer.getByte(index)).append('\'');
                break;

            case INT8:
                sb.append(buffer.getByte(index));
                break;

            case INT16:
                sb.append(buffer.getShort(index, encoding.byteOrder()));
                break;

            case INT32:
                sb.append(buffer.getInt(index, encoding.byteOrder()));
                break;

            case INT64:
                sb.append(buffer.getLong(index, encoding.byteOrder()));
                break;

            case UINT8:
                sb.append((short)(buffer.getByte(index) & 0xFF));
                break;

            case UINT16:
                sb.append(buffer.getShort(index, encoding.byteOrder()) & 0xFFFF);
                break;

            case UINT32:
                sb.append(buffer.getInt(index, encoding.byteOrder()) & 0xFFFF_FFFFL);
                break;

            case UINT64:
                sb.append(buffer.getLong(index, encoding.byteOrder()));
                break;

            case FLOAT:
                sb.append(buffer.getFloat(index, encoding.byteOrder()));
                break;

            case DOUBLE:
                sb.append(buffer.getDouble(index, encoding.byteOrder()));
                break;
        }
    }
969466
protected static final void append(StringBuilder builder, String key, String value) {

		// Convert key
		String formattedKey = key.replace('[', '.').replace("]", "");

		// Append key
		char c;
		boolean replace = false;
		char[] chars = formattedKey.toCharArray();
		for (int i = 0; i < chars.length; i++) {
			c = chars[i];
			if ((c > 0xFF) || KEY_ESCAPES[c] != 0) {
				replace = true;
				break;
			}
		}
		if (replace) {
			appendWithEscapes(builder, formattedKey, KEY_ESCAPES);
		} else {
			builder.append(formattedKey);
		}
		builder.append('=');

		// Append value
		if (value != null && !value.isEmpty()) {
			replace = false;
			chars = value.toCharArray();
			for (int i = 0; i < chars.length; i++) {
				c = chars[i];
				if ((c > 0xFF) || VALUE_ESCAPES[c] != 0) {
					replace = true;
					break;
				}
			}
			if (replace) {
				appendWithEscapes(builder, value, VALUE_ESCAPES);
			} else {
				builder.append(value);
			}
		}

		// Line break
		builder.append(LINE_SEPARATOR);
	}
598945
public static String[] appendToAll(String append, String[] appendTo) {
        if (append == null) {
            throw new IllegalArgumentException("Method argument append must not be null.");
        }
        if (appendTo == null) {
            throw new IllegalArgumentException("Method argument to must not be null.");
        }

        String[] result = new String[appendTo.length];
        for (int i = 0; i  < appendTo.length; ++i) {
            result[i] = appendTo[i] == null ? null : appendTo[i] + append;
        }

        return result;
    }
804726
def _append_to_data_parts(self, data, start, end):
        '''
        
        '''
        try:
            while data[start] == ' ':
                start += 1

            if start == end:
                end = len(data[start:])

            self.string_parts.append(data[start:end])
        except KeyboardInterrupt as e:
            raise e
        except Exception:
            try:
                self.string_parts.append(data[start:])
            except KeyboardInterrupt as e:
                raise e
            except Exception:
                pass

        return start
468713
public static void append(StringBuilder buf, String s, int offset, int length) {
        synchronized (buf) {
            int end = offset + length;
            for (int i = offset; i < end; i++) {
                if (i >= s.length())
                    break;
                buf.append(s.charAt(i));
            }
        }
    }
1222732
public void append(final String str) {
        final String s = str != null ? str : "null";
        final int strlen = s.length();
        final int newlen = this.len + strlen;
        if (newlen > this.array.length) {
            expand(newlen);
        }
        s.getChars(0, strlen, this.array, this.len);
        this.len = newlen;
    }
196073
public StringBuffer appendMessage(StringBuffer toAppendTo) {
        compare();
        if (messages.length()==0) {
            messages.append("[identical]");
        }
        // fix for JDK1.4 backwards incompatibility
        return toAppendTo.append(messages.toString());
    }
462949
private static void appendKeyValue(StringBuffer str, String key, String value) {

        str.append(key);
        if (value == IS_USED) {
            str.append(";");
        } else {
            str.append("=(");
            str.append(value);
            str.append(");");
        }
    }
668330
function appendText(str, isPlainText) {
		let i = newTokens.length - 1,
			last = newTokens[i]

		if (isPlainText) {
			if (lastTextWasPlain && lastPlainTextWasSpaced) {
				// Remove preceding spaces, since the last plain text
				// ended in spaces
				str = str.trimLeft()
			}

			str = str.replace(/(\s)\s+/g, '$1')
			lastPlainTextWasSpaced = /^\s$/.test(str.substr(-1))
		}
		lastTextWasPlain = isPlainText

		if (typeof last === 'string') {
			newTokens[i] += str
		} else {
			newTokens.push(str)
		}
	}
508280
private JSONWriter append(String s) throws JSONException {

        if (s == null) {
            throw new JSONException("Null pointer");
        }
        if ((m_mode == 'o') || (m_mode == 'a')) {
            try {
                if (m_comma && (m_mode == 'a')) {
                    m_writer.write(',');
                }
                m_writer.write(s);
            } catch (IOException e) {
                throw new JSONException(e);
            }
            if (m_mode == 'o') {
                m_mode = 'k';
            }
            m_comma = true;
            return this;
        }
        throw new JSONException("Value out of sequence.");
    }
392968
public <A extends Appendable> A appendTo(A appendable, Iterable<?> parts) throws IOException {
    return appendTo(appendable, parts.iterator());
  }
565481
@Override
	public StringBuffer format(final Object obj, final StringBuffer toAppendTo, final FieldPosition pos) {
		return toAppendTo.append(printer.format(obj));
	}