Buggy code:
public abstract class AbstractSurefireMojo extends AbstractMojo implements SurefireExecutionParameters { protected abstract String getPluginName ( ) { } private SurefireDependencyResolver dependencyResolver ; public void execute ( ) throws MojoExecutionException , MojoFailureException { } boolean verifyParameters ( ) throws MojoFailureException { } protected abstract boolean isSkipExecution ( ) { } protected void executeAfterPreconditionsChecked ( ) throws MojoExecutionException , MojoFailureException { } private Artifact surefireBooterArtifact ; private void createDependencyResolver ( ) { } protected List < ProviderInfo > createProviders ( ) throws MojoFailureException { } private Summary executeAllProviders ( ) throws MojoExecutionException , MojoFailureException { } private void executeProvider ( ProviderInfo provider , Summary summary ) throws MojoExecutionException , MojoFailureException { } protected abstract void handleSummary ( Summary summary ) throws MojoExecutionException , MojoFailureException { } protected void restoreOriginalSystemPropertiesWhenNotForking ( Summary summary ) { } protected void logReportsDirectory ( ) { } final Toolchain getToolchain ( ) { } private void convertTestNGParameters ( ) { } private void convertGroupParameters ( ) { } protected boolean isAnyConcurrencySelected ( ) { } protected boolean isAnyGroupsSelected ( ) { } private void convertJunitCoreParameters ( ) { } private boolean isJunit47Compatible ( Artifact artifact ) { } private boolean isAnyJunit4 ( Artifact artifact ) { } boolean isForkModeNever ( ) { } private List < RunOrder > getRunOrders ( ) { } private boolean requiresRunHistory ( ) { } protected ProviderConfiguration createProviderConfiguration ( String configurationHash ) throws MojoExecutionException , MojoFailureException { ReporterConfiguration reporterConfiguration = new ReporterConfiguration ( getReportsDirectory ( ) , isTrimStackTrace ( ) ) ; Artifact testNgArtifact ; try { testNgArtifact = getTestNgArtifact ( ) ; } catch ( InvalidVersionSpecificationException e ) { throw new MojoExecutionException ( ( "Error<seq2seq4repair_space>determining<seq2seq4repair_space>the<seq2seq4repair_space>TestNG<seq2seq4repair_space>version<seq2seq4repair_space>requested:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , e ) ; } DirectoryScannerParameters directoryScannerParameters = null ; final boolean isTestNg = testNgArtifact != null ; TestArtifactInfo testNg = ( isTestNg ) ? new TestArtifactInfo ( testNgArtifact . getVersion ( ) , testNgArtifact . getClassifier ( ) ) : null ; List < File > testXml = ( ( getSuiteXmlFiles ( ) ) != null ) ? Arrays . asList ( getSuiteXmlFiles ( ) ) : null ; TestRequest testSuiteDefinition = new TestRequest ( testXml , getTestSourceDirectory ( ) , getTest ( ) , getTestMethod ( ) ) ; final boolean failIfNoTests ; if ( ( isValidSuiteXmlFileConfig ( ) ) && ( ( getTest ( ) ) == null ) ) { failIfNoTests = ( ( getFailIfNoTests ( ) ) != null ) && ( getFailIfNoTests ( ) ) ; if ( ! isTestNg ) { throw new MojoExecutionException ( "suiteXmlFiles<seq2seq4repair_space>is<seq2seq4repair_space>configured,<seq2seq4repair_space>but<seq2seq4repair_space>there<seq2seq4repair_space>is<seq2seq4repair_space>no<seq2seq4repair_space>TestNG<seq2seq4repair_space>dependency" ) ; } } else { if ( isSpecificTestSpecified ( ) ) { if ( ( getFailIfNoSpecifiedTests ( ) ) != null ) { failIfNoTests = getFailIfNoSpecifiedTests ( ) . booleanValue ( ) ; } else if ( ( getFailIfNoTests ( ) ) != null ) { failIfNoTests = getFailIfNoTests ( ) . booleanValue ( ) ; } else { failIfNoTests = true ; } setFailIfNoTests ( Boolean . valueOf ( failIfNoTests ) ) ; } else { failIfNoTests = ( ( getFailIfNoTests ( ) ) != null ) && ( getFailIfNoTests ( ) . booleanValue ( ) ) ; } List < String > includes = getIncludeList ( ) ; List < String > excludes = getExcludeList ( ) ; List < String > specificTests = getSpecificTests ( ) ; <START_BUG> directoryScannerParameters = new DirectoryScannerParameters ( getTestClassesDirectory ( ) , includes , excludes , specificTests , getRunOrder ( ) ) ; <END_BUG> } Properties providerProperties = getProperties ( ) ; if ( providerProperties == null ) { providerProperties = new Properties ( ) ; } RunOrderParameters runOrderParameters = new RunOrderParameters ( getRunOrder ( ) , getStatisticsFileName ( configurationHash ) ) ; return new ProviderConfiguration ( directoryScannerParameters , runOrderParameters , failIfNoTests , reporterConfiguration , testNg , testSuiteDefinition , providerProperties , null ) ; } public String getStatisticsFileName ( String configurationHash ) { } StartupConfiguration createStartupConfiguration ( ForkConfiguration forkConfiguration , ProviderInfo provider , ClassLoaderConfiguration classLoaderConfiguration ) throws MojoExecutionException , MojoFailureException { } private Artifact getCommonArtifact ( ) { } private StartupReportConfiguration getStartupReportConfiguration ( String configChecksum ) { } void logClasspath ( Classpath classpath , String descriptor ) { } private boolean isSpecificTestSpecified ( ) { } private boolean isValidSuiteXmlFileConfig ( ) { } private List < String > getExcludeList ( ) { } private List < String > getIncludeList ( ) { } private List < String > getSpecificTests ( ) { } private Artifact getTestNgArtifact ( ) throws InvalidVersionSpecificationException , MojoFailureException { } private Artifact getJunitArtifact ( ) { } private Artifact getJunitDepArtifact ( ) { } protected ForkStarter createForkStarter ( ProviderInfo provider , ForkConfiguration forkConfiguration , ClassLoaderConfiguration classLoaderConfiguration ) throws MojoExecutionException , MojoFailureException { } protected InPluginVMSurefireStarter createInprocessStarter ( ProviderInfo provider , ForkConfiguration forkConfiguration , ClassLoaderConfiguration classLoaderConfiguration ) throws MojoExecutionException , MojoFailureException { } protected ForkConfiguration getForkConfiguration ( ) { } private void verifyLegalSystemProperties ( ) { } private File getSurefireTempDir ( ) { } private String getConfigChecksum ( ) { } protected abstract void addPluginSpecificChecksumItems ( ChecksumCalculator checksum ) { } protected boolean hasExecutedBefore ( ) { } protected ClassLoaderConfiguration getClassLoaderConfiguration ( ForkConfiguration fork ) { } protected abstract String [ ] getDefaultIncludes ( ) { } Classpath generateTestClasspath ( ) throws ArtifactNotFoundException , ArtifactResolutionException , InvalidVersionSpecificationException , MojoFailureException { } Artifact getTestNgUtilsArtifact ( ) throws ArtifactNotFoundException , ArtifactResolutionException { } private Set < Artifact > filterArtifacts ( Set < Artifact > artifacts , ArtifactFilter filter ) { } private void showMap ( Map < ? , ? > map , String setting ) { } private ArtifactResolutionResult resolveArtifact ( Artifact filteredArtifact , Artifact providerArtifact ) { } private Classpath getArtifactClasspath ( Artifact surefireArtifact ) { } void processSystemProperties ( boolean setInSystem ) { } private void copyPropertiesToInternalSystemProperties ( Properties properties ) { } private Properties getUserProperties ( ) { } void ensureWorkingDirectoryExists ( ) throws MojoFailureException { } void ensureParallelRunningCompatibility ( ) throws MojoFailureException { } void warnIfUselessUseSystemClassLoaderParameter ( ) { } class TestNgProviderInfo implements ProviderInfo { private final Artifact testNgArtifact ;

Fix:
directoryScannerParameters = new DirectoryScannerParameters ( getTestClassesDirectory ( ) , includes , excludes , specificTests , failIfNoTests , getRunOrder ( ) ) ;