Datalore

Stardate: 41242.4
The crew of the Enterprise find android parts that are identical to Data's while they are exploring his homeworld. When assembled, an 'evil' twin of Data is created and named 'Lore'.