Appends the name and parameters to the given string builder.

@param sb         the target to write the output to
@param name       the name of the function
@param parameters the list of parameters
423839
protected static void appendNameAndParameters(StringBuilder sb, String name, List<Expression> parameters) {
        sb.append(name);
        sb.append("(");
        boolean first = true;
        for (Expression expr : parameters) {
            if (!first) {
                sb.append(", ");
            }
            first = false;
            sb.append(expr);
        }
        sb.append(")");
    }
1033671
private static void appendSpaces(final StringBuilder sb, final int spaces) {
	for( int i = 0; i < spaces; i++ ) {
	    sb.append(SPACE);
	}
    }
1225247
public static StringBuilder appendKeyDqValue(final StringBuilder sb, final Entry<String, String> entry) {
        return appendKeyDqValue(sb, entry.getKey(), entry.getValue());
    }
885001
public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb)
  {
    XString xstring = (XString)xstr();
    xstring.appendToFsb(fsb);
  }
24472
public void addParameter( String name, String value )
    {
        if ( _additionalParameters == null )
        {
            _additionalParameters = new HashMap();
        }
        
        _additionalParameters.put( name, value );
    }
1007830
protected static void appendArray(StringBuilder buff, String name, String[] values) {
    buff.append(',');
    buff.append(name);
    buff.append("=[");
    if (values != null) {
      for (int i = 0; i < values.length; i++) {
        if (i != 0) buff.append(',');
        buff.append(values[i]);
      }
    }
    buff.append(']');
  }
2335
public void addFunctionParameter(final String param) {
    if (param == null || param.isEmpty()) {
      throw new IllegalArgumentException("Parameter cannot be null or empty");
    }
    if (func_params == null) {
      func_params = Lists.newArrayList();
    }
    func_params.add(param);
  }
320604
private void append(final StringBuilder builder, final String string,
            final String separator) {
        if (string != null) {
            builder.append(string);
        }
        builder.append(separator);
    }
51243
protected void generateTypeParameterBuilderImpl() {
		final TypeReference builderInterface = getTypeParameterBuilderInterface();
		final TypeReference builder = getTypeParameterBuilderImpl();
		final StringConcatenationClient content = new StringConcatenationClient() {
			@Override
			protected void appendTo(TargetStringConcatenation it) {
				it.append("/** Builder of a " + getLanguageName() //$NON-NLS-1$
					+ " type parameter."); //$NON-NLS-1$
				it.newLine();
				it.append(" */"); //$NON-NLS-1$
				it.newLine();
				it.append("@SuppressWarnings(\"all\")"); //$NON-NLS-1$
				it.newLine();
				it.append("public class "); //$NON-NLS-1$
				it.append(builder.getSimpleName());
				it.append(" extends "); //$NON-NLS-1$
				it.append(getAbstractBuilderImpl());
				it.append(" implements "); //$NON-NLS-1$
				it.append(builderInterface);
				it.append(" {"); //$NON-NLS-1$
				it.newLineIfNotEmpty();
				it.newLine();
				it.append(generateMembers(false, false));
				it.append("}"); //$NON-NLS-1$
				it.newLineIfNotEmpty();
				it.newLine();
			}
		};
		final JavaFileAccess javaFile = getFileAccessFactory().createJavaFile(builder, content);
		javaFile.writeTo(getSrcGen());
	}
573568
private void appendTo(StringBuilder sb) {
    if (sb.length() > 1) {
      sb.append(", ");
    }
    sb.append(key).append(": ").append(value);
    for (HamtPMap<K, V> child : children) {
      child.appendTo(sb);
    }
  }
1036695
protected final void appendDesc(StringBuilder sb)
    {
        if (_type == TYPE_OBJECT) {
            sb.append('{');
            if (_currentName != null) {
                sb.append('"');
                // !!! TODO: Name chars should be escaped?
                sb.append(_currentName);
                sb.append('"');
            } else {
                sb.append('?');
            }
            sb.append('}');
        } else if (_type == TYPE_ARRAY) {
            sb.append('[');
            sb.append(getCurrentIndex());
            sb.append(']');
        } else {
            // nah, ROOT:
            sb.append("/");
        }
    }
186617
public static void appendCall(StringBuilder sb, String begin, String separator,
      String end, List<? extends CharSequence> args) {
    int size = begin.length();
    // Typically just-in-time compiler would eliminate Iterator in case foreach is used,
    // however the code below uses indexed iteration to keep the conde independent from
    // various JIT implementations (== avoid Iterator allocations even for not-so-smart JITs)
    // see https://bugs.openjdk.java.net/browse/JDK-8166840
    // see http://2016.jpoint.ru/talks/cheremin/ (video and slides)
    int numberOfArguments = args.size();
    for (int i = 0; i < numberOfArguments; i++) {
      size += args.get(i).length();
    }
    size += separator.length() * (numberOfArguments - 1);
    sb.ensureCapacity(sb.length() + size + 1);
    sb.append(begin);
    for (int i = 0; i < numberOfArguments; i++) {
      if (i > 0) {
        sb.append(separator);
      }
      sb.append(args.get(i));
    }
    sb.append(end);
  }
348311
public void addParameter(String parameterName, int parameterStart, int parameterEnd) {
        addParameter(parameterName, parameterStart, parameterEnd, null, null);
    }
750594
public void addParam(String name, String value) {
        if (name == null) {
            throw new NullPointerException("name");
        }
        if (value == null) {
            throw new NullPointerException("value");
        }
        params.add(new Param(name, value));
    }
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;
    }
  }
25078
protected function appendPsForUniqueClauseTo(&$sb, array &$params)
    {
        $bindParams = [];
        $index = count($params); // to avoid counting the number of parameters for each element in the array
        $values = ($this->value instanceof \Traversable) ? iterator_to_array($this->value) : (array) $this->value;
        foreach ($values as $value) {
            $params[] = ['table' => $this->realtable, 'column' => $this->column, 'value' => $value];
            $index++; // increment this first to correct for wanting bind params to start with :p1
            $bindParams[] = ':p' . $index;
        }
        if (count($bindParams)) {
            $field = ($this->table === null) ? $this->column : $this->table . '.' . $this->column;
            $sb .= $field . $this->comparison . '(' . implode(',', $bindParams) . ')';
        } else {
            $sb .= (Criteria::IN === $this->comparison) ? '1<>1' : '1=1';
        }
    }
1254530
public void appendToFsb(org.apache.xml.utils.FastStringBuffer fsb)
  {
    fsb.append(str());
  }