Buggy code:
public class XMLContentSpec { public static final int CONTENTSPECNODE_LEAF = 0 ; public static final int CONTENTSPECNODE_ZERO_OR_ONE = 1 ; public static final int CONTENTSPECNODE_ZERO_OR_MORE = 2 ; public static final int CONTENTSPECNODE_ONE_OR_MORE = 3 ; public static final int CONTENTSPECNODE_CHOICE = 4 ; public static final int CONTENTSPECNODE_SEQ = 5 ; public static final int CONTENTSPECNODE_ANY = 6 ; public static final int CONTENTSPECNODE_ANY_OTHER = 7 ; public static final int CONTENTSPECNODE_ANY_LOCAL = 8 ; public static final int CONTENTSPECNODE_ANY_LAX = 22 ; public static final int CONTENTSPECNODE_ANY_OTHER_LAX = 23 ; public static final int CONTENTSPECNODE_ANY_LOCAL_LAX = 24 ; public static final int CONTENTSPECNODE_ANY_SKIP = 38 ; public static final int CONTENTSPECNODE_ANY_OTHER_SKIP = 39 ; public static final int CONTENTSPECNODE_ANY_LOCAL_SKIP = 40 ; public int type ; public int value ; public int otherValue ; public XMLContentSpec ( ) { } public XMLContentSpec ( int type , int value , int otherValue ) { } public XMLContentSpec ( XMLContentSpec contentSpec ) { } public XMLContentSpec ( XMLContentSpec . Provider provider , int contentSpecIndex ) { } public void clear ( ) { } public void setValues ( int type , int value , int otherValue ) { } public void setValues ( XMLContentSpec contentSpec ) { } public void setValues ( XMLContentSpec . Provider provider , int contentSpecIndex ) { } public static String toString ( XMLContentSpec . Provider provider , StringPool stringPool , int contentSpecIndex ) { } public int hashCode ( ) { } public boolean equals ( Object object ) { } private static void appendContentSpec ( XMLContentSpec . Provider provider , StringPool stringPool , XMLContentSpec contentSpec , StringBuffer str , boolean parens , int parentContentSpecType ) { <START_BUG> int thisContentSpec = contentSpec . type ; <END_BUG> switch ( thisContentSpec ) { case XMLContentSpec . CONTENTSPECNODE_LEAF : { if ( ( ( contentSpec . value ) == ( - 1 ) ) && ( ( contentSpec . otherValue ) == ( - 1 ) ) ) { str . append ( "#PCDATA" ) ; } else if ( ( ( contentSpec . value ) == ( - 1 ) ) && ( ( contentSpec . otherValue ) != ( - 1 ) ) ) { str . append ( ( "##any:uri=" + ( stringPool . toString ( contentSpec . otherValue ) ) ) ) ; } else if ( ( contentSpec . value ) == ( - 1 ) ) { str . append ( "##any" ) ; } else { str . append ( stringPool . toString ( contentSpec . value ) ) ; } break ; } case XMLContentSpec . CONTENTSPECNODE_ZERO_OR_ONE : { if ( ( ( parentContentSpecType == ( XMLContentSpec . CONTENTSPECNODE_ONE_OR_MORE ) ) || ( parentContentSpecType == ( XMLContentSpec . CONTENTSPECNODE_ZERO_OR_MORE ) ) ) || ( parentContentSpecType == ( XMLContentSpec . CONTENTSPECNODE_ZERO_OR_ONE ) ) ) { provider . getContentSpec ( contentSpec . value , contentSpec ) ; str . append ( '(' ) ; XMLContentSpec . appendContentSpec ( provider , stringPool , contentSpec , str , true , thisContentSpec ) ; str . append ( ')' ) ; } else { provider . getContentSpec ( contentSpec . value , contentSpec ) ; XMLContentSpec . appendContentSpec ( provider , stringPool , contentSpec , str , true , thisContentSpec ) ; } str . append ( '?' ) ; break ; } case XMLContentSpec . CONTENTSPECNODE_ZERO_OR_MORE : { if ( ( ( parentContentSpecType == ( XMLContentSpec . CONTENTSPECNODE_ONE_OR_MORE ) ) || ( parentContentSpecType == ( XMLContentSpec . CONTENTSPECNODE_ZERO_OR_MORE ) ) ) || ( parentContentSpecType == ( XMLContentSpec . CONTENTSPECNODE_ZERO_OR_ONE ) ) ) { provider . getContentSpec ( contentSpec . value , contentSpec ) ; str . append ( '(' ) ; XMLContentSpec . appendContentSpec ( provider , stringPool , contentSpec , str , true , thisContentSpec ) ; str . append ( ')' ) ; } else { provider . getContentSpec ( contentSpec . value , contentSpec ) ; XMLContentSpec . appendContentSpec ( provider , stringPool , contentSpec , str , true , thisContentSpec ) ; } str . append ( '*' ) ; break ; } case XMLContentSpec . CONTENTSPECNODE_ONE_OR_MORE : { if ( ( ( parentContentSpecType == ( XMLContentSpec . CONTENTSPECNODE_ONE_OR_MORE ) ) || ( parentContentSpecType == ( XMLContentSpec . CONTENTSPECNODE_ZERO_OR_MORE ) ) ) || ( parentContentSpecType == ( XMLContentSpec . CONTENTSPECNODE_ZERO_OR_ONE ) ) ) { str . append ( '(' ) ; provider . getContentSpec ( contentSpec . value , contentSpec ) ; XMLContentSpec . appendContentSpec ( provider , stringPool , contentSpec , str , true , thisContentSpec ) ; str . append ( ')' ) ; } else { provider . getContentSpec ( contentSpec . value , contentSpec ) ; XMLContentSpec . appendContentSpec ( provider , stringPool , contentSpec , str , true , thisContentSpec ) ; } str . append ( '+' ) ; break ; } case XMLContentSpec . CONTENTSPECNODE_CHOICE : case XMLContentSpec . CONTENTSPECNODE_SEQ : { if ( parens ) { str . append ( '(' ) ; } int type = contentSpec . type ; int otherValue = contentSpec . otherValue ; provider . getContentSpec ( contentSpec . value , contentSpec ) ; XMLContentSpec . appendContentSpec ( provider , stringPool , contentSpec , str , ( ( contentSpec . type ) != type ) , thisContentSpec ) ; if ( type == ( XMLContentSpec . CONTENTSPECNODE_CHOICE ) ) { str . append ( '|' ) ; } else { str . append ( ',' ) ; } provider . getContentSpec ( otherValue , contentSpec ) ; XMLContentSpec . appendContentSpec ( provider , stringPool , contentSpec , str , true , thisContentSpec ) ; if ( parens ) { str . append ( ')' ) ; } break ; } case XMLContentSpec . CONTENTSPECNODE_ANY : { str . append ( "##any" ) ; if ( ( contentSpec . otherValue ) != ( - 1 ) ) { str . append ( ":uri=" ) ;

Fix:
int thisContentSpec = ( contentSpec . type ) & 15 ;