TODO: What does this method do? What is parameter i (rename)?
505145
@Nonnull
    static String headerLetter(final int i) {
        final int flags = DATA_MODEL.getDataFlags(i);

        // TODO: The "magic" of how to interpret flags must be in DataModel, not here.
        if (((flags >> 7) & 3) == 1) {
            return Character.toString(ENCODE_CHARS[(flags >> 11) & 31]);
        }
        return "";
    }
320122
public boolean renameTo( Resource dest)
        throws SecurityException
    {
        if( dest instanceof FileResource)
            return _file.renameTo( ((FileResource)dest)._file);
        else
            return false;
    }
213522
function todo_name_me() {
    var args = process_signature(arguments)
    var opts = merge({}, base_defaults, args.overrides)
    return f.apply(null, [opts, args.cb])
  }
783159
@Override
    public void renameLayout(LayoutIdentifier layout, String newName) {
        String text = getLayoutContent(layout);
        saveLayout(new LayoutIdentifier(newName, layout.shared), text);
        deleteLayout(layout);
    }
694702
function rename(newName) {
      newName = newName.replace(/[\.\/]/g, '');
      if (this.isRoot()) {
        this._name = newName;
      } else {
        var newPath = [this.parent.path(), newName].filter(function (e) {
          return e !== '';
        }).join('.');
        this.moveTo(newPath);
      }
    }
492494
public void rename(String oldName, String newName)
        throws IOException, ServerException {
        if (oldName == null || newName == null) {
            throw new IllegalArgumentException("Required argument missing");
        }
        Command cmd = new Command("RNFR", oldName);
        try {
            Reply reply = controlChannel.exchange(cmd);
            if (!Reply.isPositiveIntermediate(reply)) {
                throw new UnexpectedReplyCodeException(reply);
            }
            controlChannel.execute(new Command("RNTO", newName));
        } catch (FTPReplyParseException rpe) {
            throw ServerException.embedFTPReplyParseException(rpe);
        } catch (UnexpectedReplyCodeException urce) {
            throw ServerException.embedUnexpectedReplyCodeException(
                                urce,
                                "Server refused renaming file");
        }
    }
76441
@Override
    public synchronized void run() {

        try {
            // do the rename operation
            m_elementRename.actionRename(getReport());
        } catch (Exception e) {
            getReport().println(e);
            if (LOG.isErrorEnabled()) {
                LOG.error(e.getMessage());
            }
        }
    }
94228
public void setDone(String oldName, String newName) throws IOException {
        Path oldPath = new Path(oldName);
        fs.rename(oldPath, new Path(newName));
    }
407386
public void removeName(int i)
   {
      Object name = indexes.remove(i);
      names.remove(name);
      dirty = true;
   }
763277
public final boolean replace(final Parameter parameter) {
        for (Parameter parameter1 : getParameters(parameter.getName())) {
            remove(parameter1);
        }
        return add(parameter);
    }
166851
@Override
  public boolean rename(final Path src, final Path dst) throws IOException {
    LOG.debug("rename from {} to {}", src, dst);
    if (src == null || dst == null) {
      LOG.debug("Source path and dest path can not be null");
      return false;
    }
    if (stocatorPath.isTemporaryPath(src)) {
      return true;
    }
    LOG.debug("Checking if source exists {}", src);
    if (!exists(src)) {
      LOG.debug("Source {} does not exists. Exit", src);
      return false;
    }
    final Path srcPath = storageClient.qualify(src);
    final Path dstPath = storageClient.qualify(dst);
    return storageClient.rename(hostNameScheme, srcPath.toString(), dstPath.toString());
  }
974470
@Override
    protected void doRename(final FileObject newfile) throws Exception {
        AludraLocalFile newLocalFile = (AludraLocalFile) FileObjectUtils.getAbstractFileObject(newfile);

        if (!file.renameTo(newLocalFile.getLocalFile())) {
            throw new FileSystemException("vfs.provider.local/rename-file.error", new String[] { file.toString(),
                    newfile.toString() });
        }
    }
419312
def rename!(*arguments)
      Hash[*arguments.flatten].each_pair do |from,to|
        if fields.has_key?(from) && !fields.has_key?(to)
          fields[to] = fields[from]
          fields.delete(from)
        end
      end
      self
    end
1008701
function (oldPath, newPath, callback) {
	fs.rename( oldPath, newPath, function (err) {
		if (err) {
			callback( err );
		} else {
			callback( null, {
				filename: newPath.split( '/' ).pop(),
				filepath: newPath
			});
		}
	});
}
73962
def file_rename(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/rename' % object_id, input_params, always_retry=always_retry, **kwargs)
6762
def applet_rename(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/rename' % object_id, input_params, always_retry=always_retry, **kwargs)
156047
def rename(*args):
    
    parser = argparse.ArgumentParser(prog="%s %s" % (__package__, rename.__name__), description=rename.__doc__)
    parser.add_argument('OLD_FILENAME', help="old file name", nargs='+')
    parser.add_argument('NEW_FILENAME', help="new file name", nargs=1)
    args = parser.parse_args(args)

    def _rename(config, old_name, new_name):
        old_path = os.path.realpath(old_name)
        old_key = os.path.relpath(old_path, config.root)
        new_path = os.path.realpath(new_name)
        new_key = os.path.relpath(new_path, config.root)
        if old_key not in config['files']:
            yield "Could not rename '%s', it is not being tracked" % old_name
        elif new_key in config['files']:
            yield "Could not rename '%s' to '%s', '%s' is already being tracked" % (old_name, new_name, new_name)
        elif os.access(old_path, os.W_OK|os.R_OK) and os.access(new_path, os.W_OK|os.R_OK):
            yield "Could not rename '%s' to '%s', both files already exist" % (old_name, new_name)
        elif not os.access(old_path, os.W_OK|os.R_OK) and not os.access(new_path, os.W_OK|os.R_OK):
            yield "Could not rename '%s' to '%s', neither file exists" % (old_name, new_name)
        else:
            new_sha = _file_key(new_key)
            os.rename(os.path.join(config.directory, config['files'][old_key]), os.path.join(config.directory, new_sha))
            config['files'][new_key] = new_sha
            del config['files'][old_key]
            if os.access(old_path, os.W_OK|os.R_OK):
                os.rename(old_path, new_path)

    config = FragmentsConfig()
    dest_path = os.path.relpath(args.NEW_FILENAME[0])
    dest_isdir = os.path.isdir(dest_path)
    if len(args.OLD_FILENAME) > 1 and not dest_isdir:
        yield "Could not rename multiple files, '%s' is not a directory." % os.path.relpath(dest_path)
        return

    for src_path in args.OLD_FILENAME:
        if os.path.isdir(src_path):
            old_names = list(_iterate_over_files([src_path], config, statuses='MDA '))
            if os.access(dest_path, os.R_OK):
                os.rename(src_path, os.path.join(dest_path, src_path))
                for s, path in old_names:
                    old_name = os.path.relpath(path)
                    new_name = os.path.join(dest_path, old_name)
                    for y in _rename(config, old_name, new_name):
                        yield y
            else:
                os.rename(src_path, dest_path)
                for s, path in old_names:
                    old_name = os.path.relpath(path)
                    new_name = os.path.join(dest_path, old_name[len(src_path)+1:])
                    for y in _rename(config, old_name, new_name):
                        yield y
        else:
            old_name = os.path.relpath(src_path)
            if dest_isdir:
                new_name = os.path.join(dest_path, os.path.basename(src_path))
            else:
                new_name = dest_path
            for y in _rename(config, old_name, new_name):
                yield y

    config.dump()