EmbeddedFunctions { public static final String parseWord(String string) { int len = string.length(); if (len < 3) { return null; } StringBuilder buf = new StringBuilder(len); for (int i = 0; i < len; i++) { char c = Character.toLowerCase(string.charAt(i)); if (c == '\u00e6') { buf.append("ae"); } else if (c >= '\u00e0' && c <= '\u00ff') { buf.append(UNACCENTED.charAt((c) - 0xe0)); } else if (c == '\u0153') { buf.append("oe"); } else { buf.append(c); } } int l = buf.length(); if (l > 3 && buf.charAt(l - 1) == 's') { buf.setLength(l - 1); } String word = buf.toString(); if (stopWords.contains(word)) { return null; } return word; }  static boolean isInTree(Serializable id, Serializable baseId); static boolean isInTree(Connection conn, Serializable id,
            Serializable baseId); static boolean isAccessAllowed(Serializable id,
            Set<String> principals, Set<String> permissions); static boolean isAccessAllowed(Connection conn, Serializable id,
            Set<String> principals, Set<String> permissions); static String parseFullText(String string1, String string2); static final String parseWord(String string); static Set<String> split(String string); static Set<String> split(String string, char sep);  }
@Test public void testParse() { assertNull(EmbeddedFunctions.parseWord("gr")); assertNull(EmbeddedFunctions.parseWord("are")); assertNull(EmbeddedFunctions.parseWord("THE")); assertEquals("foo", EmbeddedFunctions.parseWord("foo")); assertEquals("foo", EmbeddedFunctions.parseWord("fOoS")); }