there are some tools which are used for comparing, might also be used for identifying similar patterns :-) http://www.openrce.org/forums/posts/1119#3656
similarities among binaries can be easily identified with google's yara http://code.google.com/p/yara-project/. The Usage of this console application is also given in a manual. The source code of the same is also given
Note: Registration is required to post to the forums.