Method that gets invoked periodically by the container
199033
public void run(CallURL args) {

        logger = LoggerUtil.getStandardLogger();
        logger.info("Calling ProcessSlaScheduledJob");
        TransactionWrapper transaction = null;
        EngineDataAccessDB edao = new EngineDataAccessDB();
        SimpleDateFormat sdfStatDate = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        try {
            transaction = edao.startTransaction();
            //long dbtime = getDatabaseTime();
            long dbtime =DatabaseAccess.getCurrentTime();
            Calendar systcalendar = Calendar.getInstance();
            systcalendar.setTimeInMillis(dbtime);

            for (Process processVO : ProcessCache.getAllProcesses()) {
                int sla = 0;
                processVO = ProcessCache.getProcess(processVO.getId());
                if ((processVO.getAttribute("SLA") != null && processVO.getAttribute("SLA") != "")) {

                    sla = Integer.parseInt(processVO.getAttribute("SLA"));
                    boolean dealyHandlerDefined = false;
                    if (sla > 0) {
                        List <Process> subProcess = processVO.getSubprocesses();
                        for (Process sProcess : subProcess){
                            if(sProcess.getName().contains("Delay Handler")){
                                dealyHandlerDefined = true;
                                if (dealyHandlerDefined) break;
                            }
                        }
                      if (dealyHandlerDefined){
                        ArrayList<ProcessInstance> listProcessVo = getProcessInstances(processVO.getId());

                        for (ProcessInstance tempProcessVO : listProcessVo) {

                            String processStartDate = tempProcessVO.getStartDate();
                            Date date = sdfStatDate.parse(processStartDate);
                            Calendar processCalendar = Calendar.getInstance();
                            processCalendar.setTimeInMillis(date.getTime());

                            if (ServiceLevelAgreement.INTERVAL_MINUTES.equals(processVO.getAttribute(SLA_UNIT))) {
                                processCalendar.add(Calendar.MINUTE, sla);
                            }
                            else if (ServiceLevelAgreement.INTERVAL_HOURS.equals(processVO.getAttribute(SLA_UNIT))) {
                                processCalendar.add(Calendar.HOUR, sla);
                            }
                            else if (ServiceLevelAgreement.INTERVAL_DAYS.equals(processVO.getAttribute(SLA_UNIT))) {
                                processCalendar.add(Calendar.DATE, sla);
                            }
                            boolean eligibleToProcess = processCalendar.compareTo(systcalendar) < 0;

                            if (eligibleToProcess) {
                                List<ActivityInstance> activityList = tempProcessVO
                                        .getActivities();
                                for (ActivityInstance tempActivityInstanceVO : activityList) {
                                    if (tempActivityInstanceVO.getStatusCode() == WorkStatus.STATUS_WAITING
                                            .intValue()
                                            || tempActivityInstanceVO.getStatusCode() == WorkStatus.STATUS_IN_PROGRESS
                                                    .intValue()) {
                                        InternalEvent event = InternalEvent
                                                .createActivityDelayMessage(tempActivityInstanceVO,
                                                        tempProcessVO.getMasterRequestId());
                                        logger.info("SLA clean event=" + event);
                                        ProcessEngineDriver driver = new ProcessEngineDriver();
                                        driver.processEvents(null, event.toXml());
                                    }

                                }
                            }
                        }
                      }
                    }
                }

            }

        }
        catch (Exception exp) {
            logger.severeException(exp.getMessage(), exp);
        }
        finally {
            try {
                edao.stopTransaction(transaction);
            }
            catch (Exception exp) {
                logger.severeException(exp.getMessage(), exp);
            }
        }
    }
776870
function delayEvent( type, instance, container ) {
			return function( event ) {
				container._trigger( type, event, instance._uiHash( instance ) );
			};
		}
311402
def on_self
      scope  = current_scope
      method = scope.lookup(scope.method_call_type, 'self')

      push_value(method.return_value)
    end
766610
function() {

		if (this._is_inDOM) {

			if (this._container) {

				this._is_dirty = true;

				if (!this._is_queued_for_refresh) {

					Lava.view_manager.scheduleViewRefresh(this);
					this._is_queued_for_refresh = true;

				}

			} else if (this._parent_with_container) {

				this._parent_with_container.trySetDirty();

			}

		}

	}
160219
private void runLifecycleMethods(Object handler, Scope scope, Scope targetMethodScope, boolean isDestroy) throws Exception {
        String description = isDestroy ? "@Destroy" : "@Initialize";
        log.debug("Running " + description + " methods for Handler " + handler);

        Class<?> handlerClass = handler.getClass();
        for (Method method : handlerClass.getMethods()) {   //getMethods() includes inherited methods
            if (method.getParameterTypes().length == 0) {

                Scope methodScope = getMethodScope(isDestroy, method);

                //if this lifecycle method is for the correct cope, then run it
                if (methodScope != null && methodScope == targetMethodScope) {
                    log.trace("Found " + description + " annotation with scope " + targetMethodScope + " on handler method " + method + " and will now invoke it");
                    try {
                        method.invoke(handler);
                    } catch ( Throwable t) {
                        log.warn("Exception when calling " + description + " method [" + method + "] with scope " + targetMethodScope + " on handler " + handlerClass, t);
                    }
                }
            }
        }
    }
465156
public PeriodicEvent runAfter(Runnable task, float delay) {
        validateDelay(delay);
        return new Event(task, delay);
    }
1352145
def invoke(self, method, *args):
        
        def inv(value, *ar):
            if (
                _(method).isFunction() or
                _(method).isLambda() or
                _(method).isMethod()
            ):
                return method(value, *args)
            else:
                return getattr(value, method)(*args)
        return self._wrap(self._clean.map(inv))
755092
function _on (event, method, context) {
  /* eslint-disable no-invalid-this */
  var bindings
  validateMethod(method, context)
  if (this.__events__.hasOwnProperty(event)) {
    bindings = this.__events__[event]
  } else {
    // Auto-initialize bindings list
    bindings = this.__events__[event] = []
  }
  // Add binding
  bindings.push({
    method: method,
    context: context || null
  })
  if (DEBUG) {
    count++
    console.info('_on()', event, method.name, context, this)
    console.info(COUNT_MSG, count)
  }
  return this
  /* eslint-enable no-invalid-this */
}
1098233
private <I extends Message, O extends Message> ListenableFuture<JsonRpcResponse> invoke(
      ServerMethod<I, O> method, JsonObject parameter, JsonElement id) {
    I request;
    try {
      request = (I) Messages.fromJson(method.inputBuilder(), parameter);
    } catch (Exception e) {
      serverLogger.logServerFailure(method, e);
      SettableFuture<JsonRpcResponse> future = SettableFuture.create();
      future.setException(e);
      return future;
    }
    ListenableFuture<O> response = method.invoke(request);
    return Futures.transform(response, new JsonConverter(id), TRANSFORM_EXECUTOR);
  }
1211381
def call(method, *args, **kwargs):
    '''
    
    '''
    kwargs = clean_kwargs(**kwargs)
    if not netmiko_device['always_alive']:
        connection = ConnectHandler(**netmiko_device['args'])
        ret = getattr(connection, method)(*args, **kwargs)
        connection.disconnect()
        return ret
    return getattr(netmiko_device['connection'], method)(*args, **kwargs)
1026228
private Consumer wrapVoidMethod(Method method) {
    return c -> {
      try {
        method.invoke(this, c);
      } catch (InvocationTargetException e) {
        throw new CommandException(e);
      } catch (IllegalAccessException e) {
        throw new AssertionError(e);
      }
    };
  }
827636
function (name, method) {
        // TODO: deal with registerPriority in 3.0
        this.map.events.registerPriority(name, this, method);
        this.map.events.registerPriority(name, this, this.setEvent);
    }
603711
@Override
    public Object invoke(MethodInvocation invocation) throws Throwable {
        long start = System.currentTimeMillis();
        Object result = invocation.proceed();
        profilingContainer.register(group, System.currentTimeMillis() - start);
        return result;
    }
759998
function () {
            /*  determine parameters  */
            var params = $cs.params("call", arguments, {
                name:      { pos: 0,     req: true   },
                args:      { pos: "...", def: []     },
                capturing: {             def: false  },
                spreading: {             def: false  },
                bubbling:  {             def: true   }
            });

            /*  dispatch service event onto target component  */
            var ev = this.publish({
                name:         "ComponentJS:service:" + params.name,
                args:         params.args,
                capturing:    params.capturing,
                spreading:    params.spreading,
                bubbling:     params.bubbling,
                firstonly:    true,
                async:        false
            });

            /*  ensure that the service event was successfully dispatched
                at least once (or our result value would have no meaning)  */
            if (!ev.dispatched())
                throw _cs.exception("call", "no such registered service found:" +
                    " \"" + params.name + "\"");

            /*  return the result value  */
            return ev.result();
        }
1268498
@Override
	public void run()
	{
		try
		{
			while (!stopRequired)
			{
				if (traceEnabled)
					log.trace("Thread entering passive wait : "+getName());
				
				// Passive wait
				waitLock.acquire();
				if (stopRequired)
					break;
				
				// Process the container
				if (traceEnabled)
					log.trace("Executing task "+task);

				// Execute task
				task.execute();
				
				// Notify listener
				listener.executionComplete(this);
			}
		}
		catch (Throwable ex)
		{
			log.error("Asynchronous execution thread failed",ex);
		}
		log.debug("Thread exits : "+getName());
	}
196803
private static void invokeMethod(final Object instance, final Method method, final Object[] args)
   {
      final boolean accessability = method.isAccessible();

      try
      {
         method.setAccessible(true);
         method.invoke(instance, args);
      }
      catch (Exception e)
      {
         InjectionException.rethrow(e);
      }
      finally
      {
         method.setAccessible(accessability);
      }
   }
1083748
def on_command_call(receiver, dot, method, args)
      if is_ident?(method) &&
              (constant = resolve_constant_ref(receiver))
        method_call(method, [constant])
      end
      keep_walking(receiver, args)
    end