for sysprocs and we cant distinguish if this needs to be replayed or not.
162642
public static boolean isDurableFragment(byte[] planHash) {
        long fragId = VoltSystemProcedure.hashToFragId(planHash);
        return (fragId == PF_prepBalancePartitions  ||
                fragId == PF_balancePartitions ||
                fragId == PF_balancePartitionsData ||
                fragId == PF_balancePartitionsClearIndex ||
                fragId == PF_distribute ||
                fragId == PF_applyBinaryLog);
    }
983115
function isValidRecord(rec) {
  if (rec.v === null ||
      rec.level === null ||
      rec.name === null ||
      rec.hostname === null ||
      rec.pid === null ||
      rec.time === null ||
      rec.msg === null) {
    // Not valid Bunyan log.
    return false;
  } else {
    return true;
  }
}
334098
public boolean accepts(OpOrder.Group opGroup, ReplayPosition replayPosition)
    {
        // if the barrier hasn't been set yet, then this memtable is still taking ALL writes
        OpOrder.Barrier barrier = this.writeBarrier;
        if (barrier == null)
            return true;
        // if the barrier has been set, but is in the past, we are definitely destined for a future memtable
        if (!barrier.isAfter(opGroup))
            return false;
        // if we aren't durable we are directed only by the barrier
        if (replayPosition == null)
            return true;
        while (true)
        {
            // otherwise we check if we are in the past/future wrt the CL boundary;
            // if the boundary hasn't been finalised yet, we simply update it to the max of
            // its current value and ours; if it HAS been finalised, we simply accept its judgement
            // this permits us to coordinate a safe boundary, as the boundary choice is made
            // atomically wrt our max() maintenance, so an operation cannot sneak into the past
            ReplayPosition currentLast = lastReplayPosition.get();
            if (currentLast instanceof LastReplayPosition)
                return currentLast.compareTo(replayPosition) >= 0;
            if (currentLast != null && currentLast.compareTo(replayPosition) >= 0)
                return true;
            if (lastReplayPosition.compareAndSet(currentLast, replayPosition))
                return true;
        }
    }
1111362
def respond_to_missing?(sym, include_priv)
      return false if sym.to_sym == :acts_like_date?
      time.respond_to?(sym, include_priv)
    end
167092
private boolean canSuccessorProceed() {

        if (predecessor != null && !predecessor.canSuccessorProceed()) {
            return false;
        }

        synchronized (this) {
            while (responseCount < groups.size()) {
                try {
                    wait();
                } catch (InterruptedException e) {
                    Thread.currentThread().interrupt();
                    return false;
                }
            }
            return !failed;
        }
    }
722421
def _replay_info(replay_path):
  """"""
  if not replay_path.lower().endswith("sc2replay"):
    print("Must be a replay.")
    return

  run_config = run_configs.get()
  with run_config.start(want_rgb=False) as controller:
    info = controller.replay_info(run_config.replay_data(replay_path))
  print("-" * 60)
  print(info)
582324
function (callback) {
    if (!this.isReplaying) {
      var err = new Error('Not in replay mode!');
      debug(err);
      return callback(err);
    }
    var replVms = _.values(this.replayingVms);
    var replVmsToDelete = _.values(this.replayingVmsToDelete);
    var self = this;

    function commit (vm, callback) {
      if (!vm.actionOnCommitForReplay) {
        return callback(null);
      }
      vm.actionOnCommit = vm.actionOnCommitForReplay;
      delete vm.actionOnCommitForReplay;
      self.repository.commit(vm, function (err) {
        if (err) {
          debug(err);
          debug(vm);
        }
        callback(err);
      });
    }

    function prepareVmsForBulkCommit (vms) {
      return _.map(_.filter(vms, function(vm) { return vm.actionOnCommitForReplay }), function (vm) {
        vm.actionOnCommit = vm.actionOnCommitForReplay;
        delete vm.actionOnCommitForReplay;
        return vm;
      })
    }

    function bulkCommit (vms, callback) {
      if (vms.length === 0) return callback(null);
      self.repository.bulkCommit(prepareVmsForBulkCommit(vms), function (err) {
        if (err) {
          debug(err);
        }
        callback(err);
      });
    }

    async.series([
      function (callback) {
        if (self.repository.bulkCommit) {
          return bulkCommit(replVmsToDelete, callback);
        }
        async.each(replVmsToDelete, commit, callback);
      },
      function (callback) {
        if (self.repository.bulkCommit) {
          return bulkCommit(replVms, callback);
        }
        async.each(replVms, commit, callback);
      }
    ], function (err) {
      if (err) {
        debug(err);
      }
      self.replayingVms = {};
      self.replayingVmsToDelete = {};
      self.isReplaying = false;
      callback(err);
    });
  }
1171277
def remote_not_complete(self):
        
        if self.remote_channel and not self.remote_channel.exit_status_ready():
            self._timeout_check()
            # Get some stdout/std error
            if self.remote_channel.recv_ready():
                self.stdout += self.remote_channel.recv(1024)
            if self.remote_channel.recv_stderr_ready():
                self.stderr += self.remote_channel.recv_stderr(1024)
            return True
        return False
313044
function replayFrame(index) {

        var frame = frames[index];

        // Replay all instructions within the retrieved frame
        for (var i = 0; i < frame.instructions.length; i++) {
            var instruction = frame.instructions[i];
            playbackTunnel.receiveInstruction(instruction.opcode, instruction.args);
        }

        // Store client state if frame is flagged as a keyframe
        if (frame.keyframe && !frame.clientState) {
            playbackClient.exportState(function storeClientState(state) {
                frame.clientState = state;
            });
        }

    }
293820
public void replay(IDataLoggerReplay replay) throws IOException {
		maybeRead();
		this.randomAccess.rewind();
		while (this.randomAccess.available() > (Integer.SIZE / Byte.SIZE)) {

			int length = this.randomAccess.readInt();
			short type = this.randomAccess.readShort();
			XALogRecordType recordType = XALogRecordType.resolve(type);
			byte[][] data = new byte[length][];
			for (int i = 0; i < length; i++) {
				int recordSize = this.randomAccess.readInt();
				data[i] = this.randomAccess.read(recordSize);
			}
			replay.onRecord(recordType, data);
		}

	}
634309
private static boolean isRetryable(Throwable ex) {
        ex = Exceptions.unwrap(ex);
        return ex instanceof WriteFailureException
                || ex instanceof DataLogNotAvailableException;
    }
521213
def _process_restartcheck_result(rs_result, **kwargs):
    '''
    
    '''
    if 'No packages seem to need to be restarted' in rs_result:
        return
    reboot_required = False
    for rstr in rs_result:
        if 'System restart required' in rstr:
            _update_nilrt_restart_state()
            __salt__['system.set_reboot_required_witnessed']()
            reboot_required = True
    if kwargs.get('always_restart_services', True) or not reboot_required:
        for rstr in rs_result:
            if 'System restart required' not in rstr:
                service = os.path.join('/etc/init.d', rstr)
                if os.path.exists(service):
                    __salt__['cmd.run']([service, 'restart'])
252691
def could_scope_out(self):
        
        return not self.waiting_for or \
               isinstance(self.waiting_for, callable.EndOfStory) or \
               self.is_breaking_a_loop()
1294798
def save_replay(self):
    """"""
    res = self._client.send(save_replay=sc_pb.RequestSaveReplay())
    return res.data
931747
def _is_skippable(filename_full):
    """"""

    # File types
    if not Settings.follow_symlinks and os.path.islink(filename_full):
        return True
    if os.path.basename(filename_full) == timestamp.RECORD_FILENAME:
        return True
    if not os.path.exists(filename_full):
        if Settings.verbose:
            print(filename_full, 'was not found.')
        return True

    return False
966454
protected function fileExistsAndReadable ()
	{
		if ($this->isDataStream === true)
		{
			return;
		}
		
		if (stristr($this->fileName, 'http://') !== false)
		{
			$this->remoteImage = true;
			return;
		}
		
		if (!file_exists($this->fileName))
		{
			$this->triggerError('Image file not found: ' . $this->fileName);
		}
		elseif (!is_readable($this->fileName))
		{
			$this->triggerError('Image file not readable: ' . $this->fileName);
		}
	}
315256
def should_recover(self):
        
        return (self.checkpoint_freq > 0
                and (self.num_failures < self.max_failures
                     or self.max_failures < 0))