Buggy code:
public class ProjectHelper { private static SAXParserFactory parserFactory = null ; private Parser parser ; private Project project ; private File buildFile ; private File buildFileParent ; private Locator locator ; public static void configureProject ( Project project , File buildFile ) throws BuildException { } private ProjectHelper ( Project project , File buildFile ) { } private void parse ( ) throws BuildException { } private class AbstractHandler extends HandlerBase { protected DocumentHandler parentHandler ; public AbstractHandler ( DocumentHandler parentHandler ) { } public void startElement ( String tag , AttributeList attrs ) throws SAXParseException { } public void characters ( char [ ] buf , int start , int end ) throws SAXParseException { } protected void finished ( ) { } public void endElement ( String name ) throws SAXException { } } private class RootHandler extends HandlerBase { public InputSource resolveEntity ( String publicId , String systemId ) { } public void startElement ( String tag , AttributeList attrs ) throws SAXParseException { } public void setDocumentLocator ( Locator locator ) { } } private class ProjectHandler extends ProjectHelper . AbstractHandler { public ProjectHandler ( DocumentHandler parentHandler ) { } public void init ( String tag , AttributeList attrs ) throws SAXParseException { String def = null ; String name = null ; String id = null ; String baseDir = null ; for ( int i = 0 ; i < ( attrs . getLength ( ) ) ; i ++ ) { String key = attrs . getName ( i ) ; String value = attrs . getValue ( i ) ; if ( key . equals ( "default" ) ) { def = value ; } else if ( key . equals ( "name" ) ) { name = value ; } else if ( key . equals ( "id" ) ) { id = value ; } else if ( key . equals ( "basedir" ) ) { baseDir = value ; } else { throw new SAXParseException ( ( ( "Unexpected<seq2seq4repair_space>attribute<seq2seq4repair_space>\"" + ( attrs . getName ( i ) ) ) + "\"" ) , locator ) ; } } if ( def == null ) { throw new SAXParseException ( "The<seq2seq4repair_space>default<seq2seq4repair_space>attribute<seq2seq4repair_space>of<seq2seq4repair_space>project<seq2seq4repair_space>is<seq2seq4repair_space>required" , locator ) ; } project . setDefaultTarget ( def ) ; if ( name != null ) { project . setName ( name ) ; project . addReference ( name , project ) ; } if ( id != null ) project . addReference ( id , project ) ; if ( ( project . getProperty ( "basedir" ) ) != null ) { project . setBasedir ( project . getProperty ( "basedir" ) ) ; } else { if ( baseDir == null ) { project . setBasedir ( buildFileParent . getAbsolutePath ( ) ) ; } else { if ( new File ( baseDir ) . isAbsolute ( ) ) { project . setBasedir ( baseDir ) ; } else { <START_BUG> project . setBasedir ( new File ( buildFileParent , baseDir ) . getAbsolutePath ( ) ) ; <END_BUG> } } } } public void startElement ( String name , AttributeList attrs ) throws SAXParseException { } private void handleTaskdef ( String name , AttributeList attrs ) throws SAXParseException { } private void handleProperty ( String name , AttributeList attrs ) throws SAXParseException { } private void handleTarget ( String tag , AttributeList attrs ) throws SAXParseException { } private void handleDataType ( String name , AttributeList attrs ) throws SAXParseException { } } private class TargetHandler extends ProjectHelper . AbstractHandler { private Target target ; public TargetHandler ( DocumentHandler parentHandler ) { } public void init ( String tag , AttributeList attrs ) throws SAXParseException { String name = null ; String depends = "" ; String ifCond = null ; String unlessCond = null ; String id = null ; String description = null ; for ( int i = 0 ; i < ( attrs . getLength ( ) ) ; i ++ ) { String key = attrs . getName ( i ) ; String value = attrs . getValue ( i ) ; if ( key . equals ( "name" ) ) { name = value ; } else if ( key . equals ( "depends" ) ) { depends = value ; } else if ( key . equals ( "if" ) ) { ifCond = value ; } else if ( key . equals ( "unless" ) ) { unlessCond = value ; } else if ( key . equals ( "id" ) ) { id = value ; } else if ( key . equals ( "description" ) ) { description = value ; } else { throw new SAXParseException ( ( ( "Unexpected<seq2seq4repair_space>attribute<seq2seq4repair_space>\"" + key ) + "\"" ) , locator ) ; } } if ( name == null ) { throw new SAXParseException ( "target<seq2seq4repair_space>element<seq2seq4repair_space>appears<seq2seq4repair_space>without<seq2seq4repair_space>a<seq2seq4repair_space>name<seq2seq4repair_space>attribute" , locator ) ; } target = new Target ( ) ; target . setName ( name ) ; target . setIf ( ifCond ) ; target . setUnless ( unlessCond ) ; target . setDescription ( description ) ; project . addTarget ( name , target ) ; if ( ( id != null ) && ( ! ( id . equals ( "" ) ) ) ) project . addReference ( id , target ) ; if ( ( depends . length ( ) ) > 0 ) { StringTokenizer tok = new StringTokenizer ( depends , "," , false ) ; while ( tok . hasMoreTokens ( ) ) { target . addDependency ( tok . nextToken ( ) . trim ( ) ) ; } } } public void startElement ( String name , AttributeList attrs ) throws SAXParseException { } } private class TaskHandler extends ProjectHelper . AbstractHandler { private Target target ; private Task task ; private RuntimeConfigurable wrapper = null ; public TaskHandler ( DocumentHandler parentHandler , Target target ) { }

Fix:
project . setBaseDir ( project . resolveFile ( baseDir , buildFileParent ) ) ;