Method invocation reordering