static int summation ( int n ) {
  int abs_sum = n * ( n + 1 ) / 2 ;
  int sign = n + 1 % 2 == 0 ? 1 : - 1 ;
  int result_sum = sign * abs_sum ;
  return result_sum ;
}

static int summation ( int n ) { int abs_sum = n * ( n + 1 ) / 2 ; int sign = n + 1 % 2 == 0 ? 1 : - 1 ; int result_sum = sign * abs_sum ; return result_sum ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (ternary_expression condition: (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (decimal_integer_literal) right: (decimal_integer_literal))) right: (decimal_integer_literal)) consequence: (decimal_integer_literal) alternative: (unary_expression operand: (decimal_integer_literal))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (identifier)))) (return_statement (identifier))))