A San Francisco man has been charged with stealing pricey “Star Wars” Lego sets from Target stores on the Peninsula by replacing the bar codes on the boxes with ones that gave him steep discounts, San Mateo County prosecutors said Thursday.

Sound familiar? It should. Not so long, long ago, in a county not very far, far away, a Silicon Valley tech executive was charged with executing almost exactly the same fraud scheme at Target stores in Mountain View, Cupertino and San Carlos.

There’s no indication that Thomas Langenbach, the software company vice president charged in that case, was in cahoots with Donald Michael Morales, who is accused of pulling the scam in San Mateo County, prosecutors say. Apparently, they hit on the same idea independently, authorities believe.

“The label switch has been around for decades, but the ability to do so in a systematic way is newer,” said Al Serrato, an assistant district attorney in San Mateo County.

Morales, 44, stole at least 14 “Star Wars” Lego sets from Target stores in San Bruno, San Mateo, Redwood City and Daly City between Feb. 20 and April 14, prosecutors said.

He allegedly did so by pasting fake bar codes for $15.99 on the collectors sets, which are sold for $139.99. Morales then sold the Legos on eBay for closer to the store price, prosecutors say.

Security guards at the Target in Redwood City detained him April 14, and a check of other stores revealed him to be the suspect in additional thefts. He’s been accused of 14 felony burglary charges and one charge of grand theft.

Morales said he was out of work and needed money, according to prosecutors. He probably made less than $2,000 from his eBay sales, Serrato said.

A judge released Morales on Thursday on his own recognizance. He is to return to court June 28.