Pretty printing for a renames entry.

@param sb the string builder
555937
private void toStringRenames(final StringBuilder sb) {
        if (getRenamesSubject() != null) {
            sb.append(',');
            sb.append("renamesSubject:" + getRenamesSubject());
        }
        if (getRenamesSubjectRange() != null) {
            sb.append(',');
            sb.append("renamesSubjectRange:" + getRenamesSubjectRange());
        }

    }
1218954
@Override
	public void rename(Name oldname, Name newname) throws NamingException
    {
        if (oldname.isEmpty() || newname.isEmpty())
            throw new InvalidNameException("Cannot rename empty name");

        // Extract components that belong to this namespace
        String oldnm = oldname.toString();
        String newnm = newname.toString();

        // Check if new name exists
        if (bindings.get(newnm) != null)
            throw new NameAlreadyBoundException(newname.toString() + " is already bound");

        // Check if old name is bound
        Object oldBinding = bindings.remove(oldnm);
        if (oldBinding == null)
            throw new NameNotFoundException(oldname.toString() + " not bound");

        bindings.put(newnm, oldBinding);
    }
746744
private void appendProperty(StringBuffer sb, String propertyName,
			Object propertyValue) {

		if (propertyValue != null) {
			propertyValue = propertyValue.toString().replaceAll("\\s+", " ")
					.trim();
		}
		sb.append(ljust(propertyName + ":", 45) + propertyValue + "\n");
	}
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());
  }
1096714
@Override
  public String rename(final byte[] oldkey, final byte[] newkey) {
    checkIsInMultiOrPipeline();
    client.rename(oldkey, newkey);
    return client.getStatusCodeReply();
  }
959895
public void rename(String newName) {
        URL url = FILE_URL_TEMPLATE.build(this.getAPI().getBaseURL(), this.getID());
        BoxJSONRequest request = new BoxJSONRequest(this.getAPI(), url, "PUT");

        JsonObject updateInfo = new JsonObject();
        updateInfo.add("name", newName);

        request.setBody(updateInfo.toString());
        BoxAPIResponse response = request.send();
        response.disconnect();
    }
278796
public void renameEntry(Name oldDN, Name newDN) throws NamingException
   {

      Name rdn = newDN.getSuffix(newDN.size() - 1);

      Name oldRdn = oldDN.getSuffix(oldDN.size() - 1);

      if (!oldRdn.toString().equals(rdn.toString()))

         ctx.rename(oldDN, rdn);

   }
850927
public void show(StringBuffer sb) {
    int start;
    start = span.getStart();
    if (!type.equals(ParserME.TOK_NODE)) {
      sb.append("(");
      sb.append(type +" ");
      //System.out.print(label+" ");
      //System.out.print(head+" ");
      //System.out.print(df.format(prob)+" ");
    }
    for (Iterator i = parts.iterator(); i.hasNext();) {
      Parse c = (Parse) i.next();
      Span s = c.span;
      if (start < s.getStart()) {
        //System.out.println("pre "+start+" "+s.getStart());
        sb.append(text.substring(start, s.getStart()));
      }
      c.show(sb);
      start = s.getEnd();
    }
    sb.append(text.substring(start, span.getEnd()));
    if (!type.equals(ParserME.TOK_NODE)) {
      sb.append(")");
    }
  }
737741
private boolean renameOverwrite(String oldname, String newname) {

        boolean deleted = delete(newname);

        if (exists(oldname)) {
            File file = new File(oldname);

            return file.renameTo(new File(newname));
        }

        return deleted;
    }
495855
protected static void buildRegex(Node alt, StringBuilder sb) {
        String close = null;
        if (alt.cs != null) {
            // actually '!' always be the first character, because it is
            // always used along with '*'.
            for (int i = 0; i < alt.cs.length(); i++) {
                char c = alt.cs.charAt(i);
                if (c == '!') {
                    if (close != null)
                        throw new RuntimeException("more than one '!'");
                    sb.append("(?=");
                    close = ")";
                } else if (c == '*') {
                    sb.append("[-\\w]+");
                } else {
                    sb.append(c);
                }
            }
        }
        if (alt.branches != null) {
            // alt.branches.size() should always be > 1
            if (alt.branches.size() > 1) {
                sb.append("(?:");
            }
            String sep = "";
            for (Node alt1 : alt.branches) {
                sb.append(sep); sep = "|";
                buildRegex(alt1, sb);
            }
            if (alt.branches.size() > 1) {
                sb.append(")");
            }
        }
        if (close != null)
            sb.append(close);
    }
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);
        }
    }
1225247
public static StringBuilder appendKeyDqValue(final StringBuilder sb, final Entry<String, String> entry) {
        return appendKeyDqValue(sb, entry.getKey(), entry.getValue());
    }
686606
private void appendDesc(StringBuilder sb)
    {
        String srcId;

        if (mSystemId != null) {
            sb.append("[row,col,system-id]: ");
            srcId = mSystemId;
        } else if (mPublicId != null) {
            sb.append("[row,col,public-id]: ");
            srcId = mPublicId;
        } else {
            sb.append("[row,col {unknown-source}]: ");
            srcId = null;
        }
        sb.append('[');
        sb.append(mRow);
        sb.append(',');
        sb.append(mCol);

        // Uncomment for testing, to see the char offset:
        //sb.append(" #").append(mCharOffset);
        //sb.append("{").append(System.identityHashCode(this)).append("}");

        if (srcId != null) {
            sb.append(',');
            sb.append('"');
            sb.append(srcId);
            sb.append('"');
        }
        sb.append(']');
        if (mContext != null) {
            StringUtil.appendLF(sb);
            sb.append(" from ");
            mContext.appendDesc(sb);
        }
    }
282247
public void renamedType(String oldName, Class<?> currentValue) {
        if (oldName == null) {
            throw new IllegalArgumentException("oldName must not be null");
        }
        if (currentValue == null) {
            throw new IllegalArgumentException("currentValue must not be null");
        }
        if (oldName.startsWith("java.") || oldName.startsWith("javax.") || oldName.startsWith("org.joda.")) {
            throw new IllegalArgumentException("oldName must not be a java.*, javax.* or org.joda.* type");
        }
        checkNotLocked();
        typeRenames.put(oldName, currentValue);
    }
173591
@Override
    public void prettyPrint(StringBuffer sb, int indent) {
        sb.append(Log.getSpaces(indent));
        sb.append(getClass().getSimpleName());
        sb.append(System.lineSeparator());

        sb.append(Log.getSpaces(indent + 2));
        sb.append("type: ");
        sb.append(getCameraRigType());
        sb.append(System.lineSeparator());

        sb.append(Log.getSpaces(indent + 2));
        sb.append("lookAt: ");
        float[] lookAt = getLookAt();
        for (float vecElem : lookAt) {
            sb.append(vecElem);
            sb.append(" ");
        }
        sb.append(System.lineSeparator());

        sb.append(Log.getSpaces(indent + 2));
        sb.append("leftCamera: ");
        if (leftCamera == null) {
            sb.append("null");
            sb.append(System.lineSeparator());
        } else {
            sb.append(System.lineSeparator());
            leftCamera.prettyPrint(sb, indent + 4);
        }

        sb.append(Log.getSpaces(indent + 2));
        sb.append("rightCamera: ");
        if (rightCamera == null) {
            sb.append("null");
            sb.append(System.lineSeparator());
        } else {
            sb.append(System.lineSeparator());
            rightCamera.prettyPrint(sb, indent + 4);
        }
    }
791694
private void encode(long bits, StringBuilder sb) {
        if (bits < 0) {
            sb.append(characters[(int) ((bits % base + base) % base)]);

            bits /= -base;
        }

        while (bits > 0) {
            sb.append(characters[(int) (bits % base)]);

            bits /= base;
        }
    }
681589
private void appendTypeDescriptor(StringBuilder sb, Class clazz)
    {
        if (clazz.isPrimitive())
            sb.append(_primToType.get(clazz));
        else if (clazz.isArray())
            sb.append(clazz.getName().replace('.','/'));
        else
        {
            sb.append("L");
            sb.append(clazz.getName().replace('.','/'));
            sb.append(";");
        }
    }