static long result ( String name , int n ) {
  int len = name . length ( ) ;
  boolean hasPrev = false ;
  int curr = 0 ;
  int prevStart = 0 ;
  long res = 0 ;
  int pos = 0 ;
  while ( pos < len ) {
    boolean is = "aeiou" . indexOf ( name . charAt ( pos ++ ) ) < 0 ;
    if ( is ) {
      curr ++ ;
      if ( curr >= n ) {
        hasPrev = true ;
        prevStart = pos - n ;
        res += 1 + pos - n ;
        continue ;
      }
    }
    else {
      curr = 0 ;
    }
    if ( hasPrev ) {
      res += 1 + prevStart ;
    }
  }
  return res ;
}

static long result ( String name , int n ) { int len = name . length ( ) ; boolean hasPrev = false ; int curr = 0 ; int prevStart = 0 ; long res = 0 ; int pos = 0 ; while ( pos < len ) { boolean is = " aeiou " . indexOf ( name . charAt ( pos ++ ) ) < 0 ; if ( is ) { curr ++ ; if ( curr >= n ) { hasPrev = true ; prevStart = pos - n ; res += 1 + pos - n ; continue ; } } else { curr = 0 ; } if ( hasPrev ) { res += 1 + prevStart ; } } return res ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (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)))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (false))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation object: (string_literal) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (update_expression (identifier)))))) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (block (expression_statement (update_expression (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (true))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (identifier)))) (continue_statement)))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (decimal_integer_literal) right: (identifier)))))))) (return_statement (identifier))))