Buggy code:
@ AfterClass ( alwaysRun = true ) public static void oncePerClassTearDown ( ) throws Exception { } protected void runOnce ( ) throws Exception { } protected File getNexusLogFile ( ) { } protected void beforeStartClean ( ) throws Exception { } protected void copyTestResources ( ) throws IOException { } protected void copyConfigFiles ( ) throws IOException { } protected void findReplaceInFile ( File file , String findString , String replaceString ) throws IOException { } protected static void cleanWorkDir ( ) throws Exception { } protected void deployArtifacts ( ) throws Exception { } protected void deployArtifacts ( final File projectsDir ) throws Exception { } protected String getWagonHintForDeployProtocol ( String deployProtocol ) { } protected void deployArtifacts ( File project , String wagonHint , String deployUrl , Model model ) throws Exception { } protected void startNexus ( ) throws Exception { } protected static void stopNexus ( ) throws Exception { } protected void restartNexus ( ) throws Exception { } protected File getOverridableFile ( String file ) { } protected void copyConfigFile ( String configFile , String destShortName , Map < String , String > variables , String path ) throws IOException { } protected void copyConfigFile ( String configFile , String path ) throws IOException { } protected void copyConfigFile ( String configFile , Map < String , String > variables , String path ) throws IOException { } protected File getTestResourceAsFile ( String relativePath ) { } protected String getTestId ( ) { } protected File getTestFile ( String relativePath ) { } public static File getResource ( String resource ) { } private static Object profiler ; private static void startProfiler ( ) { } private static void takeSnapshot ( ) { } public static String getBasedir ( ) { } protected Object lookup ( String role ) throws ComponentLookupException { } protected Object lookup ( String role , String hint ) throws ComponentLookupException { } protected < E > E lookup ( Class < E > role ) throws ComponentLookupException { } protected < E > E lookup ( Class < E > role , String hint ) throws ComponentLookupException { } protected String getRelitivePomPath ( Gav gav ) throws FileNotFoundException { } protected String getRelitiveArtifactPath ( Gav gav ) throws FileNotFoundException { } protected String getRelitiveArtifactPath ( String groupId , String artifactId , String version , String extension , String classifier ) throws FileNotFoundException { } public File downloadSnapshotArtifact ( String repository , Gav gav , File parentDir ) throws IOException { } protected Metadata downloadMetadataFromRepository ( Gav gav , String repoId ) throws IOException , XmlPullParserException { } protected File downloadArtifact ( Gav gav , String targetDirectory ) throws IOException { } protected File downloadArtifact ( String groupId , String artifact , String version , String type , String classifier , String targetDirectory ) throws IOException { } protected File downloadArtifactFromRepository ( String repoId , Gav gav , String targetDirectory ) throws IOException { } protected File downloadArtifactFromGroup ( String groupId , Gav gav , String targetDirectory ) throws IOException { } protected File downloadArtifact ( String baseUrl , String groupId , String artifact , String version , String type , String classifier , String targetDirectory ) throws IOException { } public File downloadFile ( URL url , String targetFile ) throws IOException { } protected boolean deleteFromRepository ( String groupOrArtifactPath ) throws IOException { } protected boolean deleteFromRepository ( String repository , String groupOrArtifactPath ) throws IOException { } public String getBaseNexusUrl ( ) { } public String getNexusTestRepoUrl ( String repo ) { } public String getNexusTestRepoUrl ( ) { } public String getNexusTestRepoServiceUrl ( ) { } public String getNexusBaseDir ( ) { } public String getTestRepositoryId ( ) { } public void setTestRepositoryId ( String repoId ) { } public String getRepositoryUrl ( String repoId ) { } public String getGroupUrl ( String groupId ) { } protected boolean isVerifyNexusConfigBeforeStart ( ) { } protected void setVerifyNexusConfigBeforeStart ( boolean verifyNexusConfigBeforeStart ) { } protected boolean printKnownErrorButDoNotFail ( Class < ? extends AbstractNexusIntegrationTest > clazz , String ... tests ) { } public XStream getXMLXStream ( ) { } public XStream getJsonXStream ( ) { } private static PlexusContainer itPlexusContainer ; public PlexusContainer getITPlexusContainer ( ) { } public synchronized PlexusContainer getITPlexusContainer ( Class < ? > clazz ) { } public static synchronized void killITPlexusContainer ( ) { } protected void customizeContainerConfiguration ( ContainerConfiguration configuration ) { } private PlexusContainer setupContainer ( Class < ? > baseClass ) { Map < Object , Object > context = new HashMap < Object , Object > ( ) ; context . put ( "basedir" , AbstractNexusIntegrationTest . getBasedir ( ) ) ; context . putAll ( getTestProperties ( ) ) ; boolean hasPlexusHome = context . containsKey ( "plexus.home" ) ; if ( ! hasPlexusHome ) { File f = new File ( AbstractNexusIntegrationTest . getBasedir ( ) , "target//plexus-home" ) ; if ( ! ( f . isDirectory ( ) ) ) { f . mkdir ( ) ; } context . put ( "plexus.home" , f . getAbsolutePath ( ) ) ; } ContainerConfiguration containerConfiguration = new DefaultContainerConfiguration ( ) . setName ( "test" ) . setContext ( context ) . setContainerConfiguration ( ( ( baseClass . getName ( ) . replace ( '.' , '//' ) ) + ".xml" ) ) ; containerConfiguration . setAutoWiring ( true ) ; <START_BUG> containerConfiguration . setClassPathScanning ( SCANNING_CACHE ) ; <END_BUG> customizeContainerConfiguration ( containerConfiguration ) ; try { return new org . codehaus . plexus . DefaultPlexusContainer ( containerConfiguration ) ; } catch ( PlexusContainerException e ) { e . printStackTrace ( ) ; fail ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>plexus<seq2seq4repair_space>container." ) ; return null ; } } protected void installOptionalPlugin ( final String plugin ) throws IOException { } protected File getOptionalPluginDirectory ( final String plugin ) { } protected Map < String , String > getTestProperties ( ) { } }

Fix:
containerConfiguration . setClassPathScanning ( SCANNING_INDEX ) ;