From SA Mafia Wiki
A Rolecop is a player that can investigate a target player's role at night. Rolecop powers vary depending on the moderator that uses them; among things they investigate for are role names, flavor and abilities. A similar role is Flavor Cop that can learn a bit about his target's flavor.
While Rolecops can be helpful for the town to discover scum roles, it is a fairly typical role to give to a member of the Mafia, as it helps them find power roles to kill. Likewise its usefulness is diminished for the Town as more and more mods give the scum peculiar, townie-sounding roles, like a Mafia Doctor.