BugEntry's fix and unit testing.
Unit testing for BugEntry.