Pair-Sharing Analysis of Object-Oriented Programs