First version of deadlock pattern matching