fixed several functions to be total

The Java backend doesn't support matching on function symbol in general. Those unresolved functions caused the recent failure of the cil test.

@chathhorn @andreistefanescu please review