private static double calc ( int w , int s , int e ) {
  double r = w == 0 ? 0 : 100.0 * s / ( w + s ) ;
  return w / 100 * e < s ? 0 : r ;
}

private static double calc ( int w , int s , int e ) { double r = w == 0 ? 0 : 100.0 * s / ( w + s ) ; return w / 100 * e < s ? 0 : r ; }
(method_declaration (modifiers) type: (floating_point_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (ternary_expression condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) consequence: (decimal_integer_literal) alternative: (binary_expression left: (binary_expression left: (decimal_floating_point_literal) right: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (return_statement (ternary_expression condition: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier)) right: (identifier)) consequence: (decimal_integer_literal) alternative: (identifier)))))