question: private Set < ObjectInstance > filterListOfObjectInstances ( Set < ObjectInstance > list , QueryExp query ) { if ( query == null ) { return list ; } else { Set < ObjectInstance > result = new HashSet < ObjectInstance > ( ) ; for ( ObjectInstance oi : list ) { boolean res = false ; MBeanServer oldServer = QueryEval . getMBeanServer ( ) ; query . setMBeanServer ( server ) ; try { res = query . apply ( oi . getObjectName ( ) ) ; } catch ( Exception e ) { res = false ; } finally { query . setMBeanServer ( oldServer ) ; } if ( res ) { result . add ( oi ) ; } } return result ; } }
target:  Applies the specified queries to the set of ObjectInstances.