Buggy code:
private List < ServiceRecipe > services ; private AccessControlContext accessControlContext ; private final IdSpace tempRecipeIdSpace = new IdSpace ( ) ; public BlueprintContainerImpl ( BundleContext bundleContext , Bundle extenderBundle , BlueprintListener eventDispatcher , NamespaceHandlerRegistry handlers , ScheduledExecutorService executors , List < Object > pathList ) { } public Bundle getExtenderBundle ( ) { } public < T extends Processor > List < T > getProcessors ( Class < T > clazz ) { } public BlueprintListener getEventDispatcher ( ) { } private void checkDirectives ( ) { } public void schedule ( ) { } public void reload ( ) { } public void run ( ) { } private void doRun ( ) { try { for ( ; ; ) { if ( destroyed ) { return ; } BlueprintContainerImpl . LOGGER . debug ( "Running<seq2seq4repair_space>blueprint<seq2seq4repair_space>container<seq2seq4repair_space>for<seq2seq4repair_space>bundle<seq2seq4repair_space>{}<seq2seq4repair_space>in<seq2seq4repair_space>state<seq2seq4repair_space>{}" , bundleContext . getBundle ( ) . getSymbolicName ( ) , state ) ; switch ( state ) { case Unknown : checkDirectives ( ) ; eventDispatcher . blueprintEvent ( new BlueprintEvent ( BlueprintEvent . CREATING , getBundleContext ( ) . getBundle ( ) , getExtenderBundle ( ) ) ) ; parser = new Parser ( ) ; parser . parse ( getResources ( ) ) ; namespaces = parser . getNamespaces ( ) ; handlerSet = handlers . getNamespaceHandlers ( namespaces , getBundleContext ( ) . getBundle ( ) ) ; handlerSet . addListener ( this ) ; state = BlueprintContainerImpl . State . WaitForNamespaceHandlers ; break ; case WaitForNamespaceHandlers : { List < String > missing = new ArrayList < String > ( ) ; for ( URI ns : namespaces ) { if ( ( handlerSet . getNamespaceHandler ( ns ) ) == null ) { missing . add ( ( ( ( ( ( ( ( ( "(&(" + ( Constants . OBJECTCLASS ) ) + "=" ) + ( NamespaceHandler . class . getName ( ) ) ) + ")(" ) + ( NamespaceHandlerRegistryImpl . NAMESPACE ) ) + "=" ) + ns ) + "))" ) ) ; } } if ( ( missing . size ( ) ) > 0 ) { BlueprintContainerImpl . LOGGER . info ( "Bundle<seq2seq4repair_space>{}<seq2seq4repair_space>is<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>namespace<seq2seq4repair_space>handlers<seq2seq4repair_space>" , bundleContext . getBundle ( ) . getSymbolicName ( ) , missing ) ; eventDispatcher . blueprintEvent ( new BlueprintEvent ( BlueprintEvent . GRACE_PERIOD , getBundleContext ( ) . getBundle ( ) , getExtenderBundle ( ) , missing . toArray ( new String [ missing . size ( ) ] ) ) ) ; return ; } componentDefinitionRegistry . registerComponentDefinition ( new PassThroughMetadataImpl ( "blueprintContainer" , this ) ) ; componentDefinitionRegistry . registerComponentDefinition ( new PassThroughMetadataImpl ( "blueprintBundle" , bundleContext . getBundle ( ) ) ) ; componentDefinitionRegistry . registerComponentDefinition ( new PassThroughMetadataImpl ( "blueprintBundleContext" , bundleContext ) ) ; componentDefinitionRegistry . registerComponentDefinition ( new PassThroughMetadataImpl ( "blueprintConverter" , converter ) ) ; if ( xmlValidation ) { parser . validate ( handlerSet . getSchema ( ) ) ; } parser . populate ( handlerSet , componentDefinitionRegistry ) ; state = BlueprintContainerImpl . State . Populated ; break ; } case Populated : getRepository ( ) ; trackServiceReferences ( ) ; Runnable r = new Runnable ( ) { public void run ( ) { synchronized ( scheduled ) { Throwable t = new TimeoutException ( ) ; state = BlueprintContainerImpl . State . Failed ; String [ ] missingDependecies = getMissingDependencies ( ) ; unregisterServices ( ) ; untrackServiceReferences ( ) ; destroyComponents ( ) ; BlueprintContainerImpl . LOGGER . error ( ( ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>blueprint<seq2seq4repair_space>container<seq2seq4repair_space>for<seq2seq4repair_space>bundle<seq2seq4repair_space>" + ( bundleContext . getBundle ( ) . getSymbolicName ( ) ) ) + "<seq2seq4repair_space>due<seq2seq4repair_space>to<seq2seq4repair_space>unresolved<seq2seq4repair_space>dependencies<seq2seq4repair_space>" ) + ( Arrays . asList ( missingDependecies ) ) ) , t ) ; eventDispatcher . blueprintEvent ( new BlueprintEvent ( BlueprintEvent . FAILURE , getBundleContext ( ) . getBundle ( ) , getExtenderBundle ( ) , missingDependecies , t ) ) ; } } } ; <START_BUG> timeoutFuture = executors . schedule ( r , 10 , TimeUnit . SECONDS ) ; <END_BUG> state = BlueprintContainerImpl . State . WaitForInitialReferences ; break ; case WaitForInitialReferences : if ( waitForDependencies ) { String [ ] missingDependencies = getMissingDependencies ( ) ; if ( ( missingDependencies . length ) > 0 ) { BlueprintContainerImpl . LOGGER . info ( "Bundle<seq2seq4repair_space>{}<seq2seq4repair_space>is<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>dependencies<seq2seq4repair_space>{}" , bundleContext . getBundle ( ) . getSymbolicName ( ) , Arrays . asList ( missingDependencies ) ) ; eventDispatcher . blueprintEvent ( new BlueprintEvent ( BlueprintEvent . GRACE_PERIOD , getBundleContext ( ) . getBundle ( ) , getExtenderBundle ( ) , missingDependencies ) ) ; return ; } } state = BlueprintContainerImpl . State . InitialReferencesSatisfied ; break ; case InitialReferencesSatisfied : processTypeConverters ( ) ; processProcessors ( ) ; state = BlueprintContainerImpl . State . WaitForInitialReferences2 ; break ; case WaitForInitialReferences2 : if ( waitForDependencies ) { String [ ] missingDependencies = getMissingDependencies ( ) ; if ( ( missingDependencies . length ) > 0 ) { BlueprintContainerImpl . LOGGER . info ( "Bundle<seq2seq4repair_space>{}<seq2seq4repair_space>is<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>dependencies<seq2seq4repair_space>{}" , bundleContext . getBundle ( ) . getSymbolicName ( ) , Arrays . asList ( missingDependencies ) ) ; eventDispatcher . blueprintEvent ( new BlueprintEvent ( BlueprintEvent . GRACE_PERIOD , getBundleContext ( ) . getBundle ( ) , getExtenderBundle ( ) , missingDependencies ) ) ; return ; } } state = BlueprintContainerImpl . State . Create ; break ; case Create : timeoutFuture . cancel ( false ) ; registerServices ( ) ; instantiateEagerComponents ( ) ; int bs = bundleContext . getBundle ( ) . getState ( ) ; if ( ( ( registration ) == null ) && ( ( bs == ( Bundle . ACTIVE ) ) || ( bs == ( Bundle . STARTING ) ) ) ) { Properties props = new Properties ( ) ; props . put ( CONTAINER_SYMBOLIC_NAME_PROPERTY , bundleContext . getBundle ( ) . getSymbolicName ( ) ) ; props . put ( CONTAINER_VERSION_PROPERTY , JavaUtils . getBundleVersion ( bundleContext . getBundle ( ) ) ) ;

Fix:
timeoutFuture = executors . schedule ( r , timeout , TimeUnit . MILLISECONDS ) ;