Automatically detect bug id