Bug detection algorithms