Buggy code:
private int traverseAny ( Element child ) throws Exception { } public DatatypeValidator getDatatypeValidator ( String uri , String localpart ) { } private XMLAttributeDecl traverseAnyAttribute ( Element anyAttributeDecl ) throws Exception { } private XMLAttributeDecl AWildCardIntersection ( XMLAttributeDecl oneAny , XMLAttributeDecl anotherAny ) { } private XMLAttributeDecl AWildCardUnion ( XMLAttributeDecl oneAny , XMLAttributeDecl anotherAny ) { } private boolean AWildCardSubset ( XMLAttributeDecl subAny , XMLAttributeDecl superAny ) { } private boolean AWildCardAllowsNameSpace ( XMLAttributeDecl wildcard , String uri ) { } private boolean isAWildCard ( XMLAttributeDecl a ) { } int [ ] intersect2sets ( int [ ] one , int [ ] theOther ) { } int [ ] union2sets ( int [ ] one , int [ ] theOther ) { } boolean subset2sets ( int [ ] subSet , int [ ] superSet ) { } boolean elementInSet ( int ele , int [ ] set ) { } private int traverseComplexTypeDecl ( Element complexTypeDecl ) throws Exception { } private int traverseComplexTypeDecl ( Element complexTypeDecl , boolean forwardRef ) throws Exception { } private void traverseSimpleContentDecl ( int typeNameIndex , Element simpleContentDecl , TraverseSchema . ComplexTypeInfo typeInfo ) throws Exception { } private void traverseComplexContentDecl ( int typeNameIndex , Element complexContentDecl , TraverseSchema . ComplexTypeInfo typeInfo , boolean mixedOnComplexTypeDecl ) throws Exception { } private void handleComplexTypeError ( String message , int typeNameIndex , TraverseSchema . ComplexTypeInfo typeInfo ) throws Exception { } private String genAnonTypeName ( Element complexTypeDecl ) throws Exception { } private QName parseBase ( String base ) throws Exception { } private boolean baseFromAnotherSchema ( QName baseName ) throws Exception { } private void processBaseTypeInfo ( QName baseName , TraverseSchema . ComplexTypeInfo typeInfo ) throws Exception { } private void processComplexContent ( int typeNameIndex , Element complexContentChild , TraverseSchema . ComplexTypeInfo typeInfo , QName baseName , boolean isMixed ) throws Exception { } private void processAttributes ( Element attrNode , QName baseName , TraverseSchema . ComplexTypeInfo typeInfo ) throws Exception { } private void checkAttributesDerivationOKRestriction ( int dAttListHead , SchemaGrammar dGrammar , XMLAttributeDecl dAttWildCard , int bAttListHead , SchemaGrammar bGrammar , XMLAttributeDecl bAttWildCard ) throws TraverseSchema . ComplexTypeRecoverableError { } private boolean isAttrOrAttrGroup ( Element e ) { } private void checkRecursingComplexType ( ) throws Exception { if ( fCurrentTypeNameStack . empty ( ) ) { if ( ! ( fElementRecurseComplex . isEmpty ( ) ) ) { int count = fElementRecurseComplex . size ( ) ; for ( int i = 0 ; i < count ; i ++ ) { TraverseSchema . ElementInfo eobj = ( ( TraverseSchema . ElementInfo ) ( fElementRecurseComplex . elementAt ( i ) ) ) ; int elementIndex = eobj . elementIndex ; String typeName = eobj . typeName ; TraverseSchema . ComplexTypeInfo typeInfo = ( ( TraverseSchema . ComplexTypeInfo ) ( fComplexTypeRegistry . get ( ( ( ( fTargetNSURIString ) + "," ) + typeName ) ) ) ) ; if ( typeInfo == null ) { throw new Exception ( "Internal<seq2seq4repair_space>Error<seq2seq4repair_space>in<seq2seq4repair_space>void<seq2seq4repair_space>checkRecursingComplexType().<seq2seq4repair_space>" ) ; } else { fSchemaGrammar . getElementDecl ( elementIndex , fTempElementDecl ) ; fTempElementDecl . type = typeInfo . contentType ; fTempElementDecl . contentSpecIndex = typeInfo . contentSpecHandle ; fTempElementDecl . datatypeValidator = typeInfo . datatypeValidator ; fSchemaGrammar . setElementDecl ( elementIndex , fTempElementDecl ) ; fSchemaGrammar . setFirstAttributeDeclIndex ( elementIndex , typeInfo . attlistHead ) ; fSchemaGrammar . setElementComplexTypeInfo ( elementIndex , typeInfo ) ; } } <START_BUG> fElementRecurseComplex . clear ( ) ; <END_BUG> } } } private void checkParticleDerivationOK ( int derivedContentSpecIndex , int derivedScope , int baseContentSpecIndex , int baseScope , TraverseSchema . ComplexTypeInfo bInfo ) throws Exception { } private int checkForPointlessOccurrences ( int csIndex , Vector tempVector ) { } private void gatherChildren ( int parentType , int csIndex , Vector tempVector ) { } private void checkNameAndTypeOK ( int csIndex1 , int derivedScope , int csIndex2 , int baseScope , TraverseSchema . ComplexTypeInfo bInfo ) throws Exception { } private void checkTypesOK ( XMLElementDecl derived , XMLElementDecl base , int dndx , int bndx , SchemaGrammar aGrammar , String elementName ) throws Exception { } private void checkIDConstraintRestriction ( XMLElementDecl derivedElemDecl , XMLElementDecl baseElemDecl , SchemaGrammar grammar , int derivedElemName , int baseElemName ) throws Exception { } private boolean checkSubstitutionGroups ( int local1 , int uri1 , int local2 , int uri2 ) throws Exception { } private boolean checkOccurrenceRange ( int min1 , int max1 , int min2 , int max2 ) { } private int findElement ( int scope , int nameIndex , SchemaGrammar gr , TraverseSchema . ComplexTypeInfo bInfo ) { } private void checkNSCompat ( int csIndex1 , int derivedScope , int csIndex2 ) throws Exception { } private boolean wildcardEltAllowsNamespace ( int wildcardNode , int uriIndex ) { } private void checkNSSubset ( int csIndex1 , int csIndex2 ) throws Exception { } private boolean wildcardEltSubset ( int wildcardNode , int wildcardBaseNode ) { } private void checkRecurseAsIfGroup ( int csIndex1 , int derivedScope , int csIndex2 , Vector tempVector2 , int baseScope , TraverseSchema . ComplexTypeInfo bInfo ) throws Exception { } private void checkNSRecurseCheckCardinality ( int csIndex1 , Vector tempVector1 , int derivedScope , int csIndex2 ) throws Exception { } private void checkRecurse ( int csIndex1 , Vector tempVector1 , int derivedScope , int csIndex2 , Vector tempVector2 , int baseScope , TraverseSchema . ComplexTypeInfo bInfo ) throws Exception { } private void checkRecurseUnordered ( int csIndex1 , Vector tempVector1 , int derivedScope , int csIndex2 , Vector tempVector2 , int baseScope , TraverseSchema . ComplexTypeInfo bInfo ) throws Exception { } private void checkRecurseLax ( int csIndex1 , Vector tempVector1 , int derivedScope , int csIndex2 , Vector tempVector2 , int baseScope , TraverseSchema . ComplexTypeInfo bInfo ) throws Exception { } private void checkMapAndSum ( int csIndex1 , Vector tempVector1 , int derivedScope , int csIndex2 , Vector tempVector2 , int baseScope , TraverseSchema . ComplexTypeInfo bInfo ) throws Exception { }

Fix:
fElementRecurseComplex . removeAllElements ( ) ;