public static void addRelations ( int A , int B , HashMap < Integer , List < Integer >> relations ) {
  List < Integer > list = new ArrayList < Integer > ( ) ;
  if ( relations . containsKey ( A ) ) {
    list = relations . get ( A ) ;
  }
  list . add ( B ) ;
  relations . put ( A , list ) ;
}

public static void addRelations ( int A , int B , HashMap < Integer , List < Integer > > relations ) { List < Integer > list = new ArrayList < Integer > ( ) ; if ( relations . containsKey ( A ) ) { list = relations . get ( A ) ; } list . add ( B ) ; relations . put ( A , list ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier) (generic_type (type_identifier) (type_arguments (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 (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier))))))