original_string: public function validate(&$msg = null)
      {
          if (!isset($this->_name) && !isset($this->_value) && !isset($this->_file)) {
              return false;
          } elseif (isset($this->_file) && (isset($this->_name) || isset($this->_value))) {
              return false;
          } elseif ((isset($this->_name) && !isset($this->_value)) || (!isset($this->_name) && isset($this->_value))) {
              return false;
          } else {
              return true;
          }
      }
code: public function validate(&$msg = null)
      {
          if (!isset($this->_name) && !isset($this->_value) && !isset($this->_file)) {
              return false;
          } elseif (isset($this->_file) && (isset($this->_name) || isset($this->_value))) {
              return false;
          } elseif ((isset($this->_name) && !isset($this->_value)) || (!isset($this->_name) && isset($this->_value))) {
              return false;
          } else {
              return true;
          }
      }
code_tokens: public function validate ( & $ msg = null ) { if ( ! isset ( $ this -> _name ) && ! isset ( $ this -> _value ) && ! isset ( $ this -> _file ) ) { return false ; } elseif ( isset ( $ this -> _file ) && ( isset ( $ this -> _name ) || isset ( $ this -> _value ) ) ) { return false ; } elseif ( ( isset ( $ this -> _name ) && ! isset ( $ this -> _value ) ) || ( ! isset ( $ this -> _name ) && isset ( $ this -> _value ) ) ) { return false ; } else { return true ; } }
docstring: Validates if a task can run by checking configs, directries and so on.
  
  @return bool Is true if task can run
docstring_tokens: Validates if a task can run by checking configs directries and so on .