Code and Model Based Test Sequence Generation for Multithreaded Programs