Buggy code:
public static XMLGregorianCalendar createDateTime ( int year , int month , int day , int hours , int minutes , int seconds , int milliseconds , int timezone ) { } public static XMLGregorianCalendar createDate ( int year , int month , int day , int timezone ) { } public static XMLGregorianCalendar createTime ( int hours , int minutes , int seconds , int timezone ) { } public static XMLGregorianCalendar createTime ( int hours , int minutes , int seconds , BigDecimal fractionalSecond , int timezone ) { } public static XMLGregorianCalendar createTime ( int hours , int minutes , int seconds , int milliseconds , int timezone ) { } public BigInteger getEon ( ) { } public int getYear ( ) { } public BigInteger getEonAndYear ( ) { } public int getMonth ( ) { } public int getDay ( ) { } public int getTimezone ( ) { } public int getHour ( ) { } public int getMinute ( ) { } public int getSecond ( ) { } private BigDecimal getSeconds ( ) { } public int getMillisecond ( ) { } public BigDecimal getFractionalSecond ( ) { } public void setYear ( BigInteger year ) { } public void setYear ( int year ) { } private void setEon ( BigInteger eon ) { } public void setMonth ( int month ) { } public void setDay ( int day ) { } public void setTimezone ( int offset ) { } public void setTime ( int hour , int minute , int second ) { } private void checkFieldValueConstraint ( int field , int value ) throws IllegalArgumentException { } public void setHour ( int hour ) { } public void setMinute ( int minute ) { } public void setSecond ( int second ) { } public void setTime ( int hour , int minute , int second , BigDecimal fractional ) { } public void setTime ( int hour , int minute , int second , int millisecond ) { } public int compare ( XMLGregorianCalendar rhs ) { } public XMLGregorianCalendar normalize ( ) { } private XMLGregorianCalendar normalizeToTimezone ( XMLGregorianCalendar cal , int timezone ) { } private static int internalCompare ( XMLGregorianCalendar P , XMLGregorianCalendar Q ) { } private static int compareField ( int Pfield , int Qfield ) { } private static int compareField ( BigInteger Pfield , BigInteger Qfield ) { } private static int compareField ( BigDecimal Pfield , BigDecimal Qfield ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } public static XMLGregorianCalendar parse ( String lexicalRepresentation ) { } public String toXMLFormat ( ) { } public QName getXMLSchemaType ( ) { } public boolean isValid ( ) { } public void add ( Duration duration ) { } private static final BigInteger FOUR = BigInteger . valueOf ( 4 ) ; private static final BigInteger HUNDRED = BigInteger . valueOf ( 100 ) ; private static final BigInteger FOUR_HUNDRED = BigInteger . valueOf ( 400 ) ; private static final BigInteger SIXTY = BigInteger . valueOf ( 60 ) ; private static final BigInteger TWENTY_FOUR = BigInteger . valueOf ( 24 ) ; private static final BigInteger TWELVE = BigInteger . valueOf ( 12 ) ; private static final BigDecimal DECIMAL_ZERO = BigDecimal . valueOf ( 0 ) ; private static final BigDecimal DECIMAL_ONE = BigDecimal . valueOf ( 1 ) ; private static final BigDecimal DECIMAL_SIXTY = BigDecimal . valueOf ( 60 ) ; private static class DaysInMonth { private static final int [ ] table = new int [ ] { 0 , 31 , 28 , 31 , 30 , 31 , 30 , 31 , 31 , 30 , 31 , 30 , 31 } ; } private static int maximumDayInMonthFor ( BigInteger year , int month ) { } private static int maximumDayInMonthFor ( int year , int month ) { } public GregorianCalendar toGregorianCalendar ( ) { } public GregorianCalendar toGregorianCalendar ( TimeZone timezone , Locale aLocale , XMLGregorianCalendar defaults ) { } public TimeZone getTimeZone ( int defaultZoneoffset ) { } public Object clone ( ) { } public void clear ( ) { } public void setMillisecond ( int millisecond ) { } public void setFractionalSecond ( BigDecimal fractional ) { } private final class Parser { private final String format ; private final String value ; private final int flen ; private final int vlen ; private int fidx ; private int vidx ; private Parser ( String format , String value ) { } public void parse ( ) throws IllegalArgumentException { } private char peek ( ) throws IllegalArgumentException { } private char read ( ) throws IllegalArgumentException { } private void skip ( char ch ) throws IllegalArgumentException { } private void parseYear ( ) throws IllegalArgumentException { } private int parseInt ( int minDigits , int maxDigits ) throws IllegalArgumentException { int vstart = vidx ; <START_BUG> while ( ( XMLGregorianCalendarImpl . isDigit ( peek ( ) ) ) && ( ( ( vidx ) - vstart ) <= maxDigits ) ) { <END_BUG> ( vidx ) ++ ; } if ( ( ( vidx ) - vstart ) < minDigits ) { throw new IllegalArgumentException ( value ) ; } return Integer . parseInt ( value . substring ( vstart , vidx ) ) ; } private BigDecimal parseBigDecimal ( ) throws IllegalArgumentException { } } private static boolean isDigit ( char ch ) { } private String format ( String format ) { } private void printNumber ( StringBuffer out , int number , int nDigits ) { } private void printNumber ( StringBuffer out , BigInteger number , int nDigits ) { } private String toString ( BigDecimal bd ) { } static BigInteger sanitize ( Number value , int signum ) { } public void reset ( ) { } }

Fix:
while ( ( XMLGregorianCalendarImpl . isDigit ( peek ( ) ) ) && ( ( ( vidx ) - vstart ) < maxDigits ) ) {