private static BigInteger [ ] fibonacci ( int n ) {
  if ( n < 0 ) throw new IllegalArgumentException ( ) ;
  else if ( n == 0 ) return new BigInteger [ ] {
    BigInteger . ZERO , BigInteger . ONE };
    else {
      BigInteger [ ] ab = fibonacci ( n / 2 ) ;
      BigInteger a = ab [ 0 ] ;
      BigInteger b = ab [ 1 ] ;
      BigInteger c = a . multiply ( b . shiftLeft ( 1 ) . subtract ( a ) ) ;
      BigInteger d = a . multiply ( a ) . add ( b . multiply ( b ) ) ;
      if ( n % 2 == 0 ) return new BigInteger [ ] {
        c , d };
        else return new BigInteger [ ] {
          d , c . add ( d ) };
        }
      }
      
private static BigInteger [ ] fibonacci ( int n ) { if ( n < 0 ) throw new IllegalArgumentException ( ) ; else if ( n == 0 ) return new BigInteger [ ] { BigInteger . ZERO , BigInteger . ONE } ; else { BigInteger [ ] ab = fibonacci ( n / 2 ) ; BigInteger a = ab [ 0 ] ; BigInteger b = ab [ 1 ] ; BigInteger c = a . multiply ( b . shiftLeft ( 1 ) . subtract ( a ) ) ; BigInteger d = a . multiply ( a ) . add ( b . multiply ( b ) ) ; if ( n % 2 == 0 ) return new BigInteger [ ] { c , d } ; else return new BigInteger [ ] { d , c . add ( d ) } ; } }
(method_declaration (modifiers) type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (throw_statement (object_creation_expression type: (type_identifier) arguments: (argument_list))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (array_creation_expression type: (type_identifier) dimensions: (dimensions) value: (array_initializer (field_access object: (identifier) field: (identifier)) (field_access object: (identifier) field: (identifier))))) alternative: (block (local_variable_declaration type: (array_type element: (type_identifier) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (array_access array: (identifier) index: (decimal_integer_literal)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (array_access array: (identifier) index: (decimal_integer_literal)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))) name: (identifier) arguments: (argument_list (identifier))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (return_statement (array_creation_expression type: (type_identifier) dimensions: (dimensions) value: (array_initializer (identifier) (identifier)))) alternative: (return_statement (array_creation_expression type: (type_identifier) dimensions: (dimensions) value: (array_initializer (identifier) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))))))))