original_string: public function is_available() {
          global $CFG;
          $preventfilelocking = !empty($CFG->preventfilelocking);
          $lockdirisdataroot = true;
          if (!empty($CFG->file_lock_root) && strpos($CFG->file_lock_root, $CFG->dataroot) !== 0) {
              $lockdirisdataroot = false;
          }
          return !$preventfilelocking || !$lockdirisdataroot;
      }
code: public function is_available() {
          global $CFG;
          $preventfilelocking = !empty($CFG->preventfilelocking);
          $lockdirisdataroot = true;
          if (!empty($CFG->file_lock_root) && strpos($CFG->file_lock_root, $CFG->dataroot) !== 0) {
              $lockdirisdataroot = false;
          }
          return !$preventfilelocking || !$lockdirisdataroot;
      }
code_tokens: public function is_available ( ) { global $ CFG ; $ preventfilelocking = ! empty ( $ CFG -> preventfilelocking ) ; $ lockdirisdataroot = true ; if ( ! empty ( $ CFG -> file_lock_root ) && strpos ( $ CFG -> file_lock_root , $ CFG -> dataroot ) !== 0 ) { $ lockdirisdataroot = false ; } return ! $ preventfilelocking || ! $ lockdirisdataroot ; }
docstring: Is available.
  @return boolean - True if preventfilelocking is not set - or the file_lock_root is not in dataroot.
docstring_tokens: Is available .