Contention Analysis of Serially Reusable Programs