=========================================================================
435831
public Expr[] translateExpressions(Tuple<WyilFile.Expr> loc, LocalEnvironment environment) {
		ArrayList<Expr> results = new ArrayList<>();
		for (int i = 0; i != loc.size(); ++i) {
			WyilFile.Expr operand = loc.get(i);
			Tuple<Type> types = operand.getTypes();
			if (types == null) {
				results.add(translateExpression(loc.get(i), null, environment));
			} else {
				for (int j = 0; j != types.size(); ++j) {
					results.add(translateExpression(operand, j, environment));
				}
			}
		}
		return results.toArray(new Expr[results.size()]);
	}
412516
public function modifyTable()
    {
        if (!$this->getTable()->containsColumn($this->getParameter('create_column'))) {
            $this->getTable()->addColumn(array(
                'name' => $this->getParameter('create_column'),
                'type' => 'TIMESTAMP'
            ));
        }

        if ($this->withUpdatedAt()) {
            if (!$this->getTable()->containsColumn($this->getParameter('update_column'))) {
                $this->getTable()->addColumn(array(
                    'name' => $this->getParameter('update_column'),
                    'type' => 'TIMESTAMP'
                ));
            }
        }
    }
269133
static void subscribeIfNotDone() {
        Enumeration<String > callbackKeys = failed_event_callback_map.keys();
        while (callbackKeys.hasMoreElements()) {
            String callbackKey = callbackKeys.nextElement();
            EventCallBackStruct eventCallBackStruct = failed_event_callback_map.get(callbackKey);
            if (eventCallBackStruct.consumer!=null) {
                try {
                    subscribeIfNotDone(eventCallBackStruct, callbackKey);
                } catch (DevFailed e) {
                    //	Send error to callback
                    sendErrorToCallback(eventCallBackStruct, callbackKey, e);
                }
            }
            else {
                if (EventConsumerUtil.isZmqLoadable()) {
                    try {
                        //  Try for zmq
                        eventCallBackStruct.consumer = ZmqEventConsumer.getInstance();
                        subscribeIfNotDone(eventCallBackStruct, callbackKey);
                        return;

                    }
                    catch (DevFailed e) {
                        if (e.errors[0].desc.equals(ZMQutils.SUBSCRIBE_COMMAND_NOT_FOUND)) {
                            try {
                                //  Try for notifd
                                eventCallBackStruct.consumer = NotifdEventConsumer.getInstance();
                                subscribeIfNotDone(eventCallBackStruct, callbackKey);
                                return;
                            }
                            catch (DevFailed e2) {
								//TODO use DevFailedUtils#printDevFailed from JTangoCommons
                               System.err.println(e2.errors[0].desc);
                                //  reset if both have failed
                                eventCallBackStruct.consumer = null;
                                //	Send error to callback
                                sendErrorToCallback(eventCallBackStruct, callbackKey, e2);
                            }
                        }
                        else {
                            //	Send error to callback
                            eventCallBackStruct.consumer = null;
                            sendErrorToCallback(eventCallBackStruct, callbackKey, e);
                        }
                    }
                }
                else
                {
                    try {
                        //  Try for notifd
                        eventCallBackStruct.consumer = NotifdEventConsumer.getInstance();
                        subscribeIfNotDone(eventCallBackStruct, callbackKey);
                        return;
                    }
                    catch (DevFailed e) {
						//TODO use DevFailedUtils#printDevFailed from JTangoCommons
                        System.err.println(e.errors[0].desc);
                        //	Send error to callback
                        sendErrorToCallback(eventCallBackStruct, callbackKey, e);
                    }
                }
            }
        }
    }
885885
public function validateResolved()
    {
        $this->prepareForValidation();

        if (! $this->passesAuthorization()) {
            $this->failedAuthorization();
        }

        $instance = $this->getValidatorInstance();

        if ($instance->fails()) {
            $this->failedValidation($instance);
        }
    }
759689
public function init()
    {
        $this->renameTableQueries = array();
        $this->dropCheckQueries = array();
        $this->dropForeignKeyQueries = array();
        $this->dropIndexQueries = array();
        $this->dropPrimaryKeyQueries = array();
        $this->dropColumnQueries = array();
        $this->alterColumnQueries = array();
        $this->createColumnQueries = array();
        $this->createPrimaryKeyQueries = array();
        $this->createIndexQueries = array();
        $this->createForeignKeyQueries = array();
        $this->createCheckQueries = array();
    }
386572
void check_command_exists(final String cmd_name) throws DevFailed {
	final Vector cmd_list = device_class.get_command_list();
	for (int i = 0; i < cmd_list.size(); i++) {
	    final Command cmd = (Command) cmd_list.elementAt(i);
	    if (cmd.get_name().toLowerCase().equals(cmd_name)) {
		if (cmd.get_in_type() != Tango_DEV_VOID) {
		    Except.throw_exception("API_IncompatibleCmdArgumentType", "Command " + cmd_name
			    + " cannot be polled because it needs input value",
			    "DeviceImpl.check_command_exists");
		}
		return;
	    }
	}

	Except.throw_exception("API_CommandNotFound", "Command " + cmd_name + " not found",
		"DeviceImpl.check_command_exists");
    }
654028
public function build()
    {
        parent::build();
        if (!$this->blockname || $this->blockname==='vitals') {
            $this->_uptime();
            $this->_processes();
        }
        if (!$this->blockname || $this->blockname==='hardware') {
            $this->_tb();
        }
        if (!$this->blockname || $this->blockname==='network') {
            $this->_network();
        }
    }
1296171
public function setup()
    {
        $this->configure();
        $this->handleAppInclude();
        $this->validateConfiguration();
        $this->setupLogger();
        $this->setupRedis();
        $this->setupRedisEvents();
        $this->setupQueueStorage();
        $this->setupQueueFactory();
        $this->setupQueueRegistryAdapter();
        $this->setupQueueRegistry();
        $this->setupQueues();
        $this->setupFailureBackend();
        $this->setupStatisticBackend();
        $this->setupJobInstanceFactory();
        $this->setupWorkerFactory();
        $this->setupWorkerRegistryAdapter();
        $this->setupWorkerRegistry();
        $this->setupWorkers();
        $this->setupForeman();
    }
245242
private function init()
    {
        /** @var $genericDevice \Wurfl\Device\ModelDeviceInterface */
        $genericDevice = $this->getDevice(WurflConstants::GENERIC);

        if (!is_null($genericDevice)) {
            $this->capabilitiesName       = array_keys($genericDevice->getCapabilities());
            $this->groupIDCapabilitiesMap = $genericDevice->getGroupIdCapabilitiesNameMap();
        }
    }
670801
public function init()
    {
        parent::init();

        foreach ($this->columns as $column) {
            $column->init();
            // index the column by id if it is not already indexed
            if (!array_key_exists($column->id, $this->columns_by_id)) {
                $this->columns_by_id[$column->id] = $column;
            }
        }

        foreach ($this->extra_rows as $row) {
            $row->init();
            // index the row by id if it is not already indexed
            if (!array_key_exists($row->id, $this->rows_by_id)) {
                $this->rows_by_id[$row->id] = $row;
            }
        }

        foreach ($this->groups as $group) {
            $group->init();
            // index the group by id if it is not already indexed
            if (!array_key_exists($group->id, $this->groups_by_id)) {
                $this->groups_by_id[$group->id] = $group;
            }
        }

        foreach ($this->spanning_columns as $column) {
            $column->init();
            // index the row column by id if it is not already indexed
            if (!array_key_exists($column->id, $this->spanning_columns_by_id)) {
                $this->spanning_columns_by_id[$column->id] = $column;
            }
        }
    }
221131
public void execute() throws DevFailed {
        GroupCmdReplyList replies;
        if (isArginVoid()) {
            replies = group.command_inout(commandName, true);
        } else {
            replies = group.command_inout(commandName, inData, true);
        }
        if (replies.has_failed()) {
            // get data to throw e
            for (final Object obj : replies) {
                ((GroupCmdReply) obj).get_data();
            }
        }
    }
832681
public function init()
    {
        if (true === $this->beforeInit()) {
            HasPropertiesEvent::on(HasProperties::class, HasProperties::EVENT_AFTER_SAVE, [$this, 'onSave']);
            HasPropertiesEvent::on(HasProperties::class, HasProperties::EVENT_AFTER_UPDATE, [$this, 'onUpdate']);
            HasPropertiesEvent::on(HasProperties::class, HasProperties::EVENT_BEFORE_DELETE, [$this, 'onDelete']);
        }
    }
364348
public function build()
    {
        /** @var Buildable[] $delayed */
        $delayed = [];

        foreach ($this->getQueued() as $buildable) {
            if ($buildable instanceof Delay) {
                $delayed[] = $buildable;
            } else {
                $buildable->build();
            }
        }

        foreach ($delayed as $buildable) {
            $buildable->build();
        }
    }
729579
void upd_database(AttributeConfig conf,String dev_name) throws DevFailed
	{
		Util.out4.println("Entering upd_database method for attribute " + name);
		
		DbAttribute	db_attr = new DbAttribute(name);

		// Check if each attribute property is not the default value. Only properties
		// not having the default value will be sent to the database
		if (conf.description.equals(Tango_DescNotSpec) != true)
			db_attr.add("description", new String[] {conf.description});
	
		if (conf.label.equals(Tango_LabelNotSpec) != true)
			db_attr.add("label", new String[] {conf.label});
	
		if (conf.unit.equals(Tango_UnitNotSpec) != true)
			db_attr.add("unit", new String[] {conf.unit});
	
		if (conf.standard_unit.equals(Tango_StdUnitNotSpec) != true)
			db_attr.add("standard_unit", new String[] {conf.standard_unit});

		if (conf.display_unit.equals(Tango_DispUnitNotSpec) != true)
			db_attr.add("display_unit", new String[] {conf.display_unit});

		if (conf.format.equals(Tango_FormatNotSpec) != true)
			db_attr.add("format", new String[] {conf.format});

		if (conf.min_value.equals(Tango_AlrmValueNotSpec) != true)
			db_attr.add("min_value", new String[] {conf.min_value});

		if (conf.max_value.equals(Tango_AlrmValueNotSpec) != true)
			db_attr.add("max_value", new String[] {conf.max_value});

		if (conf.min_alarm.equals(Tango_AlrmValueNotSpec) != true)
			db_attr.add("min_alarm", new String[] {conf.min_alarm});
	
		if (conf.max_alarm.equals(Tango_AlrmValueNotSpec) != true)
			db_attr.add("max_alarm", new String[] {conf.max_alarm});

		// Update db only if needed
		if (db_attr.size()>0)
		{		
			Util.out4.println(db_attr.size() + " properties to update in db");
			ApiUtil.get_db_obj().put_device_attribute_property(dev_name, db_attr);
		}
						
		Util.out4.println("Leaving upd_database method");
	}
129034
public void init(final Connection connection) throws DevFailed {
		// Check Tango Host Properties (host name, port number)
		// ------------------------------------------------------------
		connection.url = new TangoUrl();
		connection.setDevice_is_dbase(true);
		connection.transparent_reconnection = true; // Always true for Database
		//connection.url.trace();

		ApiUtil.get_orb();
		connect_to_dbase(connection);
		connection.devname = connection.device.name();
		connection.setAlready_connected(true);
    }
184752
public function compile()
    {
        if (null !== $this->parameterBag) {
            $blocks = $this->getCoreBlocks();
            $blocks = array_merge($blocks, $this->getThirdPartyBlocks());
            foreach ($blocks as $block) {
                $this->prepareBlock($block);
            }
        }

        Config::read($this);

        parent::compile();
    }
139742
@Init
    @StateMachine(endState = DeviceState.ON)
    public void init() throws DevFailed {
        xlogger.entry();
        TangoCacheManager.setPollSize(pollingThreadsPoolSize);
        // logger.debug("init admin device with quartzThreadsPoolSize = {}",
        // quartzThreadsPoolSize);
        status = "The device is ON\nThe polling is ON";
        tangoStats = TangoStats.getInstance();
        xlogger.exit();
    }