The one with lots of publications in big-deal journals may or may not be running a sweatshop. And they may or may not be doing actually interesting science, because that game requires so much attention to fashion, fundability and grinding out large quantities of papers (contrary to common belief, prestigious journals do not mean journals publishing the highest quality papers).
But if you want to learn that particular trade then find the advisor best at it to study under.
Pragmatic advice. The problem you solve doesn't have to be paradigm-shifting or world-changing, just a bit above what humanity already knows [1].
w.r.t your question; pick an advisor you know you can work with for $x years first. Read papers before you pick your topic and keep looking for "holes" - these are where you can make your little dent.
[1] : http://matt.might.net/articles/phd-school-in-pictures/
If you don't really know, maybe you shouldn't do it, or at least stop after your masters. PhD is not something you do some work to get, its rather something that comes along with the work you do.
When you get a job and really get paid; you can be flexible with what you work on. When you go get a PhD, you should have some idea of at least the area you are interested in, you can be flexible within that area, but you should at least have one.
If you've gotten an undergraduate and master's degree in computer science, you should already have a pretty good feel for the different areas. Choose the one you really want to immerse yourself in for reasons of pure interest, and pursue that one. Once you have the PhD, you can go on and do whatever you want afterwards. You don't have to stay in the same subarea as your thesis; lots of professors (my advisor included) have changed areas based on the times.
I am constantly splitting my brains about how I can work on an "important" problem; something where my expertise will be relevant years after grad school, too. And I don't want to become a professor and there is a chance I might choose to go back to my home country (not much of compsci products, but very good e-commerce and banking); so my expertise should be of value even in a consumer-of-technology (not producer) economy.
If anybody has ideas about how to pick an area for research, I'd love to hear.