I've found that if you don't get too involved in the kid's interactions with other kids, things work out better. If the kids parents aren't very involved the best thing to do is to let the other child come to your house and get to know them. I've seen this quite a few times, the kid will get to know you and won't act out around you, they will respect you for being in your child's life (this is why I always try to take a board position on the PTA, if they know that you know the people at school they won't pick on your child). If you are around them a lot you will get to know if the boy has any good qualities or if he is a lost cause. Usually your own child will finally get tired of the way he's treated and stay away from the other boy.
I have 2 girls in their 20's, a 16 year old and 6 grandchildren, out of all of the kids they were around we've only had to tell one child he couldn't come back into our yard (he was only interested in the new trampoline, so it wasn't a big deal) and we had to ask that another boy be kept away from my granddaughter at school, he asked her to cut herself with the blade he took out of his pencil sharpener. So you can see why they were told to stay away.
My kids have been around all types of kids and they have always ended up doing the right thing and staying away from the kids that got into trouble. Of course they knew what they were allowed to do and that they would have consequences for their bad decisions. If your involved enough to keep track of what the kids do, the others will know they have to act right too!