F743-12896 - Start
353668
protected synchronized boolean cancel(Object x) {
        synchronized (lock) {
            if (putIndex > takeIndex) {
                for (int i = takeIndex; i < putIndex; i++) {
                    if (buffer[i] == x) {
                        System.arraycopy(buffer, i + 1, buffer, i, putIndex - i - 1);
                        putIndex--;
                        buffer[putIndex] = null;
                        numberOfUsedSlots.getAndDecrement(); // D615053
                        return true;
                    }
                }
            } else if (putIndex != takeIndex || buffer[takeIndex] != null) {
                for (int i = takeIndex; i < buffer.length; i++) {
                    if (buffer[i] == x) {
                        if (i != buffer.length - 1) {
                            System.arraycopy(buffer, i + 1, buffer, i, buffer.length - i - 1);
                        }

                        if (putIndex != 0) {
                            buffer[buffer.length - 1] = buffer[0];
                            System.arraycopy(buffer, 1, buffer, 0, putIndex - 1);
                            putIndex--;
                        } else {
                            putIndex = buffer.length - 1;
                        }

                        buffer[putIndex] = null;
                        numberOfUsedSlots.getAndDecrement(); // D615053
                        return true;
                    }
                }

                // D610567 - Scan first section of BoundedBuffer
                for (int i = 0; i < putIndex; i++) {
                    if (buffer[i] == x) {
                        System.arraycopy(buffer, i + 1, buffer, i, putIndex - i - 1);
                        putIndex--;
                        buffer[putIndex] = null;
                        numberOfUsedSlots.getAndDecrement(); // D615053
                        return true;
                    }
                }

            }
        }

        return false;
    }
494278
def start():
    '''
    
    '''
    from . import app
    root, apiopts, conf = app.get_app(__opts__)

    if not apiopts.get('disable_ssl', False):
        if 'ssl_crt' not in apiopts or 'ssl_key' not in apiopts:
            logger.error("Not starting '%s'. Options 'ssl_crt' and "
                    "'ssl_key' are required if SSL is not disabled.",
                    __name__)

            return None

        verify_certs(apiopts['ssl_crt'], apiopts['ssl_key'])

        cherrypy.server.ssl_module = 'builtin'
        cherrypy.server.ssl_certificate = apiopts['ssl_crt']
        cherrypy.server.ssl_private_key = apiopts['ssl_key']
        if 'ssl_chain' in apiopts.keys():
            cherrypy.server.ssl_certificate_chain = apiopts['ssl_chain']

    cherrypy.quickstart(root, apiopts.get('root_prefix', '/'), conf)
150212
public void start(boolean pLazy, String pUrl, boolean pSecured) {
        start(pLazy);

        AgentDetails details = backendManager.getAgentDetails();
        details.setUrl(pUrl);
        details.setSecured(pSecured);
    }
1149299
public synchronized void start(StartContext context) throws StartException {
        Logger.getLogger("org.mobicents.as7").debug("SipConnectorService.start(), protocol = " + protocol + " - scheme = " + scheme);
        final SocketBinding binding = this.binding.getValue();
        final InetSocketAddress address = binding.getSocketAddress();
        final Executor executor = this.executor.getOptionalValue();
        try {
            // Create connector
            final Connector connector = new Connector(SipProtocolHandler.class.getName());
            connector.setPort(address.getPort());
            connector.setScheme(scheme);
            SipConnector sipConnector = new SipConnector();
            sipConnector.setIpAddress(address.getAddress().getHostAddress());
            sipConnector.setPort(address.getPort());
            // https://github.com/Mobicents/sip-servlets/issues/44 support multiple connectors
            sipConnector.setTransport(binding.getName().substring(binding.getName().lastIndexOf("sip-")+("sip-".length())));
            sipConnector.setUseLoadBalancer(useLoadBalancer);
            sipConnector.setLoadBalancerAddress(loadBalancerAddress);
            sipConnector.setLoadBalancerRmiPort(loadBalancerRmiPort);
            sipConnector.setLoadBalancerSipPort(loadBalancerSipPort);
            sipConnector.setUseStaticAddress(useStaticAddress);
            sipConnector.setStaticServerAddress(staticServerAddress);
            sipConnector.setStaticServerPort(staticServerPort);
            sipConnector.setUseStun(useStun);
            sipConnector.setStunServerAddress(stunServerAddress);
            sipConnector.setStunServerPort(stunServerPort);
            sipConnector.setHostNames(hostNames);
            Logger.getLogger("org.mobicents.as7").debug("SipConnectorService.start(), address = " + address.getAddress().getHostAddress() + " - port = " + address.getPort() + " - transport = " + sipConnector.getTransport());
            Logger.getLogger("org.mobicents.as7").debug("SipConnectorService.start(), hostnames = " + hostNames);
            SipProtocolHandler sipProtocolHandler = (SipProtocolHandler) connector.getProtocolHandler();
            sipProtocolHandler.setSipConnector(sipConnector);
            if (enableLookups != null)
                connector.setEnableLookups(enableLookups);
            if (maxPostSize != null)
                connector.setMaxPostSize(maxPostSize);
            if (maxSavePostSize != null)
                connector.setMaxSavePostSize(maxSavePostSize);
            if (proxyName != null)
                connector.setProxyName(proxyName);
            if (proxyPort != null)
                connector.setProxyPort(proxyPort);
            if (redirectPort != null)
                connector.setRedirectPort(redirectPort);
            if (secure != null)
                connector.setSecure(secure);
            // TODO set Executor on ProtocolHandler
            // TODO use server socket factory - or integrate with {@code ManagedBinding}

            getSipServer().addConnector(connector); 
            
            connector.init();
            connector.start();
            this.connector = connector;
        } catch (Exception e) {
            throw new StartException(MESSAGES.connectorStartError(), e);
        }
        // Register the binding after the connector is started
        binding.getSocketBindings().getNamedRegistry().registerBinding(new ConnectorBinding(binding));
        //notify SipServer only when connector has already been added/started
        getSipServer().connectorAdded(connector);
    }
443290
public synchronized void start(StartContext context) throws StartException {
        Logger.getLogger("org.mobicents.as10").debug(
                "SipConnectorService.start(), protocol = " + protocol + " - scheme = " + scheme);
        final SocketBinding binding = this.binding.getValue();
        final InetSocketAddress address = binding.getSocketAddress();
        final Executor executor = this.executor.getOptionalValue();
        try {

            SipConnector sipConnector = new SipConnector();
            sipConnector.setIpAddress(address.getAddress().getHostAddress());
            sipConnector.setPort(address.getPort());
            // https://github.com/Mobicents/sip-servlets/issues/44 support multiple connectors
            sipConnector.setTransport(binding.getName().substring(binding.getName().lastIndexOf("sip-") + ("sip-".length())));
            sipConnector.setUseLoadBalancer(useLoadBalancer);
            sipConnector.setLoadBalancerAddress(loadBalancerAddress);
            sipConnector.setLoadBalancerRmiPort(loadBalancerRmiPort);
            sipConnector.setLoadBalancerSipPort(loadBalancerSipPort);
            sipConnector.setUseStaticAddress(useStaticAddress);
            sipConnector.setStaticServerAddress(staticServerAddress);
            sipConnector.setStaticServerPort(staticServerPort);
            sipConnector.setUseStun(useStun);
            sipConnector.setStunServerAddress(stunServerAddress);
            sipConnector.setStunServerPort(stunServerPort);
            sipConnector.setHostNames(hostNames);

            Logger.getLogger("org.mobicents.as10").debug(
                    "SipConnectorService.start(), address = " + address.getAddress().getHostAddress() + " - port = "
                            + address.getPort() + " - transport = " + sipConnector.getTransport());
            Logger.getLogger("org.mobicents.as10").debug("SipConnectorService.start(), hostnames = " + hostNames);

            /*
             * FIXME: kakonyii: need an implementation in SipConnector class for the following fields: enableLookups proxyName
             * proxyPort redirectPort secure maxPostSize maxSavePostSize
             */

            SipProtocolHandler sipProtocolHandler = new SipProtocolHandler(sipConnector);

            // TODO set Executor on ProtocolHandler
            // TODO use server socket factory - or integrate with {@code ManagedBinding}

            final SipConnectorListener connector = new SipConnectorListener(sipProtocolHandler);

            connector.init();
            getSipServer().addConnector(connector);
            connector.start();

            this.connector = connector;
        } catch (Exception e) {
            throw new StartException(MESSAGES.connectorStartError(), e);
        }
        // Register the binding after the connector is started
        binding.getSocketBindings().getNamedRegistry().registerBinding(new ConnectorBinding(binding));
        //notify SipServer only when connector has already been added/started
        getSipServer().connectorAdded(connector);        
    }
471054
def startCc(CallControlCapabilities_presence=0):
    """"""
    a = TpPd(pd=0x3)
    b = MessageType(mesType=0x9)  # 00001001
    packet = a / b
    if CallControlCapabilities_presence is 1:
        c = CallControlCapabilitiesHdr(ieiCCC=0x15, eightBitCCC=0x0)
        packet = paclet / c
    return packet
226243
def starter(cls):
        """"""
        data = cls.getPage(cls.url)
        url1 = cls.fetchUrl(cls.url, data, cls.prevSearch)
        data = cls.getPage(url1)
        url2 = cls.fetchUrl(url1, data, cls.nextSearch)
        return cls.prevUrlModifier(url2)
1122404
def start_transmit(self, fd, data=None):
        
        self._wfds[fd] = (data or fd, self._generation)
        self._update(fd)
1196699
function() {
	this.ENL_PORT = 3610;
	this.BAUD = 115200;
	this.SERIAL_SEND_INTERVAL = 500; // ms

	this.initialized = false;
	this.dataCallback = function(){};
	this.sentCallback = function(){};
	this.dataCallbackSerial = function(){};
	this.sentCallbackSerial = function(){};

	this.serialCallback = function(){};
	this.params = {};
	this.port = null;
	this.device = null;
	this.is_discovering = false;
	this.discovery_timer_id = null;
	this.response_buffer = null;
	this.response_text = '';

	this.mAdapter = null;
}
1096712
public DfuServiceController start(@NonNull final Context context, @NonNull final Class<? extends DfuBaseService> service) {
		if (fileType == -1)
			throw new UnsupportedOperationException("You must specify the firmware file before starting the service");

		final Intent intent = new Intent(context, service);

		intent.putExtra(DfuBaseService.EXTRA_DEVICE_ADDRESS, deviceAddress);
		intent.putExtra(DfuBaseService.EXTRA_DEVICE_NAME, deviceName);
		intent.putExtra(DfuBaseService.EXTRA_DISABLE_NOTIFICATION, disableNotification);
		intent.putExtra(DfuBaseService.EXTRA_FOREGROUND_SERVICE, startAsForegroundService);
		intent.putExtra(DfuBaseService.EXTRA_FILE_MIME_TYPE, mimeType);
		intent.putExtra(DfuBaseService.EXTRA_FILE_TYPE, fileType);
		intent.putExtra(DfuBaseService.EXTRA_FILE_URI, fileUri);
		intent.putExtra(DfuBaseService.EXTRA_FILE_PATH, filePath);
		intent.putExtra(DfuBaseService.EXTRA_FILE_RES_ID, fileResId);
		intent.putExtra(DfuBaseService.EXTRA_INIT_FILE_URI, initFileUri);
		intent.putExtra(DfuBaseService.EXTRA_INIT_FILE_PATH, initFilePath);
		intent.putExtra(DfuBaseService.EXTRA_INIT_FILE_RES_ID, initFileResId);
		intent.putExtra(DfuBaseService.EXTRA_KEEP_BOND, keepBond);
		intent.putExtra(DfuBaseService.EXTRA_RESTORE_BOND, restoreBond);
		intent.putExtra(DfuBaseService.EXTRA_FORCE_DFU, forceDfu);
		intent.putExtra(DfuBaseService.EXTRA_DISABLE_RESUME, disableResume);
		intent.putExtra(DfuBaseService.EXTRA_MAX_DFU_ATTEMPTS, numberOfRetries);
		intent.putExtra(DfuBaseService.EXTRA_MBR_SIZE, mbrSize);
		if (mtu > 0)
			intent.putExtra(DfuBaseService.EXTRA_MTU, mtu);
		intent.putExtra(DfuBaseService.EXTRA_CURRENT_MTU, currentMtu);
		intent.putExtra(DfuBaseService.EXTRA_UNSAFE_EXPERIMENTAL_BUTTONLESS_DFU, enableUnsafeExperimentalButtonlessDfu);
		//noinspection StatementWithEmptyBody
		if (packetReceiptNotificationsEnabled != null) {
			intent.putExtra(DfuBaseService.EXTRA_PACKET_RECEIPT_NOTIFICATIONS_ENABLED, packetReceiptNotificationsEnabled);
			intent.putExtra(DfuBaseService.EXTRA_PACKET_RECEIPT_NOTIFICATIONS_VALUE, numberOfPackets);
		} else {
			// For backwards compatibility:
			// If the setPacketsReceiptNotificationsEnabled(boolean) has not been called, the PRN state and value are taken from
			// SharedPreferences the way they were read in DFU Library in 1.0.3 and before, or set to default values.
			// Default values: PRNs enabled on Android 4.3 - 5.1 and disabled starting from Android 6.0. Default PRN value is 12.
		}
		if (legacyDfuUuids != null)
			intent.putExtra(DfuBaseService.EXTRA_CUSTOM_UUIDS_FOR_LEGACY_DFU, legacyDfuUuids);
		if (secureDfuUuids != null)
			intent.putExtra(DfuBaseService.EXTRA_CUSTOM_UUIDS_FOR_SECURE_DFU, secureDfuUuids);
		if (experimentalButtonlessDfuUuids != null)
			intent.putExtra(DfuBaseService.EXTRA_CUSTOM_UUIDS_FOR_EXPERIMENTAL_BUTTONLESS_DFU, experimentalButtonlessDfuUuids);
		if (buttonlessDfuWithoutBondSharingUuids != null)
			intent.putExtra(DfuBaseService.EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITHOUT_BOND_SHARING, buttonlessDfuWithoutBondSharingUuids);
		if (buttonlessDfuWithBondSharingUuids != null)
			intent.putExtra(DfuBaseService.EXTRA_CUSTOM_UUIDS_FOR_BUTTONLESS_DFU_WITH_BOND_SHARING, buttonlessDfuWithBondSharingUuids);

		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O && startAsForegroundService) {
			// On Android Oreo and above the service must be started as a foreground service to make it accessible from
			// a killed application.
			context.startForegroundService(intent);
		} else {
			context.startService(intent);
		}
		return new DfuServiceController(context);
	}
1271857
def start(self):
        """"""
        target = getattr(self._target, '__qualname__', self._target.__name__)
        self._log.debug('starting fiber {}, target {}', self.name, target)
        self._hub.run_callback(self.switch)
621207
def start(self):
        
        self.connect()
        if not self.isAlive():
            super(WAMPClient,self).start()
        self.hello()
        return self
1327685
def start():
    '''
    
    '''
    ret = {'comment': '', 'success': False}

    cmd = __execute_cmd('riak', 'start')

    if cmd['retcode'] != 0:
        ret['comment'] = cmd['stderr']
    else:
        ret['comment'] = cmd['stdout']
        ret['success'] = True

    return ret
383451
def Start(self):
    """"""
    self.state.shadows = []
    self.state.raw_device = None

    self.CallClient(
        server_stubs.WmiQuery,
        query="SELECT * FROM Win32_ShadowCopy",
        next_state="ListDeviceDirectories")
22219
def getStartingApplication(self, pchAppKeyBuffer, unAppKeyBufferLen):
        """"""

        fn = self.function_table.getStartingApplication
        result = fn(pchAppKeyBuffer, unAppKeyBufferLen)
        return result
669611
public void started() throws RuntimeWarning { // F743-26072
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "started");

        finishStarting();
    }
911234
public synchronized String start() {
        if (started) return null;

        // Create a processor for the specified jmf locator
        String result = createProcessor();
        if (result != null) {
            started = false;
        }

        // Create an RTP session to transmit the output of the
        // processor to the specified IP address and port no.
        result = createTransmitter();
        if (result != null) {
            processor.close();
            processor = null;
            started = false;
        }
        else {
            started = true;
        }

        // Start the transmission
        processor.start();

        return null;
    }