I wrote find-issues.sh, a script that extracts comments of a certain type within the code and then groups them by file. Downside: your code files change when you register a bug. Upside: when done right, your bug description is next to the code that needs fixing.
Obviously won't work for distributed development, but for single-coder projects, it's really been useful to me.
Note some assumptions and grep magic to exclude third-party files and other non-code files.
#!/bin/sh
LASTFILE=""
egrep -ri "(WARNING|HACK|FIXME|TODO|BUG)" . | egrep -vi "(\.git|debug|/third-party|/locale|/prettify|doc/|/jquery-|lib/s3.php|/jwysiwyg/|^./(.*)\.(txt|conf|xml):(.*))" | while read LINE ; do
FILE=`echo "${LINE}" | cut -d":" -f1`
DATA=`echo "${LINE}" | cut -d":" -f2- | cut -d"/" -f3-`
LEVEL=`echo "${DATA}" | cut -d":" -f1`
COMMENT=`echo "${DATA}" | cut -d":" -f2-`
if [ "x${LASTFILE}" != "x${FILE}" ]; then
if [ "x${LASTFILE}" != "x1" ]; then
echo
fi
printf "%s:\n" "${FILE}"
LASTFILE=${FILE}
fi
printf "%5s:%s\n" "${LEVEL}" "${COMMENT}"
done