Why would there be logic to avoid repeated numbers? Tickets can have repeated numbers just like the winning combination can have it. You can get a ticket with numbers [5,5,5,5] and then with 4-match if winning numbers are [5,5,5,5]
There is duplication in the code yes, that would be good to refactor, BUT - PR #5 touches multiBuy a bit now to support batch minting. So once it lands buy and multiBuy will be quite different 🙂
After buying some tickets, I've noticed that one number of a ticket was repeated. After checking this file: Lottery.sol
Thanks.