private static BigInteger chineseRemainderTheorem ( BigInteger a , BigInteger p , BigInteger b , BigInteger q ) {
  return a . add ( b . subtract ( a ) . multiply ( p . modInverse ( q ) ) . multiply ( p ) ) . mod ( p . multiply ( q ) ) ;
}

private static BigInteger chineseRemainderTheorem ( BigInteger a , BigInteger p , BigInteger b , BigInteger q ) { return a . add ( b . subtract ( a ) . multiply ( p . modInverse ( q ) ) . multiply ( p ) ) . mod ( p . multiply ( q ) ) ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier))) body: (block (return_statement (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (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))))) name: (identifier) arguments: (argument_list (identifier))))) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))))