public static void add ( HashMap < Integer , Integer > map , int ele ) {
  int cnt = map . getOrDefault ( ele , 0 ) ;
  cnt ++ ;
  map . put ( ele , cnt ) ;
  return ;
}

public static void add ( HashMap < Integer , Integer > map , int ele ) { int cnt = map . getOrDefault ( ele , 0 ) ; cnt ++ ; map . put ( ele , cnt ) ; return ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier) (type_identifier))) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal))))) (expression_statement (update_expression (identifier))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))) (return_statement)))