private static List < String > list ( List < String > list , String str ) {
  List < String > temp = new ArrayList < String > ( ) ;
  if ( list != null ) temp . addAll ( list ) ;
  temp . add ( str ) ;
  return temp ;
}

private static List < String > list ( List < String > list , String str ) { List < String > temp = new ArrayList < String > ( ) ; if ( list != null ) temp . addAll ( list ) ; temp . add ( str ) ; return temp ; }
(method_declaration (modifiers) type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier) parameters: (formal_parameters (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier)) (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (null_literal))) consequence: (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (return_statement (identifier))))