original_string: protected function setNextState($current_state, $executed)
  	{
  		try
  		{
  			$next_state = $current_state->getNextState();
  		}
  		catch(ClassNotFoundException $e)
  		{
  			Session::put('Errors', new MessageBag( array("Class" => "Class not found") ) );
  			return false;
  		}
  
  		if($executed)
  		{
  			// append next state
  			$this->append($next_state);
  		}
  		else
  		{
  			// replace current state
  			$this->replaceCurrent($next_state);
  		}
  
  		return true;
  	}
code: protected function setNextState($current_state, $executed)
  	{
  		try
  		{
  			$next_state = $current_state->getNextState();
  		}
  		catch(ClassNotFoundException $e)
  		{
  			Session::put('Errors', new MessageBag( array("Class" => "Class not found") ) );
  			return false;
  		}
  
  		if($executed)
  		{
  			// append next state
  			$this->append($next_state);
  		}
  		else
  		{
  			// replace current state
  			$this->replaceCurrent($next_state);
  		}
  
  		return true;
  	}
code_tokens: protected function setNextState ( $ current_state , $ executed ) { try { $ next_state = $ current_state -> getNextState ( ) ; } catch ( ClassNotFoundException $ e ) { Session :: put ( 'Errors' , new MessageBag ( array ( "Class" => "Class not found" ) ) ) ; return false ; } if ( $ executed ) { // append next state $ this -> append ( $ next_state ) ; } else { // replace current state $ this -> replaceCurrent ( $ next_state ) ; } return true ; }
docstring: Set the next state
  
  @return  Boolean $success
docstring_tokens: Set the next state