Buggy code:
public class XSLTProcess extends MatchingTask implements XSLTLogger { private File destDir = null ; private File baseDir = null ; private String xslFile = 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 FileUtils fileUtils ; 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 XSLP_LIAISON_CLASS = "org.apache.tools.ant.taskdefs.optional.XslpLiaison" ; private static final String XALAN_LIAISON_CLASS = "org.apache.tools.ant.taskdefs.optional.XalanLiaison" ; private boolean performDirectoryScan = true ; private XSLTProcess . Factory factory = null ; private boolean reuseLoadedStylesheet = true ; public XSLTProcess ( ) { } public void setScanIncludedDirectories ( boolean b ) { } public void setReuseLoadedStylesheet ( boolean b ) { } public void execute ( ) throws BuildException { } 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 addConfiguredXMLCatalog ( XMLCatalog xmlCatalog ) { } private void resolveProcessor ( String proc ) throws Exception { } private Class loadClass ( String classname ) throws Exception { if ( ( classpath ) == null ) { return Class . forName ( classname ) ; } else { <START_BUG> AntClassLoader al = new AntClassLoader ( getProject ( ) , classpath ) ; <END_BUG> Class c = al . loadClass ( classname ) ; AntClassLoader . initializeClass ( c ) ; return c ; } } public void setOut ( File outFile ) { } public void setIn ( File inFile ) { } private void process ( File baseDir , String xmlFile , File destDir , File stylesheet ) throws BuildException { } private void process ( File inFile , File outFile , File stylesheet ) throws BuildException { } private void ensureDirectoryFor ( File targetFile ) throws BuildException { } protected XSLTLiaison getLiaison ( ) { } public XSLTProcess . Param createParam ( ) { } public static class Param { private String name = null ; private String expression = null ; public void setName ( String name ) { } public void setExpression ( String expression ) { } public String getName ( ) throws BuildException { } public String getExpression ( ) throws BuildException { } } public XSLTProcess . OutputProperty createOutputProperty ( ) { } public static class OutputProperty { private String name ; private String value ; public String getName ( ) { } public void setName ( String name ) { } public String getValue ( ) { } public void setValue ( String value ) { } } public void init ( ) throws BuildException { } protected void configureLiaison ( File stylesheet ) throws BuildException { } protected void configureTraXLiaison ( TraXLiaison liaison ) { } public XSLTProcess . Factory createFactory ( ) throws BuildException { } public static class Factory { private String name ; private Vector attributes = new Vector ( ) ; public String getName ( ) { } public void setName ( String name ) { } public void addAttribute ( XSLTProcess . Factory . Attribute attr ) { } public Enumeration getAttributes ( ) { } public static class Attribute implements DynamicConfigurator { private String name ; private Object value ; public String getName ( ) { } public Object getValue ( ) { } public Object createDynamicElement ( String name ) throws BuildException { } public void setDynamicAttribute ( String name , String value ) throws BuildException { } } } }

Fix:
AntClassLoader al = getProject ( ) . createClassLoader ( classpath ) ;