private static int nod ( int a , int b ) {
  while ( a != 0 && b != 0 ) {
    if ( a > b ) {
      a = a % b ;
    }
    else {
      b = b % a ;
    }
  }
  return a + b ;
}

private static int nod ( int a , int b ) { while ( a != 0 && b != 0 ) { if ( a > b ) { a = a % b ; } else { b = b % a ; } } return a + b ; }
(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))) body: (block (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))))))) (return_statement (binary_expression left: (identifier) right: (identifier)))))