Buggy code:
public class ProjectHelper2 extends ProjectHelper { private static ProjectHelper2 . AntHandler elementHandler = new ProjectHelper2 . ElementHandler ( ) ; private static ProjectHelper2 . AntHandler targetHandler = new ProjectHelper2 . TargetHandler ( ) ; private static ProjectHelper2 . AntHandler mainHandler = new ProjectHelper2 . MainHandler ( ) ; private static ProjectHelper2 . AntHandler projectHandler = new ProjectHelper2 . ProjectHandler ( ) ; private static FileUtils fu = FileUtils . newFileUtils ( ) ; public UnknownElement parseUnknownElement ( Project project , URL source ) throws BuildException { } public void parse ( Project project , Object source ) throws BuildException { } public void parse ( Project project , Object source , ProjectHelper2 . RootHandler handler ) throws BuildException { AntXMLContext context = handler . context ; File buildFile = null ; URL url = null ; String buildFileName = null ; if ( source instanceof File ) { buildFile = ( ( File ) ( source ) ) ; <START_BUG> buildFile = new File ( buildFile . getAbsolutePath ( ) ) ; <END_BUG> context . setBuildFile ( buildFile ) ; buildFileName = buildFile . toString ( ) ; } else if ( source instanceof URL ) { if ( ( handler . getCurrentAntHandler ( ) ) != ( ProjectHelper2 . elementHandler ) ) { throw new BuildException ( ( ( ( "Source<seq2seq4repair_space>" + ( source . getClass ( ) . getName ( ) ) ) + "<seq2seq4repair_space>not<seq2seq4repair_space>supported<seq2seq4repair_space>by<seq2seq4repair_space>this<seq2seq4repair_space>plugin<seq2seq4repair_space>for<seq2seq4repair_space>" ) + "<seq2seq4repair_space>non<seq2seq4repair_space>task<seq2seq4repair_space>xml" ) ) ; } url = ( ( URL ) ( source ) ) ; buildFileName = url . toString ( ) ; } else { throw new BuildException ( ( ( "Source<seq2seq4repair_space>" + ( source . getClass ( ) . getName ( ) ) ) + "<seq2seq4repair_space>not<seq2seq4repair_space>supported<seq2seq4repair_space>by<seq2seq4repair_space>this<seq2seq4repair_space>plugin" ) ) ; } InputStream inputStream = null ; InputSource inputSource = null ; try { XMLReader parser = JAXPUtils . getNamespaceXMLReader ( ) ; String uri = null ; if ( buildFile != null ) { uri = ProjectHelper2 . fu . toURI ( buildFile . getAbsolutePath ( ) ) ; inputStream = new FileInputStream ( buildFile ) ; } else { inputStream = url . openStream ( ) ; uri = url . toString ( ) ; } inputSource = new InputSource ( inputStream ) ; if ( uri != null ) { inputSource . setSystemId ( uri ) ; } project . log ( ( ( ( "parsing<seq2seq4repair_space>buildfile<seq2seq4repair_space>" + buildFileName ) + "<seq2seq4repair_space>with<seq2seq4repair_space>URI<seq2seq4repair_space>=<seq2seq4repair_space>" ) + uri ) , MSG_VERBOSE ) ; DefaultHandler hb = handler ; parser . setContentHandler ( hb ) ; parser . setEntityResolver ( hb ) ; parser . setErrorHandler ( hb ) ; parser . setDTDHandler ( hb ) ; parser . parse ( inputSource ) ; } catch ( SAXParseException exc ) { Location location = new Location ( exc . getSystemId ( ) , exc . getLineNumber ( ) , exc . getColumnNumber ( ) ) ; Throwable t = exc . getException ( ) ; if ( t instanceof BuildException ) { BuildException be = ( ( BuildException ) ( t ) ) ; if ( ( be . getLocation ( ) ) == ( Location . UNKNOWN_LOCATION ) ) { be . setLocation ( location ) ; } throw be ; } throw new BuildException ( exc . getMessage ( ) , t , location ) ; } catch ( SAXException exc ) { Throwable t = exc . getException ( ) ; if ( t instanceof BuildException ) { throw ( ( BuildException ) ( t ) ) ; } throw new BuildException ( exc . getMessage ( ) , t ) ; } catch ( FileNotFoundException exc ) { throw new BuildException ( exc ) ; } catch ( UnsupportedEncodingException exc ) { throw new BuildException ( ( ( "Encoding<seq2seq4repair_space>of<seq2seq4repair_space>project<seq2seq4repair_space>file<seq2seq4repair_space>" + buildFileName ) + "<seq2seq4repair_space>is<seq2seq4repair_space>invalid." ) , exc ) ; } catch ( IOException exc ) { throw new BuildException ( ( ( ( "Error<seq2seq4repair_space>reading<seq2seq4repair_space>project<seq2seq4repair_space>file<seq2seq4repair_space>" + buildFileName ) + ":<seq2seq4repair_space>" ) + ( exc . getMessage ( ) ) ) , exc ) ; } finally { if ( inputStream != null ) { try { inputStream . close ( ) ; } catch ( IOException ioe ) { } } } } public static class AntHandler { public void onStartElement ( String uri , String tag , String qname , Attributes attrs , AntXMLContext context ) throws SAXParseException { } public ProjectHelper2 . AntHandler onStartChild ( String uri , String tag , String qname , Attributes attrs , AntXMLContext context ) throws SAXParseException { } public void onEndChild ( String uri , String tag , String qname , AntXMLContext context ) throws SAXParseException { } public void onEndElement ( String uri , String tag , AntXMLContext context ) { } public void characters ( char [ ] buf , int start , int count , AntXMLContext context ) throws SAXParseException { } protected void checkNamespace ( String uri ) { } } public static class RootHandler extends DefaultHandler { private Stack antHandlers = new Stack ( ) ; private ProjectHelper2 . AntHandler currentHandler = null ; private AntXMLContext context ; public RootHandler ( AntXMLContext context , ProjectHelper2 . AntHandler rootHandler ) { } public ProjectHelper2 . AntHandler getCurrentAntHandler ( ) { } 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 void startPrefixMapping ( String prefix , String uri ) { } public void endPrefixMapping ( String prefix ) { } }

Fix:
buildFile = ProjectHelper2 . fu . normalize ( buildFile . getAbsolutePath ( ) ) ;