anchor.diff:  
       public static class Search {
   
  +        private static final String CHARSET = "UTF-8";
  +
           private final String filetype;
   
           private final String term;
  
positive.code:                      javax.jcr.Repository,
                       javax.jcr.Session,
                       javax.jcr.SimpleCredentials,
                       javax.swing.text.AttributeSet,
                       javax.swing.text.html.HTML,
                       javax.swing.text.html.HTMLDocument,
                       javax.swing.text.html.HTMLEditorKit,
                       org.apache.jackrabbit.j2ee.RepositoryAccessServlet,
                       org.apache.jackrabbit.util.Text"
   %><%@ page contentType="text/html;charset=UTF-8" %><%
      Repository rep;
      Session jcrSession;
      String wspName;
      try {
          rep = RepositoryAccessServlet.getRepository(pageContext.getServletContext());
          jcrSession = rep.login(new SimpleCredentials("user", "".toCharArray()));
          wspName = jcrSession.getWorkspace().getName();
      } catch (Throwable e) {
          %>Error while accessing the repository: <font color="red"><%= Text.encodeIllegalXMLCharacters(e.getMessage()) %></font><br><%
  
negative.code:         }
  
          public URL[] getURLs() throws Exception {
              List<URL> urls = new ArrayList<URL>();
              String googleBaseUrl = "http://ajax.googleapis.com/ajax/services/search/web";
              String googleQueryString = "?v=1.0&start=" + start + "&rsz=8&q=";
              String query = term + " filetype:" + this.filetype;
              URL google = new URL(googleBaseUrl + googleQueryString + URLEncoder.encode(query, CHARSET));
              InputStreamReader reader = null;
              try {
                  URLConnection conn = google.openConnection();
                  conn.setRequestProperty("Referer", "http://jackrabbit.apache.org/");
                  reader = new InputStreamReader(conn.getInputStream(), CHARSET);
                  Object obj = JSONValue.parse(reader);
                  JSONObject jsonObject = (JSONObject) obj;
                  JSONObject responseData = (JSONObject) jsonObject.get("responseData");
                  if (responseData != null) {
                      JSONArray results = (JSONArray) responseData.get("results");
                      if (results != null) {
                          for (int i = 0; i < results.size(); i++) {
                              JSONObject result = (JSONObject) results.get(i);
                              if (result != null) {
                                  String urlString = (String) result.get("url");
                                  URL url = new URL(new URL("http", "www.google.com", "dummy"), urlString);
                                  if (!url.getHost().contains("google")) {
                                      urls.add(url);
                                  }
                              }
                          }
                      }
                  }
              } finally {
                  reader.close();
              }
              return urls.toArray(new URL[urls.size()]);
          }
      }
  
  