Do you gain a set bonus when using two of the same item from a set?
Solution 1:
You cannot gain set bonuses for wearing 2 of the same set item because you would be unable to equip them. Set items are unique equipped as shown in the picture. You are unable to equip two of the same one.
Solution 2:
The Description of the item will tell you what you need to wear to get the set bonus.
But AFAIK you cannot wear two same legendary/set items at the same time anyways, in the bottom right corner it says "unique equipped".
Solution 3:
I don't know if anyone has been able to find out yet, but In Diablo 2, you did not get set bonuses for wearing multiple identical pieces of a set (eg rings or weapons), as mentioned in another question.
Therefore I'd imagine the same rule would apply here, and you would not get the bonuses.