Buggy code:
public class ArquillianService implements Service < ArquillianService > { public static final String TEST_CLASS_PROPERTY = "org.jboss.as.arquillian.testClass" ; public static final ServiceName SERVICE_NAME = JBOSS . append ( "arquillian" , "testrunner" ) ; private static final Logger log = Logger . getLogger ( "org.jboss.as.arquillian" ) ; private final InjectedValue < MBeanServer > injectedMBeanServer = new InjectedValue < MBeanServer > ( ) ; private final Set < ArquillianConfig > deployedTests = new HashSet < ArquillianConfig > ( ) ; private ServiceContainer serviceContainer ; private ServiceTarget serviceTarget ; private JMXTestRunner jmxTestRunner ; AbstractServiceListener < Object > listener ; public static void addService ( final ServiceTarget serviceTarget ) { } ServiceContainer getServiceContainer ( ) { } public synchronized void start ( StartContext context ) throws StartException { ArquillianService . log . debugf ( "Starting<seq2seq4repair_space>Arquillian<seq2seq4repair_space>Test<seq2seq4repair_space>Runner" ) ; final MBeanServer mbeanServer = injectedMBeanServer . getValue ( ) ; serviceContainer = context . getController ( ) . getServiceContainer ( ) ; serviceTarget = context . getChildTarget ( ) ; try { jmxTestRunner = new ArquillianService . ExtendedJMXTestRunner ( ) ; jmxTestRunner . registerMBean ( mbeanServer ) ; } catch ( Throwable t ) { throw new StartException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>start<seq2seq4repair_space>Arquillian<seq2seq4repair_space>Test<seq2seq4repair_space>Runner" , t ) ; } final ArquillianService arqService = this ; listener = new AbstractServiceListener < Object > ( ) { @ Override public void transition ( ServiceController < ? extends Object > serviceController , ServiceController . Transition transition ) { <START_BUG> switch ( serviceController . getState ( ) ) { <END_BUG> case UP : { ServiceName serviceName = serviceController . getName ( ) ; String simpleName = serviceName . getSimpleName ( ) ; if ( ( JBOSS_DEPLOYMENT . isParentOf ( serviceName ) ) && ( simpleName . equals ( INSTALL . toString ( ) ) ) ) { ServiceName parentName = serviceName . getParent ( ) ; ServiceController < ? > parentController = serviceContainer . getService ( parentName ) ; DeploymentUnit depUnit = ( ( DeploymentUnit ) ( parentController . getValue ( ) ) ) ; ArquillianConfig arqConfig = ArquillianConfigBuilder . processDeployment ( arqService , depUnit ) ; if ( arqConfig != null ) { ArquillianService . log . infof ( "Arquillian<seq2seq4repair_space>deployment<seq2seq4repair_space>detected:<seq2seq4repair_space>%s" , arqConfig ) ; ServiceBuilder < ArquillianConfig > builder = arqConfig . buildService ( serviceTarget , serviceController ) ; FrameworkActivationProcessor . processDependencies ( builder , arqConfig ) ; builder . install ( ) ; } } } case STARTING : { ServiceName serviceName = serviceController . getName ( ) ; String simpleName = serviceName . getSimpleName ( ) ; if ( ( JBOSS_DEPLOYMENT . isParentOf ( serviceName ) ) && ( simpleName . equals ( DEPENDENCIES . toString ( ) ) ) ) { ServiceName parentName = serviceName . getParent ( ) ; ServiceController < ? > parentController = serviceContainer . getService ( parentName ) ; DeploymentUnit depUnit = ( ( DeploymentUnit ) ( parentController . getValue ( ) ) ) ; ArquillianConfigBuilder . handleParseAnnotations ( depUnit ) ; FrameworkActivationProcessor . handleParseAnnotations ( depUnit ) ; } } } } } ; serviceContainer . addListener ( listener ) ; } public synchronized void stop ( StopContext context ) { } @ Override public synchronized ArquillianService getValue ( ) throws IllegalStateException { } void registerArquillianConfig ( ArquillianConfig arqConfig ) { } void unregisterArquillianConfig ( ArquillianConfig arqConfig ) { } private ArquillianConfig getArquillianConfig ( final String className , long timeout ) { } class ExtendedJMXTestRunner extends JMXTestRunner { ExtendedJMXTestRunner ( ) { } @ Override public byte [ ] runTestMethod ( final String className , final String methodName ) { } private ContextManager initializeContextManager ( final ArquillianConfig config , final Map < String , Object > properties ) { } } class ExtendedTestClassLoader implements JMXTestRunner . TestClassLoader { @ Override public Class < ? > loadTestClass ( final String className ) throws ClassNotFoundException { } } private static final class TCCLSetupAction implements SetupAction { private final ThreadLocal < ClassLoader > oldClassLoader = new ThreadLocal < ClassLoader > ( ) ; private final ClassLoader classLoader ; TCCLSetupAction ( final ClassLoader classLoader ) { } @ Override public int priority ( ) { } @ Override public Set < ServiceName > dependencies ( ) { } @ Override public void setup ( Map < String , Object > properties ) { } @ Override public void teardown ( Map < String , Object > properties ) { } } private enum GetTcclAction implements PrivilegedAction < ClassLoader > { INSTANCE ; @ Override public ClassLoader run ( ) { } } private static ClassLoader getTccl ( ) { } private static void setTccl ( final ClassLoader cl ) { } }

Fix:
switch ( transition . getAfter ( ) ) {