static void CamelCase ( ArrayList < String > words , String pattern ) {
  Map < String , List < String >> map = new HashMap < String , List < String >> ( ) ;
  for ( int i = 0 ;
  i < words . size ( ) ;
  i ++ ) {
    String str = "" ;
    int l = words . get ( i ) . length ( ) ;
    for ( int j = 0 ;
    j < l ;
    j ++ ) {
      if ( words . get ( i ) . charAt ( j ) >= 'A' && words . get ( i ) . charAt ( j ) <= 'Z' ) {
        str += words . get ( i ) . charAt ( j ) ;
        map . put ( str , list ( map . get ( str ) , words . get ( i ) ) ) ;
      }
    }
  }
  boolean wordFound = false ;
  for ( Map . Entry < String , List < String >> it : map . entrySet ( ) ) {
    if ( it . getKey ( ) . equals ( pattern ) ) {
      wordFound = true ;
      for ( String s : it . getValue ( ) ) System . out . print ( s + "\n" ) ;
    }
  }
  if ( ! wordFound ) {
    System . out . print ( "No match found" ) ;
  }
}

static void CamelCase ( ArrayList < String > words , String pattern ) { Map < String , List < String > > map = new HashMap < String , List < String > > ( ) ; for ( int i = 0 ; i < words . size ( ) ; i ++ ) { String str = " " ; int l = words . get ( i ) . length ( ) ; for ( int j = 0 ; j < l ; j ++ ) { if ( words . get ( i ) . charAt ( j ) >= ' A ' && words . get ( i ) . charAt ( j ) <= ' Z ' ) { str += words . get ( i ) . charAt ( j ) ; map . put ( str , list ( map . get ( str ) , words . get ( i ) ) ) ; } } } boolean wordFound = false ; for ( Map . Entry < String , List < String > > it : map . entrySet ( ) ) { if ( it . getKey ( ) . equals ( pattern ) ) { wordFound = true ; for ( String s : it . getValue ( ) ) System . out . print ( s + " \n " ) ; } } if ( ! wordFound ) { System . out . print ( " No ▁ match ▁ found " ) ; } }
(method_declaration (modifiers) type: (void_type) 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) (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) (generic_type (type_identifier) (type_arguments (type_identifier))))) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (string_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal)) right: (binary_expression left: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (identifier))) right: (character_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (method_invocation name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))))))))))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (enhanced_for_statement type: (generic_type (scoped_type_identifier (type_identifier) (type_identifier)) (type_arguments (type_identifier) (generic_type (type_identifier) (type_arguments (type_identifier))))) name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) body: (block (if_statement condition: (parenthesized_expression (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) name: (identifier) arguments: (argument_list (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (true))) (enhanced_for_statement type: (type_identifier) name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) body: (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (string_literal)))))))))) (if_statement condition: (parenthesized_expression (unary_expression operand: (identifier))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal))))))))