Buggy code:
public class JMeterMojo extends AbstractMojo { private List < String > jMeterTestFiles ; private List < String > excludeJMeterTestFiles ; private File srcDir ; private File reportDir ; private boolean enableReports ; private File reportXslt ; private File jmeterDefaultPropertiesFile ; private File jmeterCustomPropertiesFile ; @ SuppressWarnings ( "rawtypes" ) private Map < String , String > jmeterUserProperties ; @ SuppressWarnings ( "rawtypes" ) private Map < String , String > jmeterGlobalProperties ; private File jmeterGlobalPropertiesFile ; @ SuppressWarnings ( "rawtypes" ) private Map < String , String > systemProperties ; @ SuppressWarnings ( "rawtypes" ) private Map < String , String > overrideLogCategories ; private String overrideRootLogLevel ; private boolean remote ; private boolean jmeterIgnoreFailure ; private boolean jmeterIgnoreError ; @ SuppressWarnings ( "unused" ) private MavenProject mavenProject ; private ArtifactResolver artifactResolver ; private ArtifactRepository localRepository ; private String proxyHost ; private Integer proxyPort ; private String proxyUsername ; private String proxyPassword ; private String reportPostfix ; private boolean jmeterPreserveIncludeOrder ; private File workDir ; private File jmeterLog ; private static final String JMETER_ARTIFACT_GROUPID = "org.apache.jmeter" ; private JMeterArgumentsArray testArgs ; public void execute ( ) throws MojoExecutionException , MojoFailureException { } private void makeReport ( List < String > results ) throws MojoExecutionException { } private String toOutputFileName ( String fileName ) { } private InputStream getXslt ( ) throws IOException { } private void checkForErrors ( List < String > results ) throws MojoExecutionException , MojoFailureException { ErrorScanner scanner = new ErrorScanner ( this . jmeterIgnoreError , this . jmeterIgnoreFailure ) ; int totalErrorCount = 0 ; int totalFailureCount = 0 ; boolean failed = false ; try { for ( String file : results ) { <START_BUG> if ( scanner . scanForProblems ( new File ( file ) ) ) { <END_BUG> totalErrorCount = + ( scanner . getErrorCount ( ) ) ; totalFailureCount = + ( scanner . getFailureCount ( ) ) ; failed = true ; } } getLog ( ) . info ( "\n\nResults<seq2seq4repair_space>:\n\n" ) ; getLog ( ) . info ( ( ( ( ( ( ( "Tests<seq2seq4repair_space>Run:<seq2seq4repair_space>" + ( results . size ( ) ) ) + ",<seq2seq4repair_space>Failures:<seq2seq4repair_space>" ) + totalFailureCount ) + ",<seq2seq4repair_space>Errors:<seq2seq4repair_space>" ) + totalErrorCount ) + "\n\n" ) ) ; } catch ( IOException e ) { throw new MojoExecutionException ( "Can't<seq2seq4repair_space>read<seq2seq4repair_space>log<seq2seq4repair_space>file" , e ) ; } if ( failed ) { if ( totalErrorCount == 0 ) { throw new MojoExecutionException ( "There<seq2seq4repair_space>were<seq2seq4repair_space>test<seq2seq4repair_space>failures.<seq2seq4repair_space>See<seq2seq4repair_space>the<seq2seq4repair_space>jmeter<seq2seq4repair_space>logs<seq2seq4repair_space>for<seq2seq4repair_space>details." ) ; } else if ( totalFailureCount == 0 ) { throw new MojoExecutionException ( "There<seq2seq4repair_space>were<seq2seq4repair_space>test<seq2seq4repair_space>errors.<seq2seq4repair_space>See<seq2seq4repair_space>the<seq2seq4repair_space>jmeter<seq2seq4repair_space>logs<seq2seq4repair_space>for<seq2seq4repair_space>details." ) ; } else { throw new MojoExecutionException ( "There<seq2seq4repair_space>were<seq2seq4repair_space>test<seq2seq4repair_space>errors<seq2seq4repair_space>and<seq2seq4repair_space>failures.<seq2seq4repair_space>See<seq2seq4repair_space>the<seq2seq4repair_space>jmeter<seq2seq4repair_space>logs<seq2seq4repair_space>for<seq2seq4repair_space>details." ) ; } } } private void validateInput ( ) throws MojoExecutionException { } private void createWorkingFiles ( ) throws MojoExecutionException { } private void resolveJmeterArtifact ( ) throws MojoExecutionException { } @ SuppressWarnings ( "unchecked" ) private void createTemporaryProperties ( ) throws MojoExecutionException { } private void initialiseJMeterArgumentsArray ( ) { } private List < String > generateTestList ( ) { } private String executeTest ( File test ) throws MojoExecutionException { } private boolean checkForEndOfTest ( BufferedReader in ) throws MojoExecutionException { } private static class ExitException extends SecurityException { private static final long serialVersionUID = 5544099211927987521L ; public int _rc ; public ExitException ( int rc ) { } public int getCode ( ) { } } }

Fix:
if ( ! ( scanner . hasTestPassed ( new File ( file ) ) ) ) {