original_string: public function rename($file = NULL, $extension = NULL)
  	{
  		$target = (!is_null($file) ? $this->filename : $this->extension);
  		$replacement = (!is_null($file) ? $file .'.'. $this->extension : $extension);
  
  		$this->file = str_replace($target, $replacement, $this->file);
  	}
code: public function rename($file = NULL, $extension = NULL)
  	{
  		$target = (!is_null($file) ? $this->filename : $this->extension);
  		$replacement = (!is_null($file) ? $file .'.'. $this->extension : $extension);
  
  		$this->file = str_replace($target, $replacement, $this->file);
  	}
code_tokens: public function rename ( $ file = NULL , $ extension = NULL ) { $ target = ( ! is_null ( $ file ) ? $ this -> filename : $ this -> extension ) ; $ replacement = ( ! is_null ( $ file ) ? $ file . '.' . $ this -> extension : $ extension ) ; $ this -> file = str_replace ( $ target , $ replacement , $ this -> file ) ; }
docstring: Renames a file or changes files extension
  
  @param String $file
  @param String $extension
  @return void
  @author Dan Cox
docstring_tokens: Renames a file or changes files extension