digitalWrite bug in Arduino Mega 2560

One lead of the LED is connected to D11. Where is the other end of the LED/resistor connected? Is it connected to 5v (current sink) or ground (current source)?

If the anode of the LED/resistor is connected to 5v and cathode to D11, it will light when D11 is LOW.
If the cathode of the LED/resistor is connected to ground and anode to D11, it will light when D11 is HIGH.