code: public static List<Bundle> getBundles( BundleContext bc, String symbolicName )
      {
          List<Bundle> bundles = new ArrayList<Bundle>();
          for( Bundle bundle : bc.getBundles() )
          {
              if( bundle.getSymbolicName().equals( symbolicName ) )
              {
                  bundles.add( bundle );
              }
          }
          return bundles;
      }
docs: Returns a list of all bundles with the given symbolic name.
  
  @param bc bundle context
  @param symbolicName bundle symbolic name
  @return matching bundles. The list may be empty, but never null.