Buggy code:
public class LocationPathExpr extends Expr { public static final int ABSOLUTE_PATH = 0 ; public static final int RELATIVE_PATH = 1 ; Step s ; Step currentStep ; int pathType ; int state ; intHash ih ; public static final int START = 0 ; public static final int END = 1 ; public static final int TERMINAL = 2 ; public static final int FORWARD = 3 ; public static final int BACKWARD = 4 ; public LocationPathExpr ( ) { } public final void optimize2 ( ) { } public final void optimize ( ) { } public final void setStep ( Step st ) { } public final void setPathType ( int ptype ) { } public final boolean isUnique ( int i ) { } public final void reset ( VTDNav vn ) { } public String toString ( ) { } public final boolean evalBoolean ( VTDNav vn ) { } public final double evalNumber ( VTDNav vn ) { } public final String evalString ( VTDNav vn ) { String s = "" ; int a = 2147483647 ; int k = - 1 ; vn . push2 ( ) ; int size = vn . contextStack2 . size ; try { if ( needReordering ) { while ( ( k = evalNodeSet ( vn ) ) != ( - 1 ) ) { if ( k < a ) a = k ; } if ( a == 2147483647 ) { a = - 1 ; } } else { a = evalNodeSet ( vn ) ; } if ( a != ( - 1 ) ) { int t = vn . getTokenType ( a ) ; switch ( t ) { case VTDNav . TOKEN_STARTING_TAG : case VTDNav . TOKEN_DOCUMENT : <START_BUG> s = vn . getXPathStringVal ( ) ; <END_BUG> break ; case VTDNav . TOKEN_ATTR_NAME : s = vn . toString ( ( a + 1 ) ) ; break ; case VTDNav . TOKEN_PI_NAME : s = vn . toString ( ( a + 1 ) ) ; break ; default : s = vn . toString ( a ) ; break ; } } } catch ( Exception e ) { } vn . contextStack2 . size = size ; reset ( vn ) ; vn . pop2 ( ) ; return s ; } public final boolean isNodeSet ( ) { } public final boolean isNumerical ( ) { } protected final void transition_child ( VTDNav vn ) throws NavException { } protected final int process_child ( VTDNav vn ) throws NavException , XPathEvalException { } protected final void transition_DDFP ( VTDNav vn ) { } protected final int process_DDFP ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_DDFP2 ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_parent ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_parent2 ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_ancestor ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_ancestor2 ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_ancestor_or_self ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_ancestor_or_self2 ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_self ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_self2 ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_namespace ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_following_sibling2 ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_following_sibling ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_preceding_sibling ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_preceding_sibling2 ( VTDNav vn ) throws NavException , XPathEvalException { } protected final int process_attribute ( VTDNav vn ) throws NavException , XPathEvalException { } public int evalNodeSet ( VTDNav vn ) throws NavException , XPathEvalException { } public final boolean isString ( ) { } public final boolean isBoolean ( ) { } public final boolean requireContextSize ( ) { } public final void setContextSize ( int size ) { } protected final int computeContextSize4PrecedingSibling ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4PrecedingSibling2 ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4FollowingSibling ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4FollowingSibling2 ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4Self ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4Self2 ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4AncestorOrSelf ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4AncestorOrSelf2 ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4Child2 ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4Parent ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4Parent2 ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4Ancestor2 ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4DDFP ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4DDFP2 ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4Ancestor ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { } protected final int computeContextSize4Child ( Predicate p , VTDNav vn ) throws NavException , XPathEvalException { }

Fix:
s = vn . getXPathStringVal2 ( a , ( ( short ) ( 0 ) ) ) ;