private static boolean isDigitSumPower ( BigInteger x ) {
  int digitSum = digitSum ( x ) ;
  if ( digitSum == 1 ) return false ;
  BigInteger base = BigInteger . valueOf ( digitSum ) ;
  BigInteger pow = base ;
  while ( pow . compareTo ( x ) < 0 ) pow = pow . multiply ( base ) ;
  return pow . equals ( x ) ;
}

private static boolean isDigitSumPower ( BigInteger x ) { int digitSum = digitSum ( x ) ; if ( digitSum == 1 ) return false ; BigInteger base = BigInteger . valueOf ( digitSum ) ; BigInteger pow = base ; while ( pow . compareTo ( x ) < 0 ) pow = pow . multiply ( base ) ; return pow . equals ( x ) ; }
(method_declaration (modifiers) type: (boolean_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (return_statement (false))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (identifier))) (while_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (decimal_integer_literal))) body: (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))) (return_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))