I am not a professor myself, but I am going to report my observations from **CS in Germany** as a native speaker:

Basically, this depends on personal preference. However, there are some more and some less frequently accepted ways of addressing, so I'll compile a little list of options (centering around a fictional person named *Thomas Müller*):

- **Herr Professor Doktor Müller:** While formally correct for most professors, this is rarely used in spoken language and should be reserved to written letters - and even to the more formal ones among these.
- **Herr Professor Müller:** Usually acceptable. It's the default way of addressing a professor, and even if the professor might not prefer it, it's a safe way that won't offend anyone.
- **Professor Müller:** This is not a typical (I would even say: correct) way to address someone in German. Titles such as *Herr* and *Frau* (*Mr.*/*Mrs.*) are used even when the degree (or position) is indicated - the addresses *Captain Meier*, *President Schmidt*, and *Doctor Huber* translate to *Herr Kapitän Meier*, *Frau Präsidentin Schmidt*, and *Herr Doktor Huber*, respectively. (Only when talking about oneself, such as on one's academic website, *Herr* and *Frau* are dropped.)
- **Herr Doktor Müller:** I have never heard about addressing a professor "only" as a doctor. The higher title always supersedes the lower one, and in this respect, *Professor* is definitely considered higher. Calling a professor *doctor* would seem quite odd to me, maybe comparable to addressing an *M.Sc.* holder as a *B.Sc.* (even though they have an M.Sc. in the same field as the B.Sc. as a direct follow-up). It feels like ignoring/neglecting some of the progress they have made in their career.
- **Herr Müller:** This is very commonly used, and quite some professors seem to prefer it. I have heard various justifications, such as avoiding overly long titles, and *professor* being merely the position, not a part of the name. Some professors also prefer being addressed like this by their/other university staff (post-docs, doctoral candidates, ...), while expecting to be addressed as *Herr Professor Müller* by students.
- **Thomas Müller:** Using the full name (given name + surname) is not a usual way of addressing people in German.
- **Thomas:** It is rare for professors to allow this form of addressing to students, though within their own institute, first-name policies are not uncommon, especially with younger professors.

Note that for female professors, you can also use the female forms *Professorin* and *Doktorin*, although this might make your words sound even a bit more formal (as in writing).

EDIT: As correctly guessed by [Massimo Ortolano](http://academia.stackexchange.com/users/20058/massimo-ortolano), the name can be skipped in *Herr Professor*, although for some reason, this sounds quite old-fashioned to me. Probably, you would just say "Entschuldigung" (Excuse me) to call for attention, rather than directly addressing the professor nowadays.