Meant to be called only from within the engine
762663
static CDATASection asEngineCDATASection(final ICDATASection cdataSection) {
        if (cdataSection instanceof CDATASection) {
            return (CDATASection) cdataSection;
        }
        return new CDATASection(cdataSection.getContent(), cdataSection.getTemplateName(), cdataSection.getLine(), cdataSection.getCol());
    }
163997
def random(cls, engine_or_session, limit=5):
        
        ses, auto_close = ensure_session(engine_or_session)
        result = ses.query(cls).order_by(func.random()).limit(limit).all()
        if auto_close:  # pragma: no cover
            ses.close()
        return result
742999
function inspect(engine) {
  var inspect = ['"' + engine.name + '"'];
  var exts = utils.arrayify(engine.options.ext).join(', ');
  inspect.push('<ext "' + exts + '">');
  engine.inspect = function() {
    return '<Engine ' + inspect.join(' ') + '>';
  };
}
780408
def only_on_master(function):
    """"""
    @wraps(function)
    def inner_function(self, *args, **kwargs):
        """Master checking inner function."""
        if not self.is_coordinator:
            message = 'The method or property "{0}" can only be called/used '\
                'on the coordinator in a group'.format(function.__name__)
            raise SoCoSlaveException(message)
        return function(self, *args, **kwargs)
    return inner_function
462923
def from_stmt(stmt, engine, **kwargs):
    
    result_proxy = engine.execute(stmt, **kwargs)
    return from_db_cursor(result_proxy.cursor)
866728
def _call_in_reactor_thread(self, f, *args, **kwargs):
        """"""
        self._reactor.callFromThread(f, *args, **kwargs)
188805
function setSuperCalled() {
            const segments = funcInfo.codePath.currentSegments;

            for (let i = 0; i < segments.length; ++i) {
                const segment = segments[i];

                if (segment.reachable) {
                    segInfoMap[segment.id].superCalled = true;
                }
            }
        }
1013785
function Motor (port) {
  if (!(this instanceof Motor)) {
    return new Motor(port)
  }
  try {
    Device.call(this, devices(port))
  } catch (e) {
    throw new Error('Cannot find motor')
  }
  this.write('speed_regulation', 'on')
}
993887
def call(self, timeout=None):
        
        self.start().wait(timeout=timeout)
        if self.is_alive():
            self.stop()
        return self
139423
function engine(url) {
            var ret;

            var parts = /^(\w+):/.exec(url);
            if (!parts) {
                d.fatal("Invalid engine URI", url);
            }
            try {
                var Engine = angular.injector(['ng', 'coa.store']).get('Engine' + parts[1].ucfirst());
                ret = new Engine(url);
            } catch(e) {
                d.fatal("Unable to instantiate engine for URI", url, e);
            }

            d('STORE', 'Creating an engine for URI', url, ':', ret);

            return ret;
        }
693348
def notify_engine_activated(self, chain_head):
        """"""
        chain_head_bytes = chain_head.SerializeToString()
        self._notify(
            "consensus_notifier_notify_engine_activated",
            chain_head_bytes,
            len(chain_head_bytes))
439825
function () {
    this._ = {};
    this.listen();

    engines(this);
    helpers.methods(this);
    lookup(this);

    // temporary.
    this.define('errors', {
      compile: {
        engine: 'cannot find an engine for: ',
        method: 'expects engines to have a compile method',
      },
      render: {
        callback: 'is async and expects a callback function: ',
        engine: 'cannot find an engine for: ',
        method: 'expects engines to have a render method',
      }
    });

    this.loaders = {};
    this.cache = {};
    this.cache.data = {};

    this.cache.context = {};
    this.views = {};

    this.define('Base', require('./lib/base'));
    this.define('Collection', require('./lib/collection'));
    this.define('Item', require('./lib/item'));
    this.define('List', require('./lib/list'));
    this.define('View', require('./lib/view'));
    this.define('Views', require('./lib/views'));

    this.viewTypes = {
      layout: [],
      renderable: [],
      partial: []
    };

    this.inflections = {};
    this.handlers(utils.methods);
    this.delegateLoaders([
      'loader',
      'resolve',
      'compose',
      'iterator',
    ]);

    // initialize iterators and loaders
    loaders.iterators(this);
    loaders.base(this);
    loaders.data(this);
  }
582245
function(exts, fn, options) {
      if (arguments.length === 1 && typeof exts === 'string') {
        return this.getEngine(exts);
      }
      exts = utils.arrayify(exts);
      var len = exts.length;
      while (len--) {
        var ext = exts[len];
        if (ext && ext[0] !== '.') ext = '.' + ext;
        this._.engines.setEngine(ext, fn, options);
      }
      return this;
    }
879431
private void writeToNetwork(EngineConnection engineConnection) {
      final String methodName = "writeToNetwork";
      logger.entry(this, methodName, engineConnection);

        if (engineConnection.transport.pending() > 0) {
            ByteBuffer head = engineConnection.transport.head();
            int amount = head.remaining();
            engineConnection.channel.write(head, new NetworkWritePromiseImpl(this, amount, engineConnection));
            engineConnection.transport.pop(amount);
            engineConnection.transport.tick(System.currentTimeMillis());
        }

        logger.exit(this, methodName);
    }
679638
public VoltTable[] run(SystemProcedureExecutionContext ctx,
                           String selector) throws VoltAbortException
    {
        VoltDB.crashLocalVoltDB("This should never be called.", false, null);
        return null;
    }
871514
def do(self, func, *args, **kwargs):
        
        if not callable(func):
            func = getattr(self.engine.function, func)
        func(self, *args, **kwargs)
        return self
1152520
private void callListeners(final CFMLEngine engine) {
	final Iterator<EngineChangeListener> it = listeners.iterator();
	while (it.hasNext())
	    it.next().onUpdate();
    }