Line numbers are great in the IDE when you are working with compiler errors - but they degrade overtime. In other words they change when code is added/removed/refactored and the line number that was used in a code review or stack trace may be in the wrong place.
Is there an alternative to using line numbers to identify specific lines of code which does not degrade over time?