==================================================================================================
2190
public static void main(String[] args)
    {
        if (args.length != 2)
        {
            System.err.println("Usage: StyleImport <url> <output_file>");
            System.exit(0);
        }
        
        try
        {
            StyleImport si = new StyleImport(args[0]);
            FileOutputStream os = new FileOutputStream(args[1]); 
            si.dumpTo(os);
            os.close();
            System.out.println("Done.");
        } catch (Exception e) {
            System.err.println("Error: "+e.getMessage());
            e.printStackTrace();
        }

    }
1285295
public static synchronized void init(final boolean useDb, final String adminDeviceName) throws DevFailed {
        // Modified properties fo ORB usage.
        final Properties props = System.getProperties();
        props.put("org.omg.CORBA.ORBClass", "org.jacorb.orb.ORB");
        props.put("org.omg.CORBA.ORBSingletonClass", "org.jacorb.orb.ORBSingleton");
        // register interceptors
        props.put("org.omg.PortableInterceptor.ORBInitializerClass.ForwardInit",
                InterceptorInitializer.class.getCanonicalName());
        // Set retry properties
        props.put("jacorb.retries", "0");
        props.put("jacorb.retry_interval", "100");

        props.put("jacorb.codeset", true);
        // props.put("jacorb.config.dir", "fr/esrf/TangoApi");

        // Initial timeout for establishing a connection.
        props.put("jacorb.connection.client.connect_timeout", "5000");

        // Set the Largest transfert.
        final String str = checkORBgiopMaxMsgSize();
        props.put("jacorb.maxManagedBufSize", str);

        // Set jacorb verbosity at minimum value
        props.put("jacorb.config.log.verbosity", "0");

        // only used for no db device
        props.setProperty("jacorb.implname", SERVER_IMPL_NAME);
        // System.setProperties(props);
        // props.setProperty("jacorb.net.tcp_listener",
        // ConnectionListener.class.getName());

        // Initialize ORB
        orb = ORB.init(new String[] {}, props);

        try {
            poa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
            // boot_manager =
            // BootManagerHelper.narrow(orb.resolve_initial_references("BootManager"));
        } catch (final InvalidName e) {
            throw DevFailedUtils.newDevFailed(e);
        } catch (final INITIALIZE e) {
            // ignore, occurs when starting several times a server that failed
            if (!useDb) {
                throw DevFailedUtils.newDevFailed(e);
            }
        }

        try {
            if (!useDb) {
                // If the database is not used, create a POA with the
                // USER_ID policy
                final org.omg.CORBA.Policy[] policies = new org.omg.CORBA.Policy[2];
                policies[0] = poa.create_id_assignment_policy(IdAssignmentPolicyValue.USER_ID);
                policies[1] = poa.create_lifespan_policy(LifespanPolicyValue.PERSISTENT);
                final org.omg.PortableServer.POAManager manager = poa.the_POAManager();
                poa = poa.create_POA(NODB_POA, manager, policies);
            }
        } catch (final org.omg.PortableServer.POAPackage.AdapterAlreadyExists e) {
            throw DevFailedUtils.newDevFailed(e);
        } catch (final org.omg.PortableServer.POAPackage.InvalidPolicy e) {
            throw DevFailedUtils.newDevFailed(e);
        }

        final POAManager manager = poa.the_POAManager();
        try {
            manager.activate();
        } catch (final org.omg.PortableServer.POAManagerPackage.AdapterInactive ex) {
            throw DevFailedUtils.newDevFailed("API_CantActivatePOAManager", "The POA activate method throws an exception");
        }

        if (useDb) {

            // Build device name and try to import it from database
            final DeviceImportInfo importInfo = DatabaseFactory.getDatabase().importDevice(adminDeviceName);
            if (importInfo.isExported()) {
                LOGGER.debug("{} is set as exported in tango db - checking if it is already running", adminDeviceName);
                // if is exported, try to connect to it
                ORBManager.checkServerRunning(importInfo, adminDeviceName);
            }
        }
    }
917861
private function compile() : void
    {
        $this->isCompiled = true;

        if ($this->type === self::TYPE_SIMPLE) {
            $this->compileSimpleTable();
        } else {
            $this->compilePrettyTable();
        }
    }
893009
private function doBeforeCompileLaziness(): void
	{
		$builder = $this->getContainerBuilder();
		$dispatcher = $builder->getDefinition($this->prefix('dispatcher'));

		$subscribers = $builder->findByType(EventSubscriberInterface::class);
		foreach ($subscribers as $name => $subscriber) {
			$events = call_user_func([$subscriber->getEntity(), 'getSubscribedEvents']);

			/**
			 * ['eventName' => 'methodName']
			 * ['eventName' => ['methodName', $priority]]
			 * ['eventName' => [['methodName1', $priority], ['methodName2']]]
			 */
			foreach ($events as $event => $args) {
				if (is_string($args)) {
					if (!method_exists((string) $subscriber->getType(), $args)) {
						throw new ServiceCreationException(sprintf('Event listener %s does not have callable method %s', $subscriber->getType(), $args));
					}

					$dispatcher->addSetup('addSubscriberLazy', [$event, $name]);
				} elseif (is_string($args[0])) {
					if (!method_exists((string) $subscriber->getType(), $args[0])) {
						throw new ServiceCreationException(sprintf('Event listener %s does not have callable method %s', $subscriber->getType(), $args[0]));
					}

					$dispatcher->addSetup('addSubscriberLazy', [$event, $name]);
				} else {
					foreach ($args as $arg) {
						if (!method_exists((string) $subscriber->getType(), $arg[0])) {
							throw new ServiceCreationException(sprintf('Event listener %s does not have callable method %s', $subscriber->getType(), $arg[0]));
						}

						$dispatcher->addSetup('addSubscriberLazy', [$event, $name]);
					}
				}
			}
		}
	}
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);
    }
726424
@Override
    int command_inout_asynch_i(final String c, final boolean fgt, final boolean fwd, final int rid) throws DevFailed {
	try {
	    final int actual_rid = proxy.command_inout_asynch(c, fgt);
	    if (fgt == false) {
		arp.put(new Integer(rid), new AsynchRequest(actual_rid, c));
	    }
	} catch (final DevFailed df) {
	    if (fgt == false) {
		arp.put(new Integer(rid), new AsynchRequest(-1, c, df));
	    }
	} catch (final Exception e) {
	    if (fgt == false) {
		final DevError[] errors = new DevError[1];
		errors[0] = new DevError();
		errors[0].severity = ErrSeverity.ERR;
		errors[0].reason = "unknown exception caught";
		errors[0].desc = "unknown error";
		errors[0].origin = "GroupDeviceElemnt.command_inout";
		final DevFailed ex = new DevFailed(errors);
		arp.put(new Integer(rid), new AsynchRequest(-1, c, ex));
	    }
	}
	return rid;
    }
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();
    }
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);
        }
    }
252069
public void init(Database database, String host, String port) throws DevFailed {
        super.init(database, host, port);
    }
99814
public void free() {
    if (consumer != null) {
      if (array != null) {
        consumer.freeArray(array);
      }
      array = null;
    }
  }
152362
public function update()
    {
        if (!$this->exists()) {
            throw new \RuntimeException('Cannot update a table that doesn\'t exist!');
        }

        // update table
        foreach ($this->getPendingColumns() as $column) {
            $this->getAdapter()->addColumn($this, $column);
        }

        foreach ($this->getIndexes() as $index) {
            $this->getAdapter()->addIndex($this, $index);
        }

        foreach ($this->getForeignKeys() as $foreignKey) {
            $this->getAdapter()->addForeignKey($this, $foreignKey);
        }

        $this->saveData();
        $this->reset(); // reset pending changes
    }
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();
            }
        }
    }
1283109
void one_more_poll() throws DevFailed {
	if (works.size() > 0) {
	    final WorkItem item = (WorkItem) works.elementAt(0);
	    works.remove(0);

	    if (polling_stop == false) {
		if (item.type == Tango_POLL_CMD) {
		    poll_cmd(item);
		} else {
		    poll_attr(item);
		}
	    }
	    item.wake_up_date = compute_new_date(item.wake_up_date, item.update);
	    insert_in_list(item);
	}
    }
1259922
public void add_device(Database database, String deviceName, String classname, String serverName)
            throws DevFailed {
        if (!database.isAccess_checked()) checkAccess(database);

        DbDevInfo devinfo = new DbDevInfo(deviceName, classname, serverName);
        DeviceData argIn = new DeviceData();
        argIn.insert(devinfo.toStringArray());
        command_inout(database, "DbAddDevice", argIn);
        //System.out.println(devinfo.name + " created");
    }
1319746
public function updateConfiguration()
    {
        $this->getEventDispatcher()->dispatch(
            UpdateConfigurationEvent::NAME,
            new UpdateConfigurationEvent($this->getWebserviceId(), $this->getConfiguration())
        );
    }
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");
	}
295508
public function init()
    {
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }

        if (!isset($this->options['data-success-class'])) {
            $this->options['data-success-class'] = $this->successCssClass;
        }

        if (!isset($this->options['data-error-class'])) {
            $this->options['data-error-class'] = $this->errorCssClass;
        }

        if ($this->enableClientValidation) {
            $this->registerAfterValidateHandler();
        }

        parent::init();
    }