Program: 145774
Project: 145774
Buggy source:
public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {
  Configuration config=Application.get().getConfiguration();
  User user=Application.get().getUser();
  AuthenticationService service=(AuthenticationService)Components.getComponent(AuthenticationService.class);
  if (service.isAuthenticated(user)) {
    user.lastAccess();
  }
  String name=request.getPathInfo();
  if (null == name || "String_Node_Str".equals(name)) {
    name=config.getStartSnip();
  }
 else {
    name=name.substring(1);
  }
  name=name.replace('+',' ');
  Snip snip=SnipSpaceFactory.getInstance().load(name);
  String subname=null;
  if (null == snip) {
    int slashIndex=name.indexOf('/');
    if (slashIndex != -1) {
      subname=name.substring(slashIndex + 1);
      name=name.substring(0,slashIndex);
      Logger.log(Logger.DEBUG,name + "String_Node_Str" + subname);
    }
    snip=SnipSpaceFactory.getInstance().load(name);
  }
  request.setAttribute("String_Node_Str",snip);
  request.setAttribute("String_Node_Str",request.getRequestURL().toString());
  if (subname != null && subname.length() > 0) {
    try {
      request.setAttribute(FileDownloadServlet.FILENAME,subname);
      RequestDispatcher dispatcher=getServletContext().getNamedDispatcher("String_Node_Str");
      dispatcher.forward(request,response);
      return;
    }
 catch (    ServletException e) {
      name=name + "String_Node_Str" + subname;
      snip=null;
    }
  }
  if (null == snip) {
    if (config.allow(Configuration.APP_PERM_CREATESNIP)) {
      response.sendRedirect("String_Node_Str" + name);
    }
 else {
      if ("String_Node_Str".equals(name)) {
        response.sendError(HttpServletResponse.SC_NOT_FOUND,"String_Node_Str" + "String_Node_Str");
        return;
      }
      response.sendRedirect(SnipLink.absoluteLink("String_Node_Str" + name));
    }
    return;
  }
  snip.handle(request);
  RequestDispatcher dispatcher=request.getRequestDispatcher("String_Node_Str");
  dispatcher.forward(request,response);
}

Fixed version (ground truth):
public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException {
  Configuration config=Application.get().getConfiguration();
  User user=Application.get().getUser();
  AuthenticationService service=(AuthenticationService)Components.getComponent(AuthenticationService.class);
  if (service.isAuthenticated(user)) {
    user.lastAccess();
  }
  String name=request.getPathInfo();
  if (null == name || "String_Node_Str".equals(name)) {
    name=config.getStartSnip();
  }
 else {
    name=name.substring(1);
  }
  name=name.replace('+',' ');
  Snip snip=SnipSpaceFactory.getInstance().load(name);
  String subname=null;
  if (null == snip) {
    int slashIndex=name.lastIndexOf('/');
    if (slashIndex != -1) {
      subname=name.substring(slashIndex + 1);
      name=name.substring(0,slashIndex);
      Logger.log(Logger.DEBUG,name + "String_Node_Str" + subname);
    }
    snip=SnipSpaceFactory.getInstance().load(name);
  }
  request.setAttribute("String_Node_Str",snip);
  request.setAttribute("String_Node_Str",request.getRequestURL().toString());
  if (subname != null && subname.length() > 0) {
    try {
      request.setAttribute(FileDownloadServlet.FILENAME,subname);
      RequestDispatcher dispatcher=getServletContext().getNamedDispatcher("String_Node_Str");
      dispatcher.forward(request,response);
      return;
    }
 catch (    ServletException e) {
      name=name + "String_Node_Str" + subname;
      snip=null;
    }
  }
  if (null == snip) {
    if (config.allow(Configuration.APP_PERM_CREATESNIP)) {
      response.sendRedirect("String_Node_Str" + name);
    }
 else {
      if ("String_Node_Str".equals(name)) {
        response.sendError(HttpServletResponse.SC_NOT_FOUND,"String_Node_Str" + "String_Node_Str");
        return;
      }
      response.sendRedirect(SnipLink.absoluteLink("String_Node_Str" + name));
    }
    return;
  }
  snip.handle(request);
  RequestDispatcher dispatcher=request.getRequestDispatcher("String_Node_Str");
  dispatcher.forward(request,response);
}