If your code is in GitHub you can easily link directly to a line of code, e.g.
https://github.com/git/git/blob/master/Makefile#L449
The easiest way to generate this link is to browse to the appropriate revision and file using the web interface and click in the margin on the line number you want to reference. Your address bar should update. Copy and paste.
Ranges are also supported:
https://github.com/git/git/blob/master/Makefile#L451-L466
To generate these, click the first line number, then shift-click the second.
These links can be used in their own Issues system, or any other issue tracker that supports external HTML links.
If you want to embed code in your tickets, you could experiment with gist-it.
Example:
<script src="http://gist-it.appspot.com/github/git/git/blob/master/Makefile?slice=451:466"></script>