I lived in BCN for 18 months, speak the language reasonably well, and consider myself a local (more or less).
I know of a number of people who have been mugged over the years, and it is a problem on the Ramblas/ Passeig De Gracia and down by the port.
I always tend to keep away from the tourist hotspots at night, and if I am there travel light, and hold on to your wallet/valuables.
To be honest its not a problem to keep away, as there are loads of fabulous places to eat, drink elsewhere, which are much more reasonable, and significantly safer.
Stick to the Eixample or Pedralbes areas, and it is fine. But dont let this put you off BCN is still a fine city with much to offer.