Buggy code:
public class FileSystemDeploymentServiceUnitTestCase { private static long count = System . currentTimeMillis ( ) ; private static final Random random = new Random ( System . currentTimeMillis ( ) ) ; private static final FileSystemDeploymentServiceUnitTestCase . DiscardTaskExecutor executor = new FileSystemDeploymentServiceUnitTestCase . DiscardTaskExecutor ( ) ; private static AutoDeployTestSupport testSupport ; private File tmpDir ; @ BeforeClass public static void createTestSupport ( ) throws Exception { } @ AfterClass public static void cleanup ( ) throws Exception { } @ Before public void setup ( ) throws Exception { } @ After public void tearDown ( ) throws Exception { } @ Test public void testIgnoreNoMarker ( ) throws Exception { } @ Test public void testBasicDeploy ( ) throws Exception { } @ Test public void testNestedDeploy ( ) throws Exception { } @ Test public void testTwoFileDeploy ( ) throws Exception { } @ Test public void testBasicFailure ( ) throws Exception { } @ Test public void testTwoFileFailure ( ) throws Exception { } @ Test public void testCancellationDueToFailure ( ) throws Exception { } @ Test public void testSuccessfulRetry ( ) throws Exception { } @ Test public void testCleanSpuriousMarkers ( ) throws Exception { } @ Test public void testOverridePreexisting ( ) throws Exception { } @ Test public void testRedeploy ( ) throws Exception { } @ Test public void testTwoFileRedeploy ( ) throws Exception { } @ Test public void testFailedRedeploy ( ) throws Exception { } @ Test public void testTwoFileFailedRedeploy ( ) throws Exception { } @ Test public void testSuccessfulRetryRedeploy ( ) throws Exception { } @ Test public void testUndeploy ( ) throws Exception { } @ Test public void testRedeployUndeploy ( ) throws Exception { } @ Test public void testDirectory ( ) throws Exception { } @ Test public void testNoDefaultAutoDeploy ( ) throws Exception { } @ Test public void testIncompleteZipped ( ) throws Exception { } @ Test public void testIncompleteExploded ( ) throws Exception { } @ Test public void testIncompleteBlocksComplete ( ) throws Exception { } @ Test public void testMaxNoProgress ( ) throws Exception { } @ Test public void testIgnoreNonArchive ( ) throws Exception { } @ Test public void testIgnoreNonArchiveInExplodedDeployment ( ) throws Exception { } @ Test public void testSkipDeploy ( ) throws Exception { } @ Test public void testNonScannableZipped ( ) throws Exception { } @ Test public void testZip64Zipped ( ) throws Exception { } @ Test public void testIgnoreUndeployed ( ) throws Exception { } @ Test public void testDeploymentTimeout ( ) throws Exception { } private FileSystemDeploymentServiceUnitTestCase . TesteeSet createTestee ( String ... existingContent ) throws OperationFailedException { } private FileSystemDeploymentServiceUnitTestCase . TesteeSet createTestee ( final ScheduledExecutorService executorService , final String ... existingContent ) throws OperationFailedException { } private FileSystemDeploymentServiceUnitTestCase . TesteeSet createTestee ( final FileSystemDeploymentServiceUnitTestCase . MockServerController sc ) throws OperationFailedException { } private FileSystemDeploymentServiceUnitTestCase . TesteeSet createTestee ( final FileSystemDeploymentServiceUnitTestCase . MockServerController sc , final ScheduledExecutorService executor ) throws OperationFailedException { final FileSystemDeploymentServiceUnitTestCase . MockDeploymentRepository repo = new FileSystemDeploymentServiceUnitTestCase . MockDeploymentRepository ( ) ; <START_BUG> final FileSystemDeploymentService testee = new FileSystemDeploymentService ( null , tmpDir , sc , executor , repo , repo ) ; <END_BUG> testee . startScanner ( ) ; return new FileSystemDeploymentServiceUnitTestCase . TesteeSet ( testee , repo , sc ) ; } private File createFile ( String fileName ) throws IOException { } private File createFile ( File dir , String fileName ) throws IOException { } private File createDirectory ( String name , String ... children ) throws IOException { } private File createDirectory ( File dir , String name , String ... children ) throws IOException { } private static class TesteeSet { private final FileSystemDeploymentService testee ; private final FileSystemDeploymentServiceUnitTestCase . MockDeploymentRepository repo ; private final FileSystemDeploymentServiceUnitTestCase . MockServerController controller ; public TesteeSet ( FileSystemDeploymentService testee , FileSystemDeploymentServiceUnitTestCase . MockDeploymentRepository repo , FileSystemDeploymentServiceUnitTestCase . MockServerController sc ) { } } private static class MockDeploymentRepository implements ContentRepository , ServerDeploymentRepository { private Set < byte [ ] > content = new HashSet < byte [ ] > ( 2 ) ; @ Override public byte [ ] addContent ( InputStream stream ) throws IOException { } @ Override public VirtualFile getContent ( byte [ ] hash ) { } @ Override public boolean hasContent ( byte [ ] hash ) { } @ Override public void removeContent ( byte [ ] hash ) { } @ Override public byte [ ] addExternalFileReference ( File file ) throws IOException { } public byte [ ] addExternalFileReference ( String name , String runtimeName , File file ) throws IOException { } @ Override public Closeable mountDeploymentContent ( String name , String runtimeName , VirtualFile contents , VirtualFile mountPoint ) throws IOException { } @ Override public Closeable mountDeploymentContent ( String name , String runtimeName , VirtualFile contents , VirtualFile mountPoint , boolean mountExploded ) throws IOException { } } private static class MockServerController implements ServerController { private final List < ModelNode > requests = new ArrayList < ModelNode > ( 1 ) ; private final List < FileSystemDeploymentServiceUnitTestCase . MockServerController . Response > responses = new ArrayList < FileSystemDeploymentServiceUnitTestCase . MockServerController . Response > ( 1 ) ; private final Map < String , byte [ ] > added = new HashMap < String , byte [ ] > ( ) ; private final Map < String , byte [ ] > deployed = new HashMap < String , byte [ ] > ( ) ; private static class Response { private final boolean ok ; private final ModelNode rsp ; Response ( boolean ok , ModelNode rsp ) { } } MockServerController ( ContentRepository repo , String ... existingDeployments ) { } public void addCompositeSuccessResponse ( int count ) { } public void addCompositeFailureResponse ( int count , int failureStep ) { } private ModelNode getDeploymentNamesResponse ( ) { } @ Override public OperationResult execute ( Operation operation , ResultHandler handler ) { }

Fix:
final FileSystemDeploymentService testee = new FileSystemDeploymentService ( null , tmpDir , null , sc , executor , repo , repo ) ;