Buggy code:
public class XSLTProcess extends MatchingTask implements XSLTLogger { private File destDir = null ; private File baseDir = null ; private String xslFile = null ; private Resource xslResource = null ; private String targetExtension = ".html" ; private Vector params = new Vector ( ) ; private File inFile = null ; private File outFile = null ; private String processor ; private Path classpath = null ; private XSLTLiaison liaison ; private boolean stylesheetLoaded = false ; private boolean force = false ; private Vector outputProperties = new Vector ( ) ; private XMLCatalog xmlCatalog = new XMLCatalog ( ) ; private static final String TRAX_LIAISON_CLASS = "org.apache.tools.ant.taskdefs.optional.TraXLiaison" ; private static final String XALAN_LIAISON_CLASS = "org.apache.tools.ant.taskdefs.optional.XalanLiaison" ; private static final FileUtils FILE_UTILS = FileUtils . getFileUtils ( ) ; private boolean performDirectoryScan = true ; private XSLTProcess . Factory factory = null ; private boolean reuseLoadedStylesheet = true ; private AntClassLoader loader = null ; private Mapper mapperElement = null ; private Union resources = new Union ( ) ; private boolean useImplicitFileset = true ; public static final String PROCESSOR_TRAX = "trax" ; public static final String PROCESSOR_XALAN1 = "xalan" ; public XSLTProcess ( ) { } public void setScanIncludedDirectories ( boolean b ) { } public void setReloadStylesheet ( boolean b ) { } public void addMapper ( Mapper mapper ) { } public void add ( ResourceCollection rc ) { } public void addConfigured ( Resource xslResource ) { } public void add ( FileNameMapper fileNameMapper ) throws BuildException { } public void execute ( ) throws BuildException { if ( "style" . equals ( getTaskType ( ) ) ) { log ( "Warning:<seq2seq4repair_space>the<seq2seq4repair_space>task<seq2seq4repair_space>name<seq2seq4repair_space><style><seq2seq4repair_space>is<seq2seq4repair_space>deprecated.<seq2seq4repair_space>Use<seq2seq4repair_space><xslt><seq2seq4repair_space>instead." , MSG_WARN ) ; } File savedBaseDir = baseDir ; DirectoryScanner scanner ; String [ ] list ; String [ ] dirs ; if ( ( ( xslResource ) == null ) && ( ( xslFile ) == null ) ) { throw new BuildException ( ( "specify<seq2seq4repair_space>the<seq2seq4repair_space>" + ( "stylesheet<seq2seq4repair_space>either<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>filename<seq2seq4repair_space>in<seq2seq4repair_space>style<seq2seq4repair_space>" + "attribute<seq2seq4repair_space>or<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>nested<seq2seq4repair_space>resource" ) ) , getLocation ( ) ) ; } if ( ( ( xslResource ) != null ) && ( ( xslFile ) != null ) ) { throw new BuildException ( ( "specify<seq2seq4repair_space>the<seq2seq4repair_space>" + ( ( "stylesheet<seq2seq4repair_space>either<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>filename<seq2seq4repair_space>in<seq2seq4repair_space>style<seq2seq4repair_space>" + "attribute<seq2seq4repair_space>or<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>nested<seq2seq4repair_space>resource<seq2seq4repair_space>but<seq2seq4repair_space>not<seq2seq4repair_space>" ) + "as<seq2seq4repair_space>both" ) ) , getLocation ( ) ) ; } if ( ( ( inFile ) != null ) && ( ! ( inFile . exists ( ) ) ) ) { throw new BuildException ( ( ( "input<seq2seq4repair_space>file<seq2seq4repair_space>" + ( inFile . toString ( ) ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" ) , getLocation ( ) ) ; } try { if ( ( baseDir ) == null ) { <START_BUG> baseDir = getProject ( ) . resolveFile ( "." ) ; <END_BUG> } liaison = getLiaison ( ) ; if ( ( liaison ) instanceof XSLTLoggerAware ) { ( ( XSLTLoggerAware ) ( liaison ) ) . setLogger ( this ) ; } log ( ( "Using<seq2seq4repair_space>" + ( liaison . getClass ( ) . toString ( ) ) ) , MSG_VERBOSE ) ; if ( ( xslFile ) != null ) { File stylesheet = XSLTProcess . FILE_UTILS . resolveFile ( getProject ( ) . getBaseDir ( ) , xslFile ) ; if ( ! ( stylesheet . exists ( ) ) ) { stylesheet = XSLTProcess . FILE_UTILS . resolveFile ( baseDir , xslFile ) ; if ( stylesheet . exists ( ) ) { log ( ( "DEPRECATED<seq2seq4repair_space>-<seq2seq4repair_space>the<seq2seq4repair_space>'style'<seq2seq4repair_space>attribute<seq2seq4repair_space>should<seq2seq4repair_space>be<seq2seq4repair_space>relative<seq2seq4repair_space>" + "to<seq2seq4repair_space>the<seq2seq4repair_space>project's" ) ) ; log ( "<seq2seq4repair_space>basedir,<seq2seq4repair_space>not<seq2seq4repair_space>the<seq2seq4repair_space>tasks's<seq2seq4repair_space>basedir." ) ; } } FileResource fr = new FileResource ( ) ; fr . setProject ( getProject ( ) ) ; fr . setFile ( stylesheet ) ; xslResource = fr ; } if ( ( ( inFile ) != null ) && ( ( outFile ) != null ) ) { process ( inFile , outFile , xslResource ) ; return ; } checkDest ( ) ; if ( useImplicitFileset ) { scanner = getDirectoryScanner ( baseDir ) ; log ( ( "Transforming<seq2seq4repair_space>into<seq2seq4repair_space>" + ( destDir ) ) , MSG_INFO ) ; list = scanner . getIncludedFiles ( ) ; for ( int i = 0 ; i < ( list . length ) ; ++ i ) { process ( baseDir , list [ i ] , destDir , xslResource ) ; } if ( performDirectoryScan ) { dirs = scanner . getIncludedDirectories ( ) ; for ( int j = 0 ; j < ( dirs . length ) ; ++ j ) { list = new File ( baseDir , dirs [ j ] ) . list ( ) ; for ( int i = 0 ; i < ( list . length ) ; ++ i ) { process ( baseDir , ( ( ( dirs [ j ] ) + ( File . separator ) ) + ( list [ i ] ) ) , destDir , xslResource ) ; } } } } else { if ( ( resources . size ( ) ) == 0 ) { throw new BuildException ( "no<seq2seq4repair_space>resources<seq2seq4repair_space>specified" ) ; } } processResources ( xslResource ) ; } finally { if ( ( loader ) != null ) { loader . resetThreadContextLoader ( ) ; loader . cleanup ( ) ; loader = null ; } liaison = null ; stylesheetLoaded = false ; baseDir = savedBaseDir ; } } public void setForce ( boolean force ) { } public void setBasedir ( File dir ) { } public void setDestdir ( File dir ) { } public void setExtension ( String name ) { } public void setStyle ( String xslFile ) { } public void setClasspath ( Path classpath ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } public void setProcessor ( String processor ) { } public void setUseImplicitFileset ( boolean useimplicitfileset ) { } public void addConfiguredXMLCatalog ( XMLCatalog xmlCatalog ) { }

Fix:
baseDir = XSLTProcess . FILE_UTILS . resolveFile ( getProject ( ) . getBaseDir ( ) , "." ) ;