code: public static String stripPrefix(final String s, final String prefix) {
      return stripPrefixHelper2(stripPrefixHelper2(stripPrefixHelper2(
          stripCommonPrefixes(stripPrefixHelper2(s, prefix)),
          "org.apache.reef"), "org.apache.reef"), "org.apache.reef.wake");
    }
docs: /*  public static String stripPrefixHelper(String s, String prefix) {
  if(!"".equals(prefix) && s.startsWith(prefix+".")) {
  try {
  String suffix = s.substring(prefix.length()+1);
  if(suffix.matches("^[A-Z].+")){
  return suffix;
  } else {
  String shorten = prefix.replaceAll("([^.])[^.]+", "$1");
  return shorten + "." + suffix;
  }
  } catch(StringIndexOutOfBoundsException e) {
  throw new RuntimeException("Couldn't strip " + prefix + " from " + s, e);
  }
  } else {
  return s;
  }
  }