code: public Bundle findBundle(Object objResource, Object bundleContext, String packageName, String versionRange)
      {
          if (bundleContext == null)
              bundleContext = this.bundleContext;
          if (bundleContext == null)
              return null;
          if (objResource == null)
              return BaseClassFinderService.findBundle((BundleContext)bundleContext, packageName, versionRange);
          Bundle[] bundles = ((BundleContext)bundleContext).getBundles();
          for (Bundle bundle : bundles)
          {
              if (objResource != null)
              {
                  if (this.isResourceBundleMatch(objResource, bundle))
                      return bundle;               
              }
          }
          return null;
      }
docs: Find the currently installed bundle that exports this package.
  @param bundleContext
  @param resource
  @return