if (!sourceCode.hasNext()) {
if (!sourceCode.next()) {
	private void insertDisplaySetting( String className, StringList sourceCode ) {		// at first try to find the startApp method:		while (sourceCode.next()) {			String line = sourceCode.getCurrent();			Matcher matcher = START_APP_PATTERN.matcher(line);			if (matcher.find()) {				int lineIndex = sourceCode.getCurrentIndex();				while ((line.indexOf('{') == -1) && (sourceCode.next()) ) {					line = sourceCode.getCurrent();				}				if (!sourceCode.hasNext()) {					throw new BuildException("Unable to process MIDlet [" + className + "]: startApp method is not opened with '{': line [" + (++lineIndex) + "].");				}				sourceCode.insert("de.enough.polish.ui.StyleSheet.display = javax.microedition.lcdui.Display.getDisplay( this );");				return;			}		}		System.out.println(START_APP_PATTERN.pattern());		throw new BuildException("Unable to find startApp method in MIDlet [" + className + "].");	}