Buggy code:
} public static class AntXmlContext { public Project project ; public File buildFile ; public Vector targetVector = new Vector ( ) ; public File buildFileParent ; public String currentProjectName ; public Locator locator ; public ProjectHelper2 helper ; XMLReader parser ; public Target implicitTarget = new Target ( ) ; public Target currentTarget = null ; public Vector wStack = new Vector ( ) ; public Hashtable namespaces = new Hashtable ( ) ; public boolean ignoreProjectTag = false ; public Hashtable importedFiles = new Hashtable ( ) ; public int importlevel = 0 ; public AntXmlContext ( Project project , ProjectHelper2 helper ) { } public Project getProject ( ) { } public RuntimeConfigurable currentWrapper ( ) { } public RuntimeConfigurable parentWrapper ( ) { } public void pushWrapper ( RuntimeConfigurable wrapper ) { } public void popWrapper ( ) { } public Vector getWrapperStack ( ) { } public void configureId ( Object element , Attributes attr ) { } } public static class RootHandler extends DefaultHandler { private Stack antHandlers = new Stack ( ) ; private ProjectHelper2 . AntHandler currentHandler = null ; private ProjectHelper2 . AntXmlContext context ; public RootHandler ( ProjectHelper2 . AntXmlContext context ) { } public InputSource resolveEntity ( String publicId , String systemId ) { } public void startElement ( String uri , String tag , String qname , Attributes attrs ) throws SAXParseException { } public void setDocumentLocator ( Locator locator ) { } public void endElement ( String uri , String name , String qName ) throws SAXException { } public void characters ( char [ ] buf , int start , int count ) throws SAXParseException { } } public static class MainHandler extends ProjectHelper2 . AntHandler { public ProjectHelper2 . AntHandler onStartChild ( String uri , String name , String qname , Attributes attrs , ProjectHelper2 . AntXmlContext context ) throws SAXParseException { } } public static class ProjectHandler extends ProjectHelper2 . AntHandler { public void onStartElement ( String uri , String tag , String qname , Attributes attrs , ProjectHelper2 . AntXmlContext context ) throws SAXParseException { String id = null ; String baseDir = null ; Project project = context . getProject ( ) ; for ( int i = 0 ; i < ( attrs . getLength ( ) ) ; i ++ ) { String key = attrs . getQName ( i ) ; String value = attrs . getValue ( i ) ; if ( key . equals ( "default" ) ) { if ( ( value != null ) && ( ! ( value . equals ( "" ) ) ) ) { if ( ! ( context . ignoreProjectTag ) ) project . setDefaultTarget ( value ) ; } } else if ( key . equals ( "name" ) ) { if ( value != null ) { context . currentProjectName = value ; if ( ! ( context . ignoreProjectTag ) ) { project . setName ( value ) ; project . addReference ( value , project ) ; } } } else if ( key . equals ( "id" ) ) { if ( value != null ) { if ( ! ( context . ignoreProjectTag ) ) { project . addReference ( value , project ) ; } } } else if ( key . equals ( "basedir" ) ) { if ( ! ( context . ignoreProjectTag ) ) baseDir = value ; } else { throw new SAXParseException ( ( ( "Unexpected<seq2seq4repair_space>attribute<seq2seq4repair_space>\"" + ( attrs . getQName ( i ) ) ) + "\"" ) , context . locator ) ; } } String antFileProp = "ant.file." + ( context . currentProjectName ) ; String dup = project . getProperty ( antFileProp ) ; <START_BUG> if ( dup != null ) { <END_BUG> project . log ( ( ( ( ( ( "Duplicated<seq2seq4repair_space>project<seq2seq4repair_space>name<seq2seq4repair_space>in<seq2seq4repair_space>import.<seq2seq4repair_space>Project<seq2seq4repair_space>" + ( context . currentProjectName ) ) + "<seq2seq4repair_space>defined<seq2seq4repair_space>first<seq2seq4repair_space>in<seq2seq4repair_space>" ) + dup ) + "<seq2seq4repair_space>and<seq2seq4repair_space>again<seq2seq4repair_space>in<seq2seq4repair_space>" ) + ( context . buildFile ) ) , MSG_WARN ) ; } if ( ( context . buildFile ) != null ) { project . setUserProperty ( ( "ant.file." + ( context . currentProjectName ) ) , context . buildFile . toString ( ) ) ; } if ( context . ignoreProjectTag ) { return ; } if ( ( project . getProperty ( "basedir" ) ) != null ) { project . setBasedir ( project . getProperty ( "basedir" ) ) ; } else { if ( baseDir == null ) { project . setBasedir ( context . buildFileParent . getAbsolutePath ( ) ) ; } else { if ( new File ( baseDir ) . isAbsolute ( ) ) { project . setBasedir ( baseDir ) ; } else { project . setBaseDir ( project . resolveFile ( baseDir , context . buildFileParent ) ) ; } } } project . addTarget ( "" , context . implicitTarget ) ; context . currentTarget = context . implicitTarget ; } public ProjectHelper2 . AntHandler onStartChild ( String uri , String name , String qname , Attributes attrs , ProjectHelper2 . AntXmlContext context ) throws SAXParseException { } } public static class TargetHandler extends ProjectHelper2 . AntHandler { public void onStartElement ( String uri , String tag , String qname , Attributes attrs , ProjectHelper2 . AntXmlContext context ) throws SAXParseException { String name = null ; String depends = "" ; Project project = context . getProject ( ) ; Target target = new Target ( ) ; context . currentTarget = target ; context . targetVector . addElement ( target ) ; for ( int i = 0 ; i < ( attrs . getLength ( ) ) ; i ++ ) { String key = attrs . getQName ( i ) ; String value = attrs . getValue ( i ) ; if ( key . equals ( "name" ) ) { name = value ;

Fix:
if ( ( dup != null ) && ( ! ( dup . equals ( context . buildFile ) ) ) ) {