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 Hashtable createdTasks = new Hashtable ( ) ; private ComponentHelper next ; private Project project ; 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 { } private void addCreatedTask ( String type , Task task ) { } private void invalidateCreatedTasks ( String type ) { } public Object createDataType ( String typeName ) throws BuildException { } public String getElementName ( Object element ) { } private boolean validDefinition ( AntTypeDefinition def ) { } private boolean sameDefinition ( AntTypeDefinition def , AntTypeDefinition old ) { boolean defValid = validDefinition ( def ) ; <START_BUG> boolean sameValidity = ! ( defValid | ( validDefinition ( old ) ) ) ; <END_BUG> return sameValidity && ( ( ! defValid ) || ( def . sameDefinition ( old , project ) ) ) ; } private void updateDataTypeDefinition ( AntTypeDefinition def ) { } public void enterAntLib ( String uri ) { } public String getCurrentAntlibUri ( ) { } public void exitAntLib ( ) { } private void initTasks ( ) { } private void initTypes ( ) { } private synchronized void checkNamespace ( String componentName ) { } private static class AntTypeTable extends Hashtable { private Project project ; public AntTypeTable ( Project project ) { } public AntTypeDefinition getDefinition ( String key ) { } public Object get ( Object key ) { } public Object create ( String name ) { } public Class getTypeClass ( String name ) { } public Class getExposedClass ( String name ) { } public boolean contains ( Object clazz ) { } public boolean containsValue ( Object value ) { } } }

Fix:
boolean sameValidity = ! ( defValid ^ ( validDefinition ( old ) ) ) ;