Buggy code:
public class DeploymentScannerService implements Service < DeploymentScanner > { private static final int DEFAULT_INTERVAL = 5000 ; private long interval ; private TimeUnit unit = TimeUnit . MILLISECONDS ; private boolean enabled ; private boolean autoDeployZipped ; private boolean autoDeployExploded ; private Long deploymentTimeout ; private DeploymentScanner scanner ; private final InjectedValue < String > pathValue = new InjectedValue < String > ( ) ; private final InjectedValue < ServerController > serverControllerValue = new InjectedValue < ServerController > ( ) ; private final InjectedValue < ServerDeploymentRepository > deploymentRepositoryValue = new InjectedValue < ServerDeploymentRepository > ( ) ; private final InjectedValue < ScheduledExecutorService > scheduledExecutorValue = new InjectedValue < ScheduledExecutorService > ( ) ; public static ServiceName getServiceName ( String repositoryName ) { } public static void addService ( final ServiceTarget serviceTarget , final String name , final String relativeTo , final String path , final Integer scanInterval , TimeUnit unit , final Boolean autoDeployZip , final Boolean autoDeployExploded , final Boolean scanEnabled , final Long deploymentTimeout ) { final DeploymentScannerService service = new DeploymentScannerService ( scanInterval , unit , autoDeployZip , autoDeployExploded , scanEnabled , deploymentTimeout ) ; final ServiceName serviceName = DeploymentScannerService . getServiceName ( name ) ; final ServiceName pathService = serviceName . append ( "path" ) ; if ( relativeTo != null ) { RelativePathService . addService ( pathService , path , relativeTo , serviceTarget ) ; } else { AbsolutePathService . addService ( pathService , path , serviceTarget ) ; } <START_BUG> final ThreadFactory threadFactory = new JBossThreadFactory ( new ThreadGroup ( "DeplooymentScanner-threads" ) , Boolean . FALSE , null , "%G<seq2seq4repair_space>-<seq2seq4repair_space>%t" , null , null , AccessController . getContext ( ) ) ; <END_BUG> final ScheduledExecutorService scheduledExecutorService = Executors . newScheduledThreadPool ( 2 , threadFactory ) ; serviceTarget . addService ( serviceName , service ) . addDependency ( pathService , String . class , service . pathValue ) . addDependency ( JBOSS_SERVER_CONTROLLER , ServerController . class , service . serverControllerValue ) . addDependency ( SERVICE_NAME , ServerDeploymentRepository . class , service . deploymentRepositoryValue ) . addInjection ( service . scheduledExecutorValue , scheduledExecutorService ) . setInitialMode ( ACTIVE ) . install ( ) ; } DeploymentScannerService ( final Integer interval , final TimeUnit unit , final Boolean autoDeployZipped , final Boolean autoDeployExploded , final Boolean enabled , final Long deploymentTimeout ) { } @ Override public synchronized void start ( StartContext context ) throws StartException { } @ Override public synchronized void stop ( StopContext context ) { } @ Override public synchronized DeploymentScanner getValue ( ) throws IllegalStateException { } }

Fix:
final ThreadFactory threadFactory = new JBossThreadFactory ( new ThreadGroup ( "DeploymentScanner-threads" ) , Boolean . FALSE , null , "%G<seq2seq4repair_space>-<seq2seq4repair_space>%t" , null , null , AccessController . getContext ( ) ) ;