code: public String getMatchingBundle(Pattern symbolicNamePattern) {
      for (String bundleSymbolicName : bundleSymbolicNames) {
        if (symbolicNamePattern.matcher(bundleSymbolicName).matches()) {
          return bundleSymbolicName;
        }
      }
      return null;
    }
docs: Checks if a bundle with the given pattern exists in the bundle list.
  @param symbolicNamePattern Bundle symbolic name pattern
  @return Bundle name if a bundle was found, null otherwise