Can I modify the source code of Bitcoin to generate addresses people have already used?
No, because you need the private key to spend the bitcoins. The chance you guess a private key is really, really, really small. 

The amount of private keys is 64^16, which is 7.9228163*10^28. Written down this number looks this way:

79,228,163,000,000,000,000,000,000,000

Just to put this number into perspective, the US debt at this moment is:

17,193,871,000,000 $

If you would be able to guess and check 100 million private keys every day, it would take you (64^16)/100,000,000=7.9228163*10^20 days, which is 2.1706346*10^18 years. That is 2,170,634,600,000,000,000 years.

The approximate age of the earth is estimated at about 4.54*10^9 years, which is 4,540,000,000 years.