{@inheritDoc}
We don't need rename on temporary objects, since objects are already were created with real
names.
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());
  }
25030
@Action(
            semantics = SemanticsOf.SAFE // obviously, a mistake
    )
    @ActionLayout(
            describedAs = "'Mistakenly' annotated as being invoked with safe semantics, not annotated as a Command; should persist anyway"
    )
    public SomeCommandAnnotatedObject changeNameWithSafeSemantics(
            @ParameterLayout(named = "New name")
            final String newName) {
        setName(newName);
        return this;
    }
830022
public static function reset($object)
	{
		if (!($object instanceof NamePart)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\UninterpretedOption\NamePart.');
		}
		$object->namePart = NULL;
		$object->isExtension = NULL;
	}
882374
@Override
    public final void setName(String name) {
        log.debug("Set name: {}", name);
        if (this.name == null && StringUtils.isNotBlank(name)) {
            // reset of the name is no longer allowed
            this.name = name;
            // unregister from jmx
            if (oName != null) {
                unregisterJMX();
            }
            // register
            registerJMX();
        } else {
            log.info("Scope {} name reset to: {} disallowed", this.name, name);
        }
    }
44046
def setNamingConvention(self, namingConvention):
        
        # Remove getters and setters with old naming convention.
        self._removeSyntheticMembers()
        
        # Set new naming convention.
        self._syntheticMetaData().setNamingConvention(namingConvention)

        # Update constructor and recreate accessors.
        self._updateConstructorAndMembers()
1262492
function rename(key, newkey, req) {
  var val = this.getKey(key);
  this.delKey(key);
  this.setKey(newkey, val);
  return OK;
}
604289
public function rename($oldName, $newName)
    {
        if (! ftp_rename($this->session, $oldName, $newName)) {
            throw new \RuntimeException('Name can not be changed');
        }
        return true;
    }
312944
public static function resetInstance(): void
    {
        $name = self::$instancePropertyName;
        if (is_object(self::$$name)) {
            if (self::$$name->allowToResetInstance) {
                self::$$name = null;
            } else {
                throw new \RuntimeException(
                    "Resetting of singleton instance disallowed"
                );
            }
        }
    }
466110
function renameFunction(func, newName) {
    // eslint-disable-next-line no-unused-vars
    const prop = Object.getOwnPropertyDescriptor(func, 'name');
    if (prop) {
        const { value, ...others } = prop;
        Object.defineProperty(func, 'name', { value: newName, ...others });
    }
}
61065
protected function renameTempFile(
        /*# string */ $tmpFile,
        /*# string */ $realPath
    )/*# : bool */ {
        if (@rename($tmpFile, $realPath) &&
            @chmod($realPath, PermissionAwareInterface::PERM_ALL)) {
            return true;
        }
        $err = error_get_last();
        $this->setError($err['message'], Message::STR_WRITEFILE_FAIL);
        @unlink($tmpFile);
        return false;
    }
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);
    }
276015
def renamed(self, name):
        
        duplicate = copy(self)
        duplicate._name = name
        return duplicate
1115476
public function rename($index, $newName)
    {
        if (!isset($this->names[$index])) {
            return false;
        }
        if ($this->names[$index] === $newName) {
            return false;
        }
        $this->context->getMappings();
        $this->names[$index] = $newName;
        $this->indexes = array_flip($this->names);
        $this->onRename($index, $newName);
        return true;
    }
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);
    }
830881
@Action(
            semantics = SemanticsOf.IDEMPOTENT,
            command = CommandReification.ENABLED
    )
    public SomeCommandAnnotatedObject changeName(
            @ParameterLayout(named = "New name")
            final String newName) {
        setName(newName);
        return this;
    }
592049
function copy() {
		$new_object = new static();
		$values = $this->toArray();

		foreach (static::$_primaryKeys as $pk) {
			unset($values[$pk]);
		}

		$new_object->fromArray($values);
		return $new_object;
	}
1004273
public function setName($name)
    {
        assert(is_string($name));

        if ($this->_name !== null && $this->_name !== $name) {
            throw new ClientException('Should not update the name of an existing collection');
        }

        $this->_name = (string) $name;
    }