Depends on the kind of code. If you're automating a process, or handling large quantities of user input, for example, problem cases are everywhere. Or if you're working with a complex problem space where things can compose in unexpected ways (e.g., a language interpreter).