low level to replace functionality  after testing
188776
function (data) {
  var q = _q.defer();
  data = data.replace(/\'/g,"\\\'");
  data = data.replace(/\"/g,'\\\"');
  exec(`echo "${data}" | crontab -`, (err, stdout, stderr) => {
    if (err) q.reject(err);
    if(stdout)q.resolve(stdout);
    else q.resolve(stderr);
  });
  return q.promise;
}
660654
public static String replaceFunctionsInString(String str, TestContext context) {
        return replaceFunctionsInString(str, context, false);
    }
449965
function replaceShortcuts(blocks, filePath, content) {
    var shortcuts = listShortcuts(blocks, filePath);
    return shortcuts.reduce(applyShortcut, content);
}
608831
def partial_replace(*indices)
      replacement = experiment.replacement
      new_content = Fast.replace_file @file, experiment.expression do |node, *captures|
        if indices.nil? || indices.empty? || indices.include?(match_index)
          if replacement.parameters.length == 1
            instance_exec node, &replacement
          else
            instance_exec node, *captures, &replacement
          end
        end
      end
      return unless new_content

      write_experiment_file(indices, new_content)
      new_content
    end
1102737
def replace(parent, idx, value, check_value=_NO_VAL):
  """"""
  if isinstance(parent, dict):
    if idx not in parent:
      raise JSONPatchError("Item does not exist")
  elif isinstance(parent, list):
    idx = int(idx)
    if idx < 0 or idx >= len(parent):
      raise JSONPatchError("List index out of range")
  if check_value is not _NO_VAL:
    if parent[idx] != check_value:
      raise JSONPatchError("Check value did not pass")
  parent[idx] = value
394130
function isReplaceable(node, prevNode) {
  if (node.type == 'comment') {
    return false;
  }

  if (prevNode && prevNode.type == 'comment') {
    return RE_REPLACE.test(prevNode.comment);
  }

  return false;
}
1185953
def less_compile(source, options=None):
    """"""
    options = options or {}
    res = NodeLikeInterpreter().evaljs(
        ('var result = null;'
         'var less = require("less/less-node");',
         'less.render(dukpy.lesscode, dukpy.lessoptions, function(error, output) {'
         '  result = {"error": error, "output": output};'
         '});'
         'result;'),
        lesscode=source,
        lessoptions=options
    )
    if not res:
        raise RuntimeError('Results or errors unavailable')

    if res.get('error'):
        raise LessCompilerError(res['error']['message'])

    return res['output']['css']
1260422
function configure(config) {
    tapLimit = config.tapLimit;
    testNumber = config.priorTestNumber;
    testFileRegex = new RegExp(config.testFileRegexStr);
    failedTests = config.failedTests;
    maxFailedTests = config.maxFailedTests;
    catchExceptions = config.catchExceptions;
    if (config.selectedTests !== '')
        selectTests(config.selectedTests);
    debugBreak = config.debugBreak;
    
    installTapWithPatches(config.tapPath);
    
    runUserCode(function() {
        require(config.filePath);
    }, false);
    
    // installing a tearDown handler induces tap autoend,
    // which sometimes causes tearDown before tests install,
    // so have to install handler *after* registering tests.
    // the handler installs because tap has to wait for all
    // tests by waiting at least until the next tick.
    
    tap.tearDown(function() {
        process.send({
            event: 'done',
            lastTestNumber: testNumber,
            failedTests: failedTests
        });
        // disconnect IPC so can exit when stdout, stderr,
        // child processes, and other resources complete.
        process.disconnect();
    });
    tap.end();
}
1128248
def raw_input_replacement(self, prompt=''):
        """"""
        self.widget_proxy.wait_input(prompt)
        self.input_condition.acquire()
        while not self.widget_proxy.data_available():
            self.input_condition.wait()
        inp = self.widget_proxy.input_data
        self.input_condition.release()
        return inp
398296
private void replace(PersistentStore store, NodeAVL x, NodeAVL n) {

        if (x.isRoot()) {
            if (n != null) {
                n = n.setParent(store, null);
            }

            store.setAccessor(this, n);
        } else {
            set(store, x.getParent(store), x.isFromLeft(store), n);
        }
    }
623312
function replaceDefine(code) {
    var defineList = getDefineBlock(code);
    var segments = [];
    var index = 0;
    defineList.forEach(function (block) {

        if (block.type === 'function') {
            segments.push(code.slice(index, block.defineRange[0]));
            index = block.factoryRange[0] + 1;

            block.returnRange.forEach(function (range) {
                segments.push(code.slice(index, range[0]));
                segments.push('module.exports =');
                segments.push(code.slice(range[0] + 6, range[1]));
                index = range[1];
            });
            segments.push(code.slice(index, block.factoryRange[1] - 1));

            index = block.defineRange[1];
        }
        else if (block.type === 'object') {
            segments.push(code.slice(index, block.defineRange[0]));
            segments.push('module.exports = ');
            segments.push(code.slice(block.factoryRange[0], block.factoryRange[1]) + ';');
            index = block.defineRange[1];
        }
    });

    segments.push(code.slice(index));

    code = segments.join('');

    return code;
}
459180
function(test) {
			var context = this.loopContext;
			var forkContext = this.forkContext;
			var testSegments = forkContext.makeNext(0, -1);

			// Update state.
			context.test = test;
			context.continueDestSegments = testSegments;
			forkContext.replaceHead(testSegments);
		}
862309
function(test) {
			var context = this.loopContext;
			var forkContext = this.forkContext;

			context.test = test;

			// Creates paths of `continue` statements.
			if (!context.continueForkContext.empty) {
				context.continueForkContext.add(forkContext.head);
				var testSegments = context.continueForkContext.makeNext(0, -1);

				forkContext.replaceHead(testSegments);
			}
		}
1263409
def demo(quiet, shell, speed, prompt, commentecho):
    """"""
    run(
        DEMO,
        shell=shell,
        speed=speed,
        test_mode=TESTING,
        prompt_template=prompt,
        quiet=quiet,
        commentecho=commentecho,
    )
1206811
def remake(self, *args):
        
        if not self.config:
            return
        if not all((self.key, self.gett, self.sett, self.listen, self.unlisten)):
            Clock.schedule_once(self.remake, 0)
            return
        if not hasattr(self, 'label'):
            self.label = Label(text=str(self.key))

            def updlabel(*args):
                self.label.text = str(self.key)
            self.bind(key=updlabel)
            self.add_widget(self.label)
        if hasattr(self, 'wid'):
            self.remove_widget(self.wid)
            del self.wid
        control = self.config['control']
        widkwargs = {
            'key': self.key,
            'gett': self.gett,
            'sett': self.sett,
            'listen': self.listen,
            'unlisten': self.unlisten
        }
        if control == 'slider':
            cls = StatRowSlider
            try:
               widkwargs['value'] = float(self.gett(self.key))
               widkwargs['min'] = float(self.config['min'])
               widkwargs['max'] = float(self.config['max'])
            except (KeyError, ValueError):
                return
        elif control == 'togglebutton':
            cls = StatRowToggleButton
            try:
                widkwargs['true_text'] = self.config['true_text']
                widkwargs['false_text'] = self.config['false_text']
            except KeyError:
                return
        elif control == 'textinput':
            cls = StatRowTextInput
        else:
            cls = StatRowLabel
        self.wid = cls(**widkwargs)
        self.bind(
            key=self.wid.setter('key'),
            gett=self.wid.setter('gett'),
            sett=self.wid.setter('sett'),
            listen=self.wid.setter('listen'),
            unlisten=self.wid.setter('unlisten')
        )
        if control == 'slider':
            self.unbind(config=self._toggle_update_config)
            self.bind(config=self._slider_update_config)
        elif control == 'togglebutton':
            self.unbind(config=self._slider_update_config)
            self.bind(config=self._toggle_update_config)
        else:
            self.unbind(config=self._slider_update_config)
            self.unbind(config=self._toggle_update_config)
        self.add_widget(self.wid)
419805
def replace(self, repl_class, replacement, target_segment_name=None):
        """"""

        for segment_name, pipes in iteritems(self):

            if target_segment_name and segment_name != target_segment_name:
                raise Exception()

            repl_pipes = []
            found = False
            for pipe in pipes:
                if isinstance(pipe, repl_class):
                    pipe = replacement
                    found = True

                repl_pipes.append(pipe)

            if found:
                found = False
                self[segment_name] = repl_pipes
506398
function neoDebug (prefix, options)
{
	var copy = {};
	if (options)
	{
		for (var i in options)
			copy[i] = options[i];
	}

	copy.prefix = prefix;

	var index = String(_options.push(copy) - 1);
	_prevTimes.push(0);
	updateDebugFunction(index);
	function debug ()
	{
		var f = _functions[index];
		if (f !== disabled)
			f(arguments);
	}

	debug.update = function (options)
	{
		if (!options)
			return;

		var orig = _options[index];
		for (var i in options)
			orig[i] = options[i];

		updateDebugFunction(index);
	};

	return debug;
}