private static int fixDigit ( int num , int index , int digit ) {
  switch ( index ) {
    case - 1 : return num ;
    case 0 : return 1000 * digit + ( num % 1000 ) ;
    case 1 : return 100 * digit + ( num / 1000 ) * 1000 + ( num % 100 ) ;
    case 2 : return 10 * digit + ( num / 100 ) * 100 + ( num % 10 ) ;
    case 3 : return digit + ( num / 10 ) * 10 ;
    default : return 0 ;
  }
}

private static int fixDigit ( int num , int index , int digit ) { switch ( index ) { case - 1 : return num ; case 0 : return 1000 * digit + ( num % 1000 ) ; case 1 : return 100 * digit + ( num / 1000 ) * 1000 + ( num % 100 ) ; case 2 : return 10 * digit + ( num / 100 ) * 100 + ( num % 10 ) ; case 3 : return digit + ( num / 10 ) * 10 ; default : return 0 ; } }
(method_declaration (modifiers) type: (integral_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 (switch_expression condition: (parenthesized_expression (identifier)) body: (switch_block (switch_block_statement_group (switch_label (unary_expression operand: (decimal_integer_literal))) (return_statement (identifier))) (switch_block_statement_group (switch_label (decimal_integer_literal)) (return_statement (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (switch_block_statement_group (switch_label (decimal_integer_literal)) (return_statement (binary_expression left: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (switch_block_statement_group (switch_label (decimal_integer_literal)) (return_statement (binary_expression left: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (switch_block_statement_group (switch_label (decimal_integer_literal)) (return_statement (binary_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (decimal_integer_literal))))) (switch_block_statement_group (switch_label) (return_statement (decimal_integer_literal)))))))