Buggy code:
private Object getInteger ( String value , int radix ) { } static boolean isHexChar ( int c ) { } static boolean isOctChar ( int c ) { } public boolean isIdentifierChar ( int c ) { } protected boolean isMultiByteChar ( int c ) { } public StrNode createStrNode ( ISourcePosition position , ByteList buffer , int flags ) { } private int parseQuote ( int c ) throws IOException { } private int hereDocumentIdentifier ( ) throws IOException { } private void arg_ambiguous ( ) { } private int magicCommentMarker ( ByteList str , int begin ) { } private boolean magicCommentSpecialChar ( char c ) { } private static final String magicString = "([^\\s\'\":;]+)\\s*:\\s*(\"(?:\\\\.|[^\"])*\"|[^\"\\s;]+)[\\s;]*" ; private static final Regex magicRegexp = new Regex ( RubyYaccLexer . magicString . getBytes ( ) , 0 , RubyYaccLexer . magicString . length ( ) , 0 , Encoding . load ( "ASCII" ) ) ; protected boolean parseMagicComment ( ByteList magicLine ) throws IOException { } private static final String encodingString = "[cC][oO][dD][iI][nN][gG]\\s*[=:]\\s*([a-zA-Z0-9\\-_]+)" ; private static final Regex encodingRegexp = new Regex ( RubyYaccLexer . encodingString . getBytes ( ) , 0 , RubyYaccLexer . encodingString . length ( ) , 0 , Encoding . load ( "ASCII" ) ) ; protected void handleFileEncodingComment ( ByteList encodingLine ) throws IOException { } protected int readComment ( ) throws IOException { } private void printToken ( int token ) { } private int yylex2 ( ) throws IOException { } private int yylex ( ) throws IOException { } private int identifierToken ( RubyYaccLexer . LexState last_state , int result , String value ) { } private int getIdentifier ( int first ) throws IOException { } private int ampersand ( boolean spaceSeen ) throws IOException { } private int at ( ) throws IOException { } private int backtick ( boolean commandState ) throws IOException { } private int bang ( ) throws IOException { } private int caret ( ) throws IOException { } private int colon ( boolean spaceSeen ) throws IOException { } private int comma ( int c ) throws IOException { } private int doKeyword ( RubyYaccLexer . LexState state ) { } private int dollar ( ) throws IOException { } private int dot ( ) throws IOException { } private int doubleQuote ( ) throws IOException { } private int greaterThan ( ) throws IOException { } private int identifier ( int c , boolean commandState ) throws IOException { if ( ! ( isIdentifierChar ( c ) ) ) { String badChar = "\\" + ( Integer . toOctalString ( ( c & 255 ) ) ) ; throw new SyntaxException ( PID . CHARACTER_BAD , getPosition ( ) , ( ( ( ( "Invalid<seq2seq4repair_space>char<seq2seq4repair_space>`" + badChar ) + "'<seq2seq4repair_space>('" ) + ( ( char ) ( c ) ) ) + "')<seq2seq4repair_space>in<seq2seq4repair_space>expression" ) , badChar ) ; } tokenBuffer . setLength ( 0 ) ; int first = getIdentifier ( c ) ; c = src . read ( ) ; boolean lastBangOrPredicate = false ; if ( ( c == '!' ) || ( c == '?' ) ) { if ( ! ( src . peek ( '=' ) ) ) { lastBangOrPredicate = true ; tokenBuffer . append ( ( ( char ) ( c ) ) ) ; } else { src . unread ( c ) ; } } else { src . unread ( c ) ; } int result = 0 ; RubyYaccLexer . LexState last_state = lex_state ; if ( lastBangOrPredicate ) { result = Tokens . tFID ; } else { if ( ( lex_state ) == ( RubyYaccLexer . LexState . EXPR_FNAME ) ) { if ( ( c = src . read ( ) ) == '=' ) { int c2 = src . read ( ) ; <START_BUG> if ( ( ( c2 != '~' ) && ( c2 != '>' ) ) && ( ( c2 != '=' ) || ( ( c2 == '\n' ) && ( src . peek ( '>' ) ) ) ) ) { <END_BUG> result = Tokens . tIDENTIFIER ; tokenBuffer . append ( ( ( char ) ( c ) ) ) ; src . unread ( c2 ) ; } else { src . unread ( c2 ) ; src . unread ( c ) ; } } else { src . unread ( c ) ; } } if ( ( result == 0 ) && ( Character . isUpperCase ( first ) ) ) { result = Tokens . tCONSTANT ; } else { result = Tokens . tIDENTIFIER ; } } String tempVal = tokenBuffer . toString ( ) . intern ( ) ; if ( ( ! ( isOneEight ) ) && ( ( ( ( ( lex_state ) == ( RubyYaccLexer . LexState . EXPR_BEG ) ) && ( ! commandState ) ) || ( ( lex_state ) == ( RubyYaccLexer . LexState . EXPR_ARG ) ) ) || ( ( lex_state ) == ( RubyYaccLexer . LexState . EXPR_CMDARG ) ) ) ) { int c2 = src . read ( ) ; if ( ( c2 == ':' ) && ( ! ( src . peek ( ':' ) ) ) ) { src . unread ( c2 ) ; setState ( RubyYaccLexer . LexState . EXPR_BEG ) ; src . read ( ) ; yaccValue = new Token ( tempVal , getPosition ( ) ) ; return Tokens . tLABEL ; } src . unread ( c2 ) ; } if ( ( lex_state ) != ( RubyYaccLexer . LexState . EXPR_DOT ) ) { RubyYaccLexer . Keyword keyword = RubyYaccLexer . getKeyword ( tempVal ) ;

Fix:
if ( ( ( c2 != '~' ) && ( c2 != '>' ) ) && ( ( c2 != '=' ) || ( src . peek ( '>' ) ) ) ) {