==========================================================================
5736
public String[] get_attribute_alias_list(Database database, String wildcard)
            throws DevFailed {
        DeviceData argIn = new DeviceData();
        argIn.insert(wildcard);
        DeviceData argOut = command_inout(database, "DbGetAttributeAliasList", argIn);
        return argOut.extractStringArray();
    }
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();
        }
    }
419248
public function run()
    {
        // truncate any tables which are about to be updated
        $this->emptyTables();

        // loop through types and execute
        foreach ($this->dataMigrationTypeProvider->getTypes() as $dataMigration) {
            /** @var AbstractDataMigration $dataMigration */
            $dataMigration->execute();
            $this->logActions($dataMigration);
        }

        /**
         * Save config value
         */
        $this->saveAllOrderStatusesAsString();
        $this->saveAllProductTypesAsString();
        $this->saveAllProductVisibilitiesAsString();
        $this->generateAndSaveCode();
    }
476781
@Override
    int command_inout_asynch_i(final String c, final boolean fgt, final boolean fwd, final int rid) throws DevFailed {
	synchronized (this) {
	    final Iterator it = elements.iterator();
	    while (it.hasNext()) {
		final GroupElement e = (GroupElement) it.next();
		if (e instanceof GroupDeviceElement || fwd) {
		    e.command_inout_asynch_i(c, fgt, fwd, rid);
		}
	    }
	    return rid;
	}
    }
642798
public synchronized void init() {
		for (SocketBinding binding : socketBindings) {
			socketBindingsMap.put(binding.getName(), binding);
		}
		for (SecurityRealm realm : securityRealms) {
			securityRealmsMap.put(realm.getName(), realm);
		}
		for (Interface iface : interfaces) {
			interfacesMap.put(iface.getName(), iface);
		}
		if (subsystem != null) {
			for (UndertowSubsystem.FileHandler handler : subsystem.getFileHandlers()) {
				handlersMap.put(handler.getName(), handler);
			}
			if (subsystem.getFilters() != null) {
				for (UndertowSubsystem.ResponseHeaderFilter filter : subsystem.getFilters().getResponseHeaders()) {
					filtersMap.put(filter.getName(), filter);
				}
				for (UndertowSubsystem.ErrorPageFilter filter : subsystem.getFilters().getErrorPages()) {
					filtersMap.put(filter.getName(), filter);
				}
				for (UndertowSubsystem.CustomFilter filter : subsystem.getFilters().getCustomFilters()) {
					filtersMap.put(filter.getName(), filter);
				}
			}
		}
	}
838348
@Override
    public void setClassProperties(final String name, final Map<String, String[]> properties) throws DevFailed {
        final List<String> args = getArray(properties, name);
        final DeviceData argin = new DeviceData();
        argin.insert(args.toArray(new String[args.size()]));
        database.command_inout("DbPutClassProperty", argin);
    }
1285570
public function build()
    {
        if (!$this->blockname || $this->blockname==='vitals') {
            $this->_distro();
            $this->_hostname();
            $this->_kernel();
            $this->_uptime();
            $this->_users();
            $this->_loadavg();
            $this->_processes();
        }
        if (!$this->blockname || $this->blockname==='hardware') {
            $this->_machine();
            $this->_cpuinfo();
            $this->_pci();
            $this->_ide();
            $this->_scsi();
            $this->_nvme();
            $this->_usb();
            $this->_i2c();
        }
        if (!$this->blockname || $this->blockname==='network') {
            $this->_network();
        }
        if (!$this->blockname || $this->blockname==='memory') {
            $this->_memory();
        }
        if (!$this->blockname || $this->blockname==='filesystem') {
            $this->_filesystems();
        }
    }
93114
static void init() {
        contextMap = null;
        final PropertiesUtil managerProps = PropertiesUtil.getProperties();
        disableAll = managerProps.getBooleanProperty(DISABLE_ALL);
        useStack = !(managerProps.getBooleanProperty(DISABLE_STACK) || disableAll);
        useMap = !(managerProps.getBooleanProperty(DISABLE_MAP) || disableAll);

        contextStack = new Log4jv2ThreadContextStack(useStack);
        contextMap = new Log4jv2ThreadContextMap();
    }
775221
public function build()
    {
        if (!$this->blockname || $this->blockname==='vitals') {
            $this->distro();
            $this->hostname();
            $this->kernel();
            $this->_users();
            $this->loadavg();
        }
        if (!$this->blockname || $this->blockname==='hardware') {
            $this->cpuinfo();
            $this->pci();
            $this->ide();
            $this->scsi();
            $this->usb();
        }
        if (!$this->blockname || $this->blockname==='memory') {
            $this->memory();
        }
        if (!$this->blockname || $this->blockname==='filesystem') {
            $this->filesystems();
        }
    }
214308
public function process()
    {
        if (!$this->getForm()->isSubmitted()) {
            return;
        }

        parent::process();

        $this->processValues();

        if (
            $this->required &&
            count($this->values) == 0 &&
            $this->isSensitive()
        ) {
            $this->addMessage($this->getValidationMessage('required'));
        }
    }
1363690
@Override
    public void onCreate(SQLiteDatabase db) {
        try {
            if(builder.tables == null){
                throw new SQLiteHelperException("The array of String tables can't be null!!");
            }
            executePragma(db);

            builder.onCreateCallback.onCreate(db);
        } catch (SQLiteHelperException e) {
            Log.e(this.getClass().toString(), Log.getStackTraceString(e), e);
        }
    }
1317871
public function done()
    {
        if ($this->watcher) {
            if ($this->watcher->count > 0) {
                $this->watcher->count--;
            }
            
            $this->watcher = null;
        }
    }
827025
public function resolve()
    {
        $this->data = [
            'status' => [
                'code' => $this->getStatusCode(),
                'text' => $this->getStatusText(),
            ],
            'charset' => $this->getCharset(),
            'maxAge' => $this->getMaxAge(),
            'expires' => $this->getExpires(),
            'lastModified' => $this->getLastModified(),
            'ttl' => $this->getTtl()
        ];
    }
279031
@Override
    public void (final int timeout, final boolean fwd) throws DevFailed {
	synchronized (this) {
	    final Iterator it = elements.iterator();
	    while (it.hasNext()) {
		final GroupElement e = (GroupElement) it.next();
		if (e instanceof GroupDeviceElement || fwd) {
		    e.(timeout, fwd);
		}
	    }
	}
    }
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");
    }
428198
public synchronized void rem_obj_polling(final String[] argin, final boolean with_db_upd)
            throws DevFailed {
        Util.out4.println("In rem_obj_polling command");
        for (final String arg : argin) {
            Util.out4.println("Input string = " + arg);
        }

        // Check that parameters number is correct
        if (argin.length != 3) {
            Except.throw_exception("API_WrongNumberOfArgs", "Incorrect number of inout arguments",
                    "DServer.rem_obj_polling");
        }

        // Find the device
        final Util tg = Util.instance();
        DeviceImpl dev = null;
        try {
            dev = tg.get_device_by_name(argin[0]);
        } catch (final DevFailed e) {
            Except.re_throw_exception(e, "API_DeviceNotFound", "Device " + argin + " not found",
                    "DServer.rem_obj_polling");
        }
        // Check that the device is polled
        assert dev != null;
        if (dev.is_polled() == false) {
            Except.throw_exception("API_DeviceNotPolled", "Device " + argin[0] + " is not polled",
                    "DServer.rem_obj_polling_period");
        }

        // Find the wanted object in the list of device polled object
        final String obj_type = argin[1].toLowerCase();
        final String obj_name = argin[2].toLowerCase();
        int type = Tango_POLL_CMD;

        if (obj_type.equals(Tango_PollCommand)) {
            type = Tango_POLL_CMD;
        } else if (obj_type.equals(Tango_PollAttribute)) {
            type = Tango_POLL_ATTR;
        } else {
            Except.throw_exception("API_NotSupported",
                    "Object type " + obj_type + " not supported", "DServer.rem_obj_polling_period");
        }

        final Vector poll_list = dev.get_poll_obj_list();
        for (int i = 0; i < poll_list.size(); i++) {
            final PollObj poll_obj = (PollObj) poll_list.elementAt(i);
            if (poll_obj.get_type() == type) {
                if (poll_obj.get_name().equals(obj_name)) {
                    poll_list.remove(i);
                }
            }
        }

        Util.out4.println("Sending cmd to polling thread");
        final TangoMonitor mon = tg.get_poll_monitor();
        final PollThCmd shared_cmd = tg.get_poll_shared_cmd();
        if (shared_cmd.cmd_pending == true) {
            mon.signal();
        }
        shared_cmd.cmd_pending = true;
        shared_cmd.cmd_code = Tango_POLL_REM_OBJ;
        shared_cmd.dev = dev;
        shared_cmd.name = obj_name;
        shared_cmd.type = type;
        mon.signal();

        Util.out4.println("Cmd sent to polling thread");

        // Wait for thread to execute command
        boolean interrupted;
        while (shared_cmd.cmd_pending == true) {
            interrupted = mon.wait_it(Tango_DEFAULT_TIMEOUT);
            if (shared_cmd.cmd_pending == true && interrupted == false) {
                // Util.out4
                System.out.println("TIME OUT");
                Except.throw_exception("API_CommandTimedOut", "Polling thread blocked !!!",
                        "DServer.rem_obj_polling");
            }
        }
        Util.out4.println("Thread cmd normally executed");

        // Mark the device as non polled if this was the last polled object
        if (poll_list.size() == 0) {
            dev.is_polled(false);
        }

        // Update database property. This means remove object entry in the
        // polling
        // properties if they exist or add it to the list of device not polled
        // for automatic polling defined at command/attribute level.
        // Do this if possible and wanted.
        if (with_db_upd && Util._UseDb) {
            final DbDatum db_info = new DbDatum("polled_attr");
            boolean update_needed = false;
            if (type == Tango_POLL_CMD) {
                db_info.name = "polled_cmd";
                final Vector cmd_list = dev.get_polled_cmd();
                int i;
                for (i = 0; i < cmd_list.size(); i++) {
                    final String s = (String) cmd_list.elementAt(i);
                    if (s.equals(obj_name)) {
                        cmd_list.remove(i);
                        cmd_list.remove(i);
                        db_info.insert(stringVect2StringArray(cmd_list));
                        update_needed = true;
                        break;
                    }
                    i++;
                }
                if (update_needed == false) {
                    final Vector non_auto_cmd = dev.get_non_auto_polled_cmd();
                    for (i = 0; i < non_auto_cmd.size(); i++) {
                        final String s = (String) non_auto_cmd.elementAt(i);
                        if (s.equals(obj_name)) {
                            break;
                        }
                    }
                    if (i == cmd_list.size()) {
                        non_auto_cmd.add(obj_name);
                        db_info.name = "non_auto_polled_cmd";
                        db_info.insert(stringVect2StringArray(non_auto_cmd));
                        update_needed = true;
                    }
                }
            } else {
                final Vector attr_list = dev.get_polled_attr();
                int i;
                for (i = 0; i < attr_list.size(); i++) {
                    final String s = (String) attr_list.elementAt(i);
                    if (s.equals(obj_name)) {
                        attr_list.remove(i);
                        attr_list.remove(i);
                        db_info.insert(stringVect2StringArray(attr_list));
                        update_needed = true;
                        break;
                    }
                    i++;
                }
                if (update_needed == false) {
                    final Vector non_auto_attr = dev.get_non_auto_polled_attr();
                    for (i = 0; i < non_auto_attr.size(); i++) {
                        final String s = (String) non_auto_attr.elementAt(i);
                        if (s.equals(obj_name)) {
                            break;
                        }
                    }
                    if (i == attr_list.size()) {
                        non_auto_attr.add(obj_name);
                        db_info.name = "non_auto_polled_cmd";
                        db_info.insert(stringVect2StringArray(non_auto_attr));
                        update_needed = true;
                    }
                }
            }
            if (update_needed == true) {
                final DbDatum[] send_data = new DbDatum[1];
                send_data[0] = db_info;
                dev.get_db_device().put_property(send_data);
                Util.out4.println("Polling properties updated");
            }
        }
    }
1319746
public function updateConfiguration()
    {
        $this->getEventDispatcher()->dispatch(
            UpdateConfigurationEvent::NAME,
            new UpdateConfigurationEvent($this->getWebserviceId(), $this->getConfiguration())
        );
    }