private static int findMoves ( int i , int j , int [ ] [ ] memoized ) {
  if ( i == 0 && j == 0 ) return 1 ;
  if ( i < 1 || j < 1 ) return 0 ;
  if ( memoized [ i ] [ j ] != - 1 ) return memoized [ i ] [ j ] ;
  memoized [ i ] [ j ] = ( findMoves ( i - 1 , j - 2 , memoized ) + findMoves ( i - 2 , j - 1 , memoized ) ) % 10007 ;
  return memoized [ i ] [ j ] ;
}

private static int findMoves ( int i , int j , int [ ] [ ] memoized ) { if ( i == 0 && j == 0 ) return 1 ; if ( i < 1 || j < 1 ) return 0 ; if ( memoized [ i ] [ j ] != - 1 ) return memoized [ i ] [ j ] ; memoized [ i ] [ j ] = ( findMoves ( i - 1 , j - 2 , memoized ) + findMoves ( i - 2 , j - 1 , memoized ) ) % 10007 ; return memoized [ i ] [ j ] ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (return_statement (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (unary_expression operand: (decimal_integer_literal)))) consequence: (return_statement (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)) (binary_expression left: (identifier) right: (decimal_integer_literal)) (identifier))))) right: (decimal_integer_literal)))) (return_statement (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))))