Buggy code:
public class StartAction extends AbstractAction { private static final Logger logger = LoggerFactory . getLogger ( BasicSubsystem . class ) ; private final BasicSubsystem instigator ; public StartAction ( BasicSubsystem instigator , BasicSubsystem requestor , BasicSubsystem target ) { } @ Override public Object run ( ) { State state = target . getState ( ) ; if ( EnumSet . of ( INSTALL_FAILED , UNINSTALLED , UNINSTALLING ) . contains ( state ) ) throw new SubsystemException ( ( "Cannot<seq2seq4repair_space>stop<seq2seq4repair_space>from<seq2seq4repair_space>state<seq2seq4repair_space>" + state ) ) ; if ( EnumSet . of ( INSTALLING , RESOLVING , STARTING , STOPPING ) . contains ( state ) ) { <START_BUG> waitForStateChange ( ) ; <END_BUG> return new StartAction ( instigator , requestor , target ) . run ( ) ; } if ( ACTIVE . equals ( state ) ) return null ; if ( ! ( Utils . isContent ( requestor , target ) ) ) { if ( ! ( Utils . isDependency ( requestor , target ) ) ) { if ( ! ( instigator . equals ( target ) ) ) { if ( ( instigator . isRoot ( ) ) && ( ! ( target . isReadyToStart ( ) ) ) ) { return null ; } } } } if ( INSTALLED . equals ( state ) ) StartAction . resolve ( target ) ; target . setState ( STARTING ) ; Coordination coordination = Activator . getInstance ( ) . getCoordinator ( ) . create ( ( ( ( target . getSymbolicName ( ) ) + '-' ) + ( target . getSubsystemId ( ) ) ) , 0 ) ; try { List < Resource > resources = new ArrayList < Resource > ( Activator . getInstance ( ) . getSubsystems ( ) . getResourcesReferencedBy ( target ) ) ; SubsystemContentHeader header = target . getSubsystemManifest ( ) . getSubsystemContentHeader ( ) ; if ( header != null ) Collections . sort ( resources , new StartResourceComparator ( header ) ) ; for ( Resource resource : resources ) startResource ( resource , coordination ) ; target . setState ( ACTIVE ) ; } catch ( Throwable t ) { coordination . fail ( t ) ; } finally { try { coordination . end ( ) ; } catch ( CoordinationException e ) { target . setState ( RESOLVED ) ; Throwable t = e . getCause ( ) ; if ( t instanceof SubsystemException ) throw ( ( SubsystemException ) ( t ) ) ; throw new SubsystemException ( t ) ; } } return null ; } private static Collection < Bundle > getBundles ( BasicSubsystem subsystem ) { } private static void resolve ( BasicSubsystem subsystem ) { } private static void setExportIsolationPolicy ( BasicSubsystem subsystem ) throws IOException , URISyntaxException , BundleException , InvalidSyntaxException , ResolutionException { } private static void setExportIsolationPolicy ( RegionFilterBuilder builder , ExportPackageHeader header , BasicSubsystem subsystem ) throws InvalidSyntaxException { } private static void setExportIsolationPolicy ( RegionFilterBuilder builder , ProvideCapabilityHeader header , BasicSubsystem subsystem ) throws InvalidSyntaxException { } private static void setExportIsolationPolicy ( RegionFilterBuilder builder , SubsystemExportServiceHeader header , BasicSubsystem subsystem ) throws InvalidSyntaxException { } private void startBundleResource ( Resource resource , Coordination coordination ) throws BundleException { } private void startResource ( Resource resource , Coordination coordination ) throws IOException , BundleException { } private void startSubsystemResource ( Resource resource , Coordination coordination ) throws IOException { } }

Fix:
waitForStateChange ( state ) ;