Buggy code:
public static final int MSG_DEBUG = 4 ; private static final String VISITING = "VISITING" ; private static final String VISITED = "VISITED" ; public static final String JAVA_1_0 = JavaEnvUtils . JAVA_1_0 ; public static final String JAVA_1_1 = JavaEnvUtils . JAVA_1_1 ; public static final String JAVA_1_2 = JavaEnvUtils . JAVA_1_2 ; public static final String JAVA_1_3 = JavaEnvUtils . JAVA_1_3 ; public static final String JAVA_1_4 = JavaEnvUtils . JAVA_1_4 ; public static final String TOKEN_START = FilterSet . DEFAULT_TOKEN_START ; public static final String TOKEN_END = FilterSet . DEFAULT_TOKEN_END ; private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; private String name ; private String description ; private Hashtable references = new Project . AntRefTable ( ) ; private HashMap idReferences = new HashMap ( ) ; private Project parentIdProject = null ; private String defaultTarget ; private Hashtable targets = new Hashtable ( ) ; private FilterSet globalFilterSet = new FilterSet ( ) ; private FilterSetCollection globalFilters = new FilterSetCollection ( globalFilterSet ) ; private File baseDir ; private Vector listeners = new Vector ( ) ; private ClassLoader coreLoader = null ; private Map threadTasks = Collections . synchronizedMap ( new WeakHashMap ( ) ) ; private Map threadGroupTasks = Collections . synchronizedMap ( new WeakHashMap ( ) ) ; private InputHandler inputHandler = null ; private InputStream defaultInputStream = null ; private boolean keepGoingMode = false ; private boolean loggingMessage = false ; public void setInputHandler ( InputHandler handler ) { } public void setDefaultInputStream ( InputStream defaultInputStream ) { } public InputStream getDefaultInputStream ( ) { } public InputHandler getInputHandler ( ) { } public Project ( ) { } public Project createSubProject ( ) { } public void initSubProject ( Project subProject ) { } public void init ( ) throws BuildException { } public void initProperties ( ) throws BuildException { } private void setAntLib ( ) { } public AntClassLoader createClassLoader ( Path path ) { } public AntClassLoader createClassLoader ( ClassLoader parent , Path path ) { } public void setCoreLoader ( ClassLoader coreLoader ) { } public ClassLoader getCoreLoader ( ) { } public synchronized void addBuildListener ( BuildListener listener ) { } public synchronized void removeBuildListener ( BuildListener listener ) { } public Vector getBuildListeners ( ) { } public void log ( String message ) { } public void log ( String message , int msgLevel ) { } public void log ( String message , Throwable throwable , int msgLevel ) { } public void log ( Task task , String message , int msgLevel ) { } public void log ( Task task , String message , Throwable throwable , int msgLevel ) { } public void log ( Target target , String message , int msgLevel ) { } public void log ( Target target , String message , Throwable throwable , int msgLevel ) { } public FilterSet getGlobalFilterSet ( ) { } public void setProperty ( String name , String value ) { } public void setNewProperty ( String name , String value ) { } public void setUserProperty ( String name , String value ) { } public void setInheritedProperty ( String name , String value ) { } private void setPropertyInternal ( String name , String value ) { } public String getProperty ( String propertyName ) { } public String replaceProperties ( String value ) throws BuildException { } public String getUserProperty ( String propertyName ) { } public Hashtable getProperties ( ) { } public Hashtable getUserProperties ( ) { } public void copyUserProperties ( Project other ) { } public void copyInheritedProperties ( Project other ) { } public void setDefaultTarget ( String defaultTarget ) { } public String getDefaultTarget ( ) { } public void setDefault ( String defaultTarget ) { } public void setName ( String name ) { <START_BUG> setUserProperty ( "ant.project.name" , name ) ; <END_BUG> this . name = name ; } public String getName ( ) { } public void setDescription ( String description ) { } public String getDescription ( ) { } public void addFilter ( String token , String value ) { } public Hashtable getFilters ( ) { } public void setBasedir ( String baseD ) throws BuildException { } 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 ) { }

Fix:
setUserProperty ( PROJECT_NAME , name ) ;