Default initialization is used the first time we have to log
unless a sink has been added with add(). _needInit allows us to
distinguish between initial state and disabled state.
772304
private synchronized void defaultInit() 
    {
        if (!_initialized)
        {
            _initialized = true;
            String sinkClasses = System.getProperty("LOG_SINKS","org.browsermob.proxy.jetty.log.OutputStreamLogSink");
            StringTokenizer sinkTokens = new StringTokenizer(sinkClasses, ";, ");
                    
            LogSink sink= null;
            while (sinkTokens.hasMoreTokens())
            {
                String sinkClassName = sinkTokens.nextToken();
                    	
                try
                {
                    Class sinkClass = Loader.loadClass(this.getClass(),sinkClassName);
                    if (org.browsermob.proxy.jetty.log.LogSink.class.isAssignableFrom(sinkClass)) {
                        sink = (LogSink)sinkClass.newInstance();
                        sink.start();
                        add(sink);
                    }
                    else
                        // Can't use Code.fail here, that's what we're setting up
                        System.err.println(sinkClass+" is not a org.browsermob.proxy.jetty.log.LogSink");
                }
                catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    }
316003
private static void init(){
		String junittest = System.getProperty("JUNITTEST");
		if (junittest!=null && (junittest.equalsIgnoreCase("true")))
			return;
		StartBuiltInProducers.startbuiltin();
		//ensure plugins are loaded.
		PluginRepository.getInstance();
		//ensure accumulators are initialized.
		AccumulatorRepository.getInstance();
		//ensure thresholds are initialized.
		ThresholdRepository.getInstance();
	}
952628
private final State onInit(final Buffer buffer) {
        try {
            while (buffer.hasReadableBytes()) {
                final byte b = buffer.peekByte();
                if (b == SipParser.SP || b == SipParser.HTAB || b == SipParser.CR || b == SipParser.LF) {
                    buffer.readByte();
                } else {
                    start = buffer.getReaderIndex();
                    return State.GET_INITIAL_LINE;
                }
            }
        } catch (final IOException e) {
            throw new RuntimeException("Unable to read from stream due to IOException", e);
        }

        return State.INIT;
    }
1056283
public static Initialization makeDefault() {
        Initialization initialization = new Initialization();
        initialization.setEntryPoint(EntryPoint.Default.REBASE.name());
        return initialization;
    }
429063
protected void setUninitialize()
	{
    	if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
    		logger.logp(Level.FINE, CLASS_NAME,"setUninitialized ","" + this.toString());    

		state = UNINITIALIZED_STATE;
	}
114529
private synchronized void initCounterState(Long currentValue) {
      if (weakCounter == null) {
         weakCounter = currentValue == null ?
               newCounterValue(configuration) :
               newCounterValue(currentValue, configuration);
      }
   }
1176963
@PostConstruct
    public void onInit() {
    	isExecutorAvailable = isExecutorOnClasspath();
		if (identityProvider.isUnsatisfied()) {
			setIdentityProvider(new EJBContextIdentityProvider(context));
		} else {
			setIdentityProvider(identityProvider.get());
		}
		setManagerFactory(new RuntimeManagerFactoryImpl());
		super.onInit();
	}
875039
public void initalised() throws SIResourceException
  {
    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.entry(tc, "initalised");
    
    try
    {    
      _lockManager.lockExclusive();

      // Flag that we are in a started state. 
      _started = true;
      
      // If the Neighbour Listener hasn't been created, create it
      if (_proxyListener == null)
        createProxyListener();
     
      // Indicate that reconciling is complete
      _reconciling = false;
      
      _neighbours.resetBusSubscriptionList();
    }      
    finally
    {
      _lockManager.unlockExclusive();
    }

    if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
      SibTr.exit(tc, "initalised"); 
  }
1250374
def initialState(self, state):
        

        if self._initialState is not _NO_STATE:
            raise ValueError(
                "initial state already set to {}".format(self._initialState))

        self._initialState = state
97675
private void init() {
        // defaults for internal bookkeeping
        index = 0;              // internal index always starts at 0
        count = 1;              // internal count always starts at 1
        status = null;          // we clear status on release()
        item = null;            // item will be retrieved for each round
        last = false;           // last must be set explicitly
        beginSpecified = false; // not specified until it's specified :-)
        endSpecified = false;   // (as above)
        stepSpecified = false;  // (as above)
        deferredExpression = null;

        // defaults for interface with page author
        begin = 0;              // when not specified, 'begin' is 0 by spec.
        end = -1;               // when not specified, 'end' is not used
        step = 1;               // when not specified, 'step' is 1
        itemId = null;          // when not specified, no variable exported
        statusId = null;        // when not specified, no variable exported
    }
1039891
def init(self):
        
        # remove root logger, so we can reinit
        # TODO only remove our own
        # TODO move to _init, let overrides use init()
        logging.getLogger().handlers = []

        if self.debug:
            logging.basicConfig(level=logging.DEBUG, format=self.log_format_debug)
        elif self.verbose:
            logging.basicConfig(level=logging.INFO, format=self.log_format)
        elif not self.quiet:
            logging.basicConfig(level=logging.ERROR, format=self.log_format)
        else:
            logging.getLogger().addHandler(logging.NullHandler())
1356066
public function enableDefaultAutoInitValue()
    {
        switch ($this->type) {
            case 'char':
            case 'boolean':
            case 'bool':
            case 'int':
            case 'uint':
            case 'long':
            case 'ulong':
            case 'double':
            case 'zephir_ce_guard':
                $this->defaultInitValue = 0;
                break;

            case 'variable':
            case 'string':
            case 'array':
                $this->defaultInitValue = null;
                $this->setDynamicTypes('null');
                $this->setMustInitNull(true);
                $this->setLocalOnly(false);
                break;

            default:
                throw new CompilerException('Cannot create an automatic safe default value for variable type: '.$this->type);
        }
    }
131144
function init(endPoint, accessKeyId, accessKeySecret, securityToken = null, project) {
  return AliyunLog && AliyunLog.initAliyunLog && AliyunLog.initAliyunLog(endPoint, accessKeyId, accessKeySecret, securityToken, project);
}
22930
public final void initialize() {
        if (m_state.isInitialized()) {
            m_logger.warn("initialize(): Service is already initialized -- ignoring");
        } else {
            logParams("Initializing with the following service parameters:");
            this.initService();
            setState(State.INITIALIZED);
        }
    }
327227
def checkInitialState(self,initialState):
        
        assert initialState is not None, "Initial state has not been specified."
        assert isinstance(initialState,(int,list,tuple,np.ndarray,set)), "initialState %r is not an int, tuple, list, set or numpy array" % initialState

         
        if isinstance(initialState,list): 
            #Check whether all entries of the list are ints. Return an int if the len ==1, otherwise a tuple.
            assert all(isinstance(i, int) for i in initialState), "initialState %r is not integer" % initialState 
            initialState = int(initialState) if len(initialState)==1 else tuple(initialState)          

        elif isinstance(initialState,tuple): 
            #Check whether all entries are ints. Return an int if the len ==1, otherwise a tuple.
            assert all(isinstance(i, int) for i in initialState), "initialState %r is not integer" % initialState
            if len(initialState)==1:
                initialState = int(initialState)     
        
        elif isinstance(initialState,np.ndarray):
            #Check whether the state is a 1d numpy array. Return an int if it has length 1.
            assert issubclass(initialState.dtype.type, np.integer) and initialState.ndim==1, "initialState %r is not a one-dimensional integer numpy array" % initialState 
            initialState = int(initialState) if len(initialState)==1 else tuple(initialState)
            
        elif isinstance(initialState,set):
            #If we have a set, then check whether all elements are ints or tuples.
            for state in initialState:                
                assert isinstance(state,(tuple,int)), "the set initialState %r should contain tuples or ints" % initialState 
                if isinstance(state,tuple):
                    assert all(isinstance(i,int) for i in state), "the state %r should be integer" % initialState 
                
        return initialState
977852
@Override
    public void init(final Class<? extends State> stateClass) throws InitializationException {
        try {
            currentState = getState(stateClass);
            change.firePropertyChange(STATE_CHANGE, null, currentState.getClass());
        } catch (NotAvailableException ex) {
            throw new InitializationException(this, ex);
        }
    }
826002
private static void initInstance(final TransactionLogger instance, final Logger logger, final Logger auditor) {
    instance.logger = logger;
    instance.auditor = auditor;
    instance.components = new LinkedHashMap<>();
    instance.properties = new LinkedHashMap<>();
    instance.total = new Component(TOTAL_COMPONENT);
    instance.total.startTimer();
    instance.componentsMultiThread = new ComponentsMultiThread();
    instance.flowContext = FlowContextFactory.serializeNativeFlowContext();
  }