If Google thought the code was malicious or any form of Malware, it would inform you via e-mial, Google WebMasters and when you try to access the site. Many people believe that they are being penalised and tend to treat their relationship with Google as a 1:1 relationship, whereas its really 1:m. Chances are other factors need to be considered. If you do a search like this [ "mydomain.com"] - is your domain returned first (don't use the [ and] in the search, just the stuff in between). Have you logged into GWTools and checked the site indexing and crawl issues? Try a fetch with GoogleBot and make sure that Googlebot can open the pages. If everything checks out ok, then it may just be a case of not having enough authority/relevance for those phrases you're checking for.