Extracting Functional and Non-functional Contracts from Java Classes and Enterprise Java Beans