If they both have HP stickers saying they are J9150s, then that is hopefully what they are.
And yes, they can be made in different factories using different parts, so they don't always look identical.
When you put them in a Procurve switch, that switch will check their part numbers for you, which will be the test.