code: public <S> S getService(final ServiceReference<S> reference, final BundleContext context) {
          if (System.getSecurityManager() == null)
              return context.getService(reference);
          return AccessController.doPrivileged(new PrivilegedAction<S>() {
              @Override
              public S run() {
                  return context.getService(reference);
              }
          }, controlContext);
      }
docs: Gets a service object. Same as calling
  context.getService(reference)
  
  @param reference the ServiceReference
  @param context the BundleContext
  @return a service object