void () { String s1 = """ import java.util.*; class A { void b() { Map map = new HashMap(); class AppPreferences {} String key = "key"; AppPreferences value = new AppPreferences(); map.put(key, value ); map.put(value, value ); map.put("key", value ); map.put("key", new AppPreferences()); } }"""; String s2 = "'_map:[exprtype( *java\\.util\\.Map )].put('_key:[ exprtype( *Object ) ], '_value:[ exprtype( *AppPreferences ) ]);"; assertEquals("expr type with object", 4, findMatchesCount(s1, s2)); }