internal method taking a StringBuffer in parameter
333247
private void getTextContent(StringBuilder sb) throws DOMException {
        NodeList children = getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            Node child = children.item(i);
            if (hasTextContent(child)) {
                sb.append(child.getTextContent());
            }
        }
    }
1020613
private static ParameterFiller parseParameter(String parameter) {
    String wrappedParameter = "{" + parameter + "}";
    String trimmedParameter = parameter.trim();
    ParameterFiller parameterFiller = parseDateParameter(wrappedParameter, trimmedParameter);
    if (parameterFiller != null) {
      return parameterFiller;
    }

    parameterFiller = parseLevelParameter(wrappedParameter, trimmedParameter);
    if (parameterFiller != null) {
      return parameterFiller;
    }

    parameterFiller = parseTagParameter(wrappedParameter, trimmedParameter);
    if (parameterFiller != null) {
      return parameterFiller;
    }

    parameterFiller = parseMessageParameter(wrappedParameter, trimmedParameter);
    if (parameterFiller != null) {
      return parameterFiller;
    }

    return null;
  }
968475
function ByteBuffer(arg) {
    var initial_size;
    if (arg == null) {
        initial_size = 1024 * 1024;
    } else if (typeof arg === "number") {
        initial_size = arg;
    } else if (arg instanceof Uint8Array) {
        this.buffer = arg;
        this.position = 0;  // Overwrite
        return;
    } else {
        // typeof arg -> String
        throw typeof arg + " is invalid parameter type for ByteBuffer constructor";
    }
    // arg is null or number
    this.buffer = new Uint8Array(initial_size);
    this.position = 0;
}
774000
private void copyToStrBuffer(byte[] buffer, int offset, int length) {
    Preconditions.checkArgument(length >= 0);
    if (strBuffer.length - strBufferIndex < length) {
      // cannot fit, expanding buffer
      expandStrBuffer(length);
    }
    System.arraycopy(
      buffer, offset, strBuffer, strBufferIndex, Math.min(length, MAX_ALLOWABLE_BUFFER_SIZE - strBufferIndex));
    strBufferIndex += length;
  }
104011
public void writeOutParamsToStub(VariableElement param, ParamType paramType, String paramName, MethodSpec.Builder methodBuilder) {
        if (paramType != ParamType.IN) {
            methodBuilder.addStatement("int " + paramName + "_length = data.readInt()");
            methodBuilder.beginControlFlow("if (" + paramName + "_length < 0 )");
            methodBuilder.addStatement(paramName + " = null");
            methodBuilder.endControlFlow();
            methodBuilder.beginControlFlow("else");
            methodBuilder.addStatement(paramName + " = new " + (((ArrayType) param.asType()).getComponentType().toString())
                    + "[" + paramName + "_length]");
            methodBuilder.endControlFlow();
        }
    }
941357
@SuppressWarnings("rawtypes")
    protected String parseStringParameter(Map params, String paramName) {
        Object paramModel = params.get(paramName);
        if (paramModel == null) {
            return null;
        }
        if (!(paramModel instanceof SimpleScalar)) {
            throw new IllegalArgumentException(paramName + " must be string");
        }
        return ((SimpleScalar)paramModel).getAsString();
    }
1236452
@Override
    public String parameters() {
        StringBuilder result = new StringBuilder();
        Iterator<Pair> it = xy.iterator();
        while (it.hasNext()) {
            Pair pair = it.next();
            result.append(String.format("%s %s",
                    Op.str(pair.getX()), Op.str(pair.getY())));
            if (it.hasNext()) {
                result.append(" ");
            }
        }
        if (!Op.isEq(height, 1.0)) {
            result.append(String.format(" %s", Op.str(height)));
        }
        return result.toString();
    }
909784
public static void writeString(ByteBuffer buffer, String s) throws IOException {
    if(s == null) {
      s = ""; // Which will be written as Varint 0 = single byte 0.
    }
    ByteArrayUtil.STRING_SERIALIZER.toByteBuffer(buffer, s);
  }
1284820
public void printTo(StringBuffer buf, ReadablePartial partial) {
        try {
            printTo((Appendable) buf, partial);
        } catch (IOException ex) {
            // StringBuffer does not throw IOException
        }
    }
553626
function stringToBuffer (str) {
  str = cleanPath(str)
  const a = stringToStringTuples(str)
  const b = stringTuplesToTuples(a)

  return tuplesToBuffer(b)
}
1085081
function (str) {
         var buffer = JSZip.utils.transformTo("arraybuffer", str);
         return JSZip.utils.arrayBuffer2Blob(buffer);
      }
1154766
function _bufferToString(buffer) {
        var str = '';
        var uint16Array = new Uint16Array(buffer);

        try {
            str = String.fromCharCode.apply(null, uint16Array);
        } catch (e) {
            // This is a fallback implementation in case the first one does
            // not work. This is required to get the phantomjs passing...
            for (var i = 0; i < uint16Array.length; i++) {
                str += String.fromCharCode(uint16Array[i]);
            }
        }

        return str;
    }
55829
private static Object getParam(final Object param) {
		final StringBuilder sb = new StringBuilder();
		if(param instanceof String){
			sb.append("'");
			sb.append((String)param);
			sb.append("'");
		}
		else if(param instanceof Boolean){
			sb.append(String.valueOf((Boolean)param));			
		}
        else if(param instanceof Integer){
            sb.append(String.valueOf((Integer)param));
        }
        else if(param instanceof DBRegExp){
            sb.append('/');
            sb.append(((DBRegExp) param).toString());
            sb.append('/');
        }
		
		return sb.toString();
	}
575624
@Override
  public StringBuilder appendToBuffer(StringBuilder buf) {
    buf.append(getTask());
    buf.append(": ");
    buf.append(getProcessed());
    return buf;
  }
120483
private String typeParameters(Options opt, ParameterizedType t) {
	if (t == null)
	    return "";
	StringBuffer tp = new StringBuffer(1000).append("&lt;");
	Type args[] = t.typeArguments();
	for (int i = 0; i < args.length; i++) {
	    tp.append(type(opt, args[i], true));
	    if (i != args.length - 1)
		tp.append(", ");
	}
	return tp.append("&gt;").toString();
    }
968305
public String getOutputBufferAsString() throws IOException
  {
    byte[] buffer = getOutputBuffer();
    if (buffer != null)
      return new String(buffer, this.getCharacterEncoding());
    else
      return null;
  }
386938
static HtmlElement forName(final char[] elementNameBuffer, final int offset, final int len) {
        if (elementNameBuffer == null) {
            throw new IllegalArgumentException("Buffer cannot be null");
        }
        return ELEMENTS.getElement(elementNameBuffer, offset, len);
    }