Buggy code:
public class JonasDeploymentTool extends GenericDeploymentTool { protected static final String EJB_JAR_1_1_PUBLIC_ID = "-////Sun<seq2seq4repair_space>Microsystems,<seq2seq4repair_space>Inc.////DTD<seq2seq4repair_space>Enterprise<seq2seq4repair_space>JavaBeans<seq2seq4repair_space>1.1////EN" ; protected static final String EJB_JAR_2_0_PUBLIC_ID = "-////Sun<seq2seq4repair_space>Microsystems,<seq2seq4repair_space>Inc.////DTD<seq2seq4repair_space>Enterprise<seq2seq4repair_space>JavaBeans<seq2seq4repair_space>2.0////EN" ; protected static final String JONAS_EJB_JAR_2_4_PUBLIC_ID = "-////ObjectWeb////DTD<seq2seq4repair_space>JOnAS<seq2seq4repair_space>2.4////EN" ; protected static final String JONAS_EJB_JAR_2_5_PUBLIC_ID = "-////ObjectWeb////DTD<seq2seq4repair_space>JOnAS<seq2seq4repair_space>2.5////EN" ; protected static final String RMI_ORB = "RMI" ; protected static final String JEREMIE_ORB = "JEREMIE" ; protected static final String DAVID_ORB = "DAVID" ; protected static final String EJB_JAR_1_1_DTD = "ejb-jar_1_1.dtd" ; protected static final String EJB_JAR_2_0_DTD = "ejb-jar_2_0.dtd" ; protected static final String JONAS_EJB_JAR_2_4_DTD = "jonas-ejb-jar_2_4.dtd" ; protected static final String JONAS_EJB_JAR_2_5_DTD = "jonas-ejb-jar_2_5.dtd" ; protected static final String JONAS_DD = "jonas-ejb-jar.xml" ; protected static final String GENIC_CLASS = "org.objectweb.jonas_ejb.genic.GenIC" ; protected static final String OLD_GENIC_CLASS_1 = "org.objectweb.jonas_ejb.tools.GenWholeIC" ; protected static final String OLD_GENIC_CLASS_2 = "org.objectweb.jonas_ejb.tools.GenIC" ; private String descriptorName ; private String jonasDescriptorName ; private File outputdir ; private boolean keepgenerated = false ; private boolean nocompil = false ; private boolean novalidation = false ; private String javac ; private String javacopts ; private String rmicopts ; private boolean secpropag = false ; private boolean verbose = false ; private String additionalargs ; private File jonasroot ; private boolean keepgeneric = false ; private String suffix = ".jar" ; private String orb ; private boolean nogenic = false ; public void setKeepgenerated ( boolean aBoolean ) { } public void setAdditionalargs ( String aString ) { } public void setNocompil ( boolean aBoolean ) { } public void setNovalidation ( boolean aBoolean ) { } public void setJavac ( String aString ) { } public void setJavacopts ( String aString ) { } public void setRmicopts ( String aString ) { } public void setSecpropag ( boolean aBoolean ) { } public void setVerbose ( boolean aBoolean ) { } public void setJonasroot ( File aFile ) { } public void setKeepgeneric ( boolean aBoolean ) { } public void setJarsuffix ( String aString ) { } public void setOrb ( String aString ) { } public void setNogenic ( boolean aBoolean ) { } public void processDescriptor ( String aDescriptorName , SAXParser saxParser ) { } protected void writeJar ( String baseName , File jarfile , Hashtable ejbFiles , String publicId ) throws BuildException { } protected void addVendorFiles ( Hashtable ejbFiles , String ddPrefix ) { } protected File getVendorOutputJarFile ( String baseName ) { } private String getJonasDescriptorName ( ) { } protected String getJarBaseName ( String descriptorFileName ) { } protected void registerKnownDTDs ( DescriptorHandler handler ) { } private void addGenICGeneratedFiles ( File genericJarFile , Hashtable ejbFiles ) { } String getGenicClassName ( Path classpath ) { log ( ( "Looking<seq2seq4repair_space>for<seq2seq4repair_space>GenIC<seq2seq4repair_space>class<seq2seq4repair_space>in<seq2seq4repair_space>classpath:<seq2seq4repair_space>" + ( classpath . toString ( ) ) ) , MSG_VERBOSE ) ; <START_BUG> AntClassLoader cl = new AntClassLoader ( classpath . getProject ( ) , classpath ) ; <END_BUG> try { cl . loadClass ( JonasDeploymentTool . GENIC_CLASS ) ; log ( ( ( "Found<seq2seq4repair_space>GenIC<seq2seq4repair_space>class<seq2seq4repair_space>'" + ( JonasDeploymentTool . GENIC_CLASS ) ) + "'<seq2seq4repair_space>in<seq2seq4repair_space>classpath." ) , MSG_VERBOSE ) ; return JonasDeploymentTool . GENIC_CLASS ; } catch ( ClassNotFoundException cnf1 ) { log ( ( ( "GenIC<seq2seq4repair_space>class<seq2seq4repair_space>'" + ( JonasDeploymentTool . GENIC_CLASS ) ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>classpath." ) , MSG_VERBOSE ) ; } try { cl . loadClass ( JonasDeploymentTool . OLD_GENIC_CLASS_1 ) ; log ( ( ( "Found<seq2seq4repair_space>GenIC<seq2seq4repair_space>class<seq2seq4repair_space>'" + ( JonasDeploymentTool . OLD_GENIC_CLASS_1 ) ) + "'<seq2seq4repair_space>in<seq2seq4repair_space>classpath." ) , MSG_VERBOSE ) ; return JonasDeploymentTool . OLD_GENIC_CLASS_1 ; } catch ( ClassNotFoundException cnf2 ) { log ( ( ( "GenIC<seq2seq4repair_space>class<seq2seq4repair_space>'" + ( JonasDeploymentTool . OLD_GENIC_CLASS_1 ) ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>classpath." ) , MSG_VERBOSE ) ; } try { cl . loadClass ( JonasDeploymentTool . OLD_GENIC_CLASS_2 ) ; log ( ( ( "Found<seq2seq4repair_space>GenIC<seq2seq4repair_space>class<seq2seq4repair_space>'" + ( JonasDeploymentTool . OLD_GENIC_CLASS_2 ) ) + "'<seq2seq4repair_space>in<seq2seq4repair_space>classpath." ) , MSG_VERBOSE ) ; return JonasDeploymentTool . OLD_GENIC_CLASS_2 ; } catch ( ClassNotFoundException cnf3 ) { log ( ( ( "GenIC<seq2seq4repair_space>class<seq2seq4repair_space>'" + ( JonasDeploymentTool . OLD_GENIC_CLASS_2 ) ) + "'<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>classpath." ) , MSG_VERBOSE ) ; } return null ; } protected void checkConfiguration ( String descriptorFileName , SAXParser saxParser ) throws BuildException { } private File createTempDir ( ) throws IOException { } private void deleteAllFiles ( File aFile ) { } private void addAllFiles ( File file , String rootDir , Hashtable hashtable ) { } }

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