Buggy code:
public class ComponentHelper { private ComponentHelper . AntTypeTable antTypeTable ; private Hashtable taskClassDefinitions = new Hashtable ( ) ; private boolean rebuildTaskClassDefinitions = true ; private Hashtable typeClassDefinitions = new Hashtable ( ) ; private boolean rebuildTypeClassDefinitions = true ; private Set checkedNamespaces = new HashSet ( ) ; private Stack antLibStack = new Stack ( ) ; private String antLibCurrentUri = null ; private ComponentHelper next ; private Project project ; private static final String ERROR_NO_TASK_LIST_LOAD = "Can't<seq2seq4repair_space>load<seq2seq4repair_space>default<seq2seq4repair_space>task<seq2seq4repair_space>list" ; private static final String ERROR_NO_TYPE_LIST_LOAD = "Can't<seq2seq4repair_space>load<seq2seq4repair_space>default<seq2seq4repair_space>type<seq2seq4repair_space>list" ; public static final String COMPONENT_HELPER_REFERENCE = "ant.ComponentHelper" ; private static final String BUILD_SYSCLASSPATH_ONLY = "only" ; private static final String ANT_PROPERTY_TASK = "property" ; private static Properties [ ] defaultDefinitions = new Properties [ 2 ] ; public static ComponentHelper getComponentHelper ( Project project ) { } protected ComponentHelper ( ) { } public void setNext ( ComponentHelper next ) { } public ComponentHelper getNext ( ) { } public void setProject ( Project project ) { } public void initSubProject ( ComponentHelper helper ) { } public Object createComponent ( UnknownElement ue , String ns , String componentType ) throws BuildException { } public Object createComponent ( String componentName ) { } public Class getComponentClass ( String componentName ) { } public AntTypeDefinition getDefinition ( String componentName ) { } public void initDefaultDefinitions ( ) { } public void addTaskDefinition ( String taskName , Class taskClass ) { } public void checkTaskClass ( final Class taskClass ) throws BuildException { } public Hashtable getTaskDefinitions ( ) { } public Hashtable getDataTypeDefinitions ( ) { } public void addDataTypeDefinition ( String typeName , Class typeClass ) { } public void addDataTypeDefinition ( AntTypeDefinition def ) { } public Hashtable getAntTypeTable ( ) { } public Task createTask ( String taskType ) throws BuildException { } private Task createNewTask ( String taskType ) throws BuildException { } public Object createDataType ( String typeName ) throws BuildException { } public String getElementName ( Object element ) { } public String getElementName ( Object o , boolean brief ) { } public static String getElementName ( Project p , Object o , boolean brief ) { } private static String getUnmappedElementName ( Class c , boolean brief ) { } private boolean validDefinition ( AntTypeDefinition def ) { } private boolean sameDefinition ( AntTypeDefinition def , AntTypeDefinition old ) { } private void updateDataTypeDefinition ( AntTypeDefinition def ) { } public void enterAntLib ( String uri ) { } public String getCurrentAntlibUri ( ) { } public void exitAntLib ( ) { } private void initTasks ( ) { } private ClassLoader getClassLoader ( ClassLoader classLoader ) { } private static synchronized Properties getDefaultDefinitions ( boolean type ) throws BuildException { } private void initTypes ( ) { } private synchronized void checkNamespace ( String componentName ) { } public String diagnoseCreationFailure ( String componentName , String type ) { } private void printUnknownDefinition ( PrintWriter out , String componentName , String dirListing ) { } private void printClassNotFound ( PrintWriter out , String classname , boolean optional , String dirListing ) { } private void printNotLoadDependentClass ( PrintWriter out , boolean optional , NoClassDefFoundError ncdfe , String dirListing ) { } private static class AntTypeTable extends Hashtable { private Project project ; AntTypeTable ( Project project ) { } AntTypeDefinition getDefinition ( String key ) { } public Object get ( Object key ) { } Object create ( String name ) { } Class getTypeClass ( String name ) { } Class getExposedClass ( String name ) { } public boolean contains ( Object clazz ) { boolean found = false ; if ( clazz instanceof Class ) { for ( Iterator i = values ( ) . iterator ( ) ; ( i . hasNext ( ) ) && ( ! found ) ; ) { <START_BUG> found |= ( ( ( AntTypeDefinition ) ( i . next ( ) ) ) . getExposedClass ( project ) ) == clazz ; <END_BUG> } } return found ; } public boolean containsValue ( Object value ) { } public List findMatches ( String prefix ) { } } }

Fix:
found = ( ( ( AntTypeDefinition ) ( i . next ( ) ) ) . getExposedClass ( project ) ) == clazz ;