Context related methods
9250
@Override
	public void reloadContext() throws DeploymentException
	{
		Archive<?> archive = mssContainer.getArchive();
		deployableContainer.undeploy(archive);
		deployableContainer.deploy(archive);
	}
940815
@Override
    public void visitClassContext(ClassContext classContext) {
        try {
            queryLocations = new ArrayList<>();
            loops = new ArrayList<>();
            super.visitClassContext(classContext);
        } finally {
            queryLocations = null;
            loops = null;
        }
    }
685734
def p_contextualize_items(self, t):
        """"""
        if len(t) == 3:
            t[0] = t[1]
            t[0].append(t[2])
        elif t[1]:
            t[0] = [t[1]]
        else:
            t[0] = []
605778
function Context(resolve, reject, custom) {
    this.resolve = resolve;
    this.reject = reject;
    this.custom = custom;
  }
132007
def wraps_with_context(func, context):
    """"""
    wrapped = functools.partial(func, context)
    wrapped = functools.wraps(func)(wrapped)
    if asyncio.iscoroutinefunction(func):
        wrapped = asyncio.coroutine(wrapped)
    return wrapped
1311786
def _contextualize(self):
        """"""
        line, column = self.pos
        #Get the module top-level information
        self._get_module(line)
        if self.module is None:
            return
        
        #Use the position of the cursor in the file to decide which
        #element we are working on.
        self.element = self.module.get_element(line, column)

        #Now all that's left is to contextualize the line that the
        #cursor is on.
        self._deep_match(line, column)
638615
function(_context) {
        if(this.is_object(_context)) {
          return _context;
        } else {
          var iterator = ".";
          if(this.pragmas["IMPLICIT-ITERATOR"]) {
            iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator;
          }
          var ctx = {};
          ctx[iterator] = _context;
          return ctx;
        }
      }
343797
def set_context(context):
    """"""
    global _context
    _context = {k: v for k, v in context.items()}
257219
private static Context[] convertToContexts(TIntParamHashMap[] params) {
      Context[] contexts = new Context[params.length];
      for (int pi=0;pi<params.length;pi++) {
        int[] activeOutcomes = params[pi].keys();
        double[] activeParameters = new double[activeOutcomes.length];
        for (int oi=0;oi<activeParameters.length;oi++) {
          activeParameters[oi] = params[pi].get(activeOutcomes[oi]);
        }
        contexts[pi] = new Context(activeOutcomes,activeParameters);
      }
      return contexts;
    }
1372898
public static void enrichContext(Context context) {
		context.setPostProperty(Context.MEMORY_TOTAL, Runtime.getRuntime().totalMemory());
		context.setPostProperty(Context.MEMORY_FREE, Runtime.getRuntime().freeMemory());
		context.setPostProperty(Context.MEMORY_USED, Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory());
	}
315461
function childContext(path, context) {
  const { settings, parserOptions, parserPath } = context
  return {
    settings,
    parserOptions,
    parserPath,
    path,
  }
}
576293
function context(str) {
  var arr = code(str);
  var len = arr.length, i = 0;
  var res = {};

  while (len--) {
    var ele = arr[i++];
    if (ele.type !== 'comment') {
      res[ele.name] = ele.begin;
    }
  }
  return res;
}
427091
def set_context(self, data):
        """"""
        for key in data:
            setattr(self.local_context, key, data[key])
977278
function setContext(req, res, next) {
    currentContext = {req: req, res: res};
    next();
}
1185429
function context(self, method) {
  if (self instanceof Primus) return;

  var failure = new Error('Primus#'+ method + '\'s context should called with a Primus instance');

  if ('function' !== typeof self.listeners || !self.listeners('error').length) {
    throw failure;
  }

  self.emit('error', failure);
}
556244
def get_context(self):
        
        ctx = {}
        for clause in self.where_clauses or []:
            clause.update_context(ctx)
        return ctx
1095899
@Override
    public void visitClassContext(ClassContext context) {
        try {
            JavaClass cls = context.getJavaClass();
            if (!cls.isEnum() && (cls.getMajor() >= Const.MAJOR_1_5)) {
                Method[] methods = cls.getMethods();
                for (Method m : methods) {
                    if (Values.CONSTRUCTOR.equals(m.getName()) && !m.isPrivate()) {
                        return;
                    }
                }
                firstEnumPC = 0;
                enumCount = 0;
                enumConstNames = new HashSet<String>(10);
                super.visitClassContext(context);
            }
        } finally {
            enumConstNames = null;
        }
    }