Buggy code:
public void setBaseDir ( File baseDir ) throws BuildException { } public File getBaseDir ( ) { } public void setKeepGoingMode ( boolean keepGoingMode ) { } public boolean isKeepGoingMode ( ) { } public static String getJavaVersion ( ) { } public void setJavaVersionProperty ( ) throws BuildException { } public void setSystemProperties ( ) { } public void addTaskDefinition ( String taskName , Class taskClass ) throws BuildException { } public void checkTaskClass ( final Class taskClass ) throws BuildException { } public Hashtable getTaskDefinitions ( ) { } public void addDataTypeDefinition ( String typeName , Class typeClass ) { } public Hashtable getDataTypeDefinitions ( ) { } public void addTarget ( Target target ) throws BuildException { } public void addTarget ( String targetName , Target target ) throws BuildException { } public void addOrReplaceTarget ( Target target ) { } public void addOrReplaceTarget ( String targetName , Target target ) { } public Hashtable getTargets ( ) { } public Task createTask ( String taskType ) throws BuildException { } public Object createDataType ( String typeName ) throws BuildException { } public void setExecutor ( Executor e ) { } public Executor getExecutor ( ) { } public void executeTargets ( Vector names ) throws BuildException { } public void demuxOutput ( String output , boolean isWarning ) { } public int defaultInput ( byte [ ] buffer , int offset , int length ) throws IOException { } public int demuxInput ( byte [ ] buffer , int offset , int length ) throws IOException { } public void demuxFlush ( String output , boolean isError ) { } public void executeTarget ( String targetName ) throws BuildException { } public void executeSortedTargets ( Vector sortedTargets ) throws BuildException { } public File resolveFile ( String fileName , File rootDir ) { } public File resolveFile ( String fileName ) { } public static String translatePath ( String toProcess ) { } public void copyFile ( String sourceFile , String destFile ) throws IOException { } public void copyFile ( String sourceFile , String destFile , boolean filtering ) throws IOException { } public void copyFile ( String sourceFile , String destFile , boolean filtering , boolean overwrite ) throws IOException { } public void copyFile ( String sourceFile , String destFile , boolean filtering , boolean overwrite , boolean preserveLastModified ) throws IOException { } public void copyFile ( File sourceFile , File destFile ) throws IOException { } public void copyFile ( File sourceFile , File destFile , boolean filtering ) throws IOException { } public void copyFile ( File sourceFile , File destFile , boolean filtering , boolean overwrite ) throws IOException { } public void copyFile ( File sourceFile , File destFile , boolean filtering , boolean overwrite , boolean preserveLastModified ) throws IOException { } public void setFileLastModified ( File file , long time ) throws BuildException { } public static boolean toBoolean ( String s ) { } public static Project getProject ( Object o ) { } public final Vector topoSort ( String root , Hashtable targetTable ) throws BuildException { } public final Vector topoSort ( String root , Hashtable targetTable , boolean returnAll ) throws BuildException { } public final Vector topoSort ( String [ ] root , Hashtable targetTable , boolean returnAll ) throws BuildException { } private void tsort ( String root , Hashtable targetTable , Hashtable state , Stack visiting , Vector ret ) throws BuildException { } private static BuildException makeCircularException ( String end , Stack stk ) { } public void inheritIDReferences ( Project parent ) { } public void addIdReference ( String id , Object value ) { } public void addReference ( String referenceName , Object value ) { } public Hashtable getReferences ( ) { } public Object getReference ( String key ) { } public String getElementName ( Object element ) { } public void fireBuildStarted ( ) { } public void fireBuildFinished ( Throwable exception ) { } public void fireSubBuildStarted ( ) { } public void fireSubBuildFinished ( Throwable exception ) { } protected void fireTargetStarted ( Target target ) { } protected void fireTargetFinished ( Target target , Throwable exception ) { } protected void fireTaskStarted ( Task task ) { } protected void fireTaskFinished ( Task task , Throwable exception ) { registerThreadTask ( Thread . currentThread ( ) , null ) ; System . out . flush ( ) ; System . err . flush ( ) ; BuildEvent event = new BuildEvent ( task ) ; event . setException ( exception ) ; BuildListener [ ] currListeners = listeners ; for ( int i = 0 ; i < ( currListeners . length ) ; i ++ ) { <START_BUG> currListeners [ i ] . targetFinished ( event ) ; <END_BUG> } } private void fireMessageLoggedEvent ( BuildEvent event , String message , int priority ) { } protected void fireMessageLogged ( Project project , String message , int priority ) { } protected void fireMessageLogged ( Project project , String message , Throwable throwable , int priority ) { } protected void fireMessageLogged ( Target target , String message , int priority ) { } protected void fireMessageLogged ( Target target , String message , Throwable throwable , int priority ) { } protected void fireMessageLogged ( Task task , String message , int priority ) { } protected void fireMessageLogged ( Task task , String message , Throwable throwable , int priority ) { } public void registerThreadTask ( Thread thread , Task task ) { } public Task getThreadTask ( Thread thread ) { } private static class AntRefTable extends Hashtable { AntRefTable ( ) { } private Object getReal ( Object key ) { } public Object get ( Object key ) { } } public final void setProjectReference ( final Object obj ) { } public Resource getResource ( String name ) { } }

Fix:
currListeners [ i ] . taskFinished ( event ) ;