==========================================================================
346330
public int subscribe_event(int event, int max_size, boolean stateless) throws DevFailed {
        if (!useEvents())
            Except.throw_exception("NO_EVENT", "Event system not available");
        return deviceProxyDAO.subscribe_event(this, event, max_size, stateless);
    }
78714
public function process()
    {
        if (ini_get('display_errors')) {
            $this->display();
        }

        if (ini_get('log_errors')) {
            $this->log();
        }

        if ($this->severity & self::$fatal_severity) {
            exit(1);
        }
    }
1174745
public function onBeforeWrite()
    {
        if (!$this->isInDB()) {
            $this->CreatorID = Member::currentUserID();
        }

        if (!$this->VersionNumber) {
            $versions = DataObject::get(
                'FileVersion', sprintf('"FileID" = %d', $this->FileID)
            );

            if ($versions) {
                $this->VersionNumber = $versions->Count() + 1;
            } else {
                $this->VersionNumber = 1;
            }
        }

        if (!$this->Filename) {
            $this->Filename = $this->saveCurrentVersion();
        }

        parent::onBeforeWrite();
    }
432541
public function enable()
    {
        if ($this->enabled) {
            return;
        }
        if (!$this->fd) {
            return;
        }
        $this->enabled = true;
        if ($this->ev === null) {
            if ($this->eventLoop === null) {
                $this->eventLoop = EventLoop::$instance;
            }
            $this->ev = $this->eventLoop->listener(
                [$this, 'onAcceptEv'],
                null,
                \EventListener::OPT_CLOSE_ON_FREE | \EventListener::OPT_REUSEABLE,
                -1,
                $this->fd
            );
            $this->onBound();
        } else {
            $this->ev->enable();
        }
    }
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();
        }
    }
1340171
public void putDevicePipeProperty(String deviceName, ArrayList<DbPipe> dbPipes) throws DevFailed {
        for (DbPipe dbPipe : dbPipes)
            databaseDAO.putDevicePipeProperty(this, deviceName, dbPipe);
    }
575485
public function execute()
    {
        $params = $this->getRequest()->getParams();
        $from = $params['from'];
        $to = $params['to'];
        if ($from && $to) {
            $error = $this->helper->validateDateRange(
                $from,
                $to
            );
            if (is_string($error)) {
                $this->messageManager->addErrorMessage($error);
            } else {
                $this->catalog->resetCatalog($from, $to);
                $this->messageManager->addSuccessMessage(__('Done.'));
            }
        } else {
            $this->catalog->resetCatalog();
            $this->messageManager->addSuccessMessage(__('Done.'));
        }

        $redirectUrl = $this->getUrl(
            'adminhtml/system_config/edit',
            ['section' => 'connector_developer_settings']
        );
        $this->_redirect($redirectUrl);
    }
885885
public function validateResolved()
    {
        $this->prepareForValidation();

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

        $instance = $this->getValidatorInstance();

        if ($instance->fails()) {
            $this->failedValidation($instance);
        }
    }
1093632
public void add_device(String devname, String classname, String servname) throws DevFailed {
		databaseDAO.add_device(this, devname, classname, servname);
    }
29630
public void putDevicePipeProperty(Database database, String deviceName, DbPipe dbPipe) throws DevFailed {
        DeviceData argIn = new DeviceData();
        String[]    array = ApiUtil.toStringArray(deviceName, dbPipe);
        argIn.insert(array);
        database.command_inout("DbPutDevicePipeProperty", argIn);
    }
1000705
public void put_device_attribute_property(Database database, String deviceName, DbAttribute[] attr)
            throws DevFailed {
        if (!database.isAccess_checked()) checkAccess(database);

        DeviceData argIn = new DeviceData();
        try {
            //	value is an array
            argIn.insert(ApiUtil.toStringArray(deviceName, attr, 2));
            command_inout(database, "DbPutDeviceAttributeProperty2", argIn);
        } catch (DevFailed e) {
            if (e.errors[0].reason.equals("API_CommandNotFound")) {
                //	Value is just one element
                argIn.insert(ApiUtil.toStringArray(deviceName, attr, 1));
                command_inout(database, "DbPutDeviceAttributeProperty", argIn);
            } else
                throw e;
        }
    }
3823
public function init()
    {
        $this->_init();

        if ($this->id_field) {
            $this->addField($this->id_field, [
                'system'    => true,
            ]);
        }
    }
53774
public function process()
    {
        parent::process();

        try {
            $value = $this->getNumericValue($this->value);
        } catch (SwatIntegerOverflowException $e) {
            $value = null;
        }

        if ($value !== null) {
            if (
                $this->minimum_value !== null &&
                $value < $this->minimum_value
            ) {
                $message = $this->getValidationMessage('below-minimum');
                $minimum_value = str_replace(
                    '%',
                    '%%',
                    $this->getDisplayValue($this->minimum_value)
                );

                $message->primary_content = sprintf(
                    $message->primary_content,
                    $minimum_value
                );

                $this->addMessage($message);
            }
            if (
                $this->maximum_value !== null &&
                $value > $this->maximum_value
            ) {
                $message = $this->getValidationMessage('above-maximum');
                $maximum_value = str_replace(
                    '%',
                    '%%',
                    $this->getDisplayValue($this->maximum_value)
                );

                $message->primary_content = sprintf(
                    $message->primary_content,
                    $maximum_value
                );

                $this->addMessage($message);
            }
        }
    }
1043875
public function persistData()
    {
        $handlers = $this->getHandlers();

        foreach ($handlers as $handler) {
            /** @var $handler \Wurfl\Handlers\AbstractHandler */
            $handler->setLogger($this->logger);

            $handler->persistData();
        }
    }
1151876
private long doPing(final Connection connection) throws DevFailed {
		checkIfTango(connection, "ping");

		build_connection(connection);

		final long t0 = System.currentTimeMillis();
		try {
	    	connection.device.ping();
		} catch (final DevFailed e) {
	    	final String reason = "TangoApi_CANNOT_PING_DEVICE";
	    	final String desc = "Cannot ping " + connection.devname;
	    	final String origin = "Connection.ping()";
	    	Except.throw_connection_failed(e, reason, desc, origin);
		} catch (final Exception e) {
	    	ApiUtilDAODefaultImpl.removePendingRepliesOfDevice(connection);
	    	throw_dev_failed(connection, e, "ping", false);
		}

		final long t1 = System.currentTimeMillis();
		return (int) (t1 - t0) * 1000; // Set as micro seconds
    }
1317871
public function done()
    {
        if ($this->watcher) {
            if ($this->watcher->count > 0) {
                $this->watcher->count--;
            }
            
            $this->watcher = null;
        }
    }
74861
public function reset ()
    {
        $this->isUserSubmitted     = false;
        $this->isProcessed         = false;
        $this->isCallbacksubmitted = false;
        parent::reset();
    }