Buggy code:
public class CompileSpec implements ITestStep { private List expected = new ArrayList ( ) ; private String files ; private boolean includeClassesDir ; private String aspectpath ; private String classpath ; private String inpath ; private String sourceroots ; private String outjar ; private String xlintfile ; private String options ; private String baseDir ; private String extdirs ; private AjcTest myTest ; public CompileSpec ( ) { } public void execute ( AjcTestCase inTestCase ) { } public void addExpectedMessage ( ExpectedMessageSpec message ) { } public void setBaseDir ( String dir ) { } protected String getBaseDir ( ) { } public void setTest ( AjcTest t ) { } protected AjcTest getTest ( ) { } public String getAspectpath ( ) { } public void setAspectpath ( String aspectpath ) { } public String getClasspath ( ) { } public void setClasspath ( String classpath ) { } public String getFiles ( ) { } public void setFiles ( String files ) { } public boolean isIncludeClassesDir ( ) { } public void setIncludeClassesDir ( boolean includeClassesDir ) { } public String getInpath ( ) { } public void setInpath ( String inpath ) { } public String getOptions ( ) { } public void setOptions ( String options ) { } public String getOutjar ( ) { } public void setOutjar ( String outjar ) { } public String getSourceroots ( ) { } public void setSourceroots ( String sourceroots ) { } public String getXlintfile ( ) { } public void setXlintfile ( String xlintfile ) { } public String getExtdirs ( ) { } public void setExtdirs ( String extdirs ) { } protected String [ ] buildArgs ( ) { StringBuffer args = new StringBuffer ( ) ; if ( ( getAspectpath ( ) ) != null ) { args . append ( "-aspectpath<seq2seq4repair_space>" ) ; args . append ( getAspectpath ( ) ) ; args . append ( "<seq2seq4repair_space>" ) ; } if ( ( getSourceroots ( ) ) != null ) { args . append ( "-sourceroots<seq2seq4repair_space>" ) ; args . append ( getSourceroots ( ) ) ; args . append ( "<seq2seq4repair_space>" ) ; } if ( ( getOutjar ( ) ) != null ) { args . append ( "-outjar<seq2seq4repair_space>" ) ; args . append ( getOutjar ( ) ) ; args . append ( "<seq2seq4repair_space>" ) ; } if ( ( getOptions ( ) ) != null ) { StringTokenizer strTok = new StringTokenizer ( getOptions ( ) , "," ) ; while ( strTok . hasMoreTokens ( ) ) { args . append ( strTok . nextToken ( ) ) ; args . append ( "<seq2seq4repair_space>" ) ; } } if ( ( getClasspath ( ) ) != null ) { args . append ( "-classpath<seq2seq4repair_space>" ) ; args . append ( getClasspath ( ) ) ; args . append ( "<seq2seq4repair_space>" ) ; } if ( ( getXlintfile ( ) ) != null ) { args . append ( "-Xlintfile<seq2seq4repair_space>" ) ; args . append ( getXlintfile ( ) ) ; args . append ( "<seq2seq4repair_space>" ) ; } if ( ( getExtdirs ( ) ) != null ) { args . append ( "-extdirs<seq2seq4repair_space>" ) ; args . append ( getExtdirs ( ) ) ; args . append ( "<seq2seq4repair_space>" ) ; } List fileList = new ArrayList ( ) ; List jarList = new ArrayList ( ) ; String files = getFiles ( ) ; if ( files == null ) files = "" ; StringTokenizer strTok = new StringTokenizer ( files , "," ) ; while ( strTok . hasMoreTokens ( ) ) { <START_BUG> String file = strTok . nextToken ( ) ; <END_BUG> if ( file . endsWith ( ".jar" ) ) { jarList . add ( file ) ; } else { fileList . add ( file ) ; } } if ( ( ( getInpath ( ) ) != null ) || ( ! ( jarList . isEmpty ( ) ) ) ) { args . append ( "-inpath<seq2seq4repair_space>" ) ; if ( ( getInpath ( ) ) != null ) args . append ( getInpath ( ) ) ; for ( Iterator iter = jarList . iterator ( ) ; iter . hasNext ( ) ; ) { String jar = ( ( String ) ( iter . next ( ) ) ) ; args . append ( File . pathSeparator ) ; args . append ( jar ) ; } args . append ( "<seq2seq4repair_space>" ) ; } for ( Iterator iter = fileList . iterator ( ) ; iter . hasNext ( ) ; ) { String file = ( ( String ) ( iter . next ( ) ) ) ; args . append ( file ) ; args . append ( "<seq2seq4repair_space>" ) ; } String argumentString = args . toString ( ) ; strTok = new StringTokenizer ( argumentString , "<seq2seq4repair_space>" ) ; String [ ] ret = new String [ strTok . countTokens ( ) ] ; for ( int i = 0 ; i < ( ret . length ) ; i ++ ) { ret [ i ] = strTok . nextToken ( ) ; } return ret ; } protected MessageSpec buildMessageSpec ( ) { } }

Fix:
final String file = strTok . nextToken ( ) ;