Program: 20626
Project: 20626
Buggy source:
/** 
 * Handles the HTTP <code>POST</code> method.
 * @param request servlet request
 * @param response servlet response
 * @throws ServletException if a servlet-specific error occurs
 * @throws IOException if an I/O error occurs
 */
@Override protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String dateParam=request.getParameter("String_Node_Str");
  checkArgument(checkNotNull(dateParam).length() > 0,"String_Node_Str");
  String durationParam=request.getParameter("String_Node_Str");
  checkArgument(checkNotNull(durationParam).length() > 0,"String_Node_Str");
  String taskParam=request.getParameter("String_Node_Str");
  checkArgument(checkNotNull(taskParam).length() > 0,"String_Node_Str");
  String descriptionParam=request.getParameter("String_Node_Str");
  checkArgument(checkNotNull(descriptionParam).length() > 0,"String_Node_Str");
  DateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
  Employee user=(Employee)checkNotNull(request.getAttribute("String_Node_Str"),"String_Node_Str");
  BigDecimal duration=new BigDecimal(durationParam);
  Task task=sarariman.getTasks().getMap().get(Integer.parseInt(taskParam));
  String geolocation=request.getParameter("String_Node_Str");
  if (geolocation.isEmpty()) {
    geolocation=null;
  }
  try {
    Date date=dateFormat.parse(dateParam);
    TimesheetEntry entry=sarariman.getTimesheetEntries().get(task,user,date);
    if (entry != null) {
      request.getSession().setAttribute("String_Node_Str",true);
      request.getSession().setAttribute("String_Node_Str",durationParam);
      request.getSession().setAttribute("String_Node_Str",descriptionParam);
      response.sendRedirect(entry.getURL().toString());
      return;
    }
    validate(duration,date,task,user);
    recordAndLogEntry(user,task,date,"String_Node_Str",request.getRemoteHost().toString(),user,duration,descriptionParam,geolocation);
  }
 catch (  ParseException pe) {
    throw new ServletException(pe);
  }
catch (  SQLException se) {
    throw new ServletException(se);
  }
  response.sendRedirect(request.getHeader("String_Node_Str"));
}

Fixed version (ground truth):
/** 
 * Handles the HTTP <code>POST</code> method.
 * @param request servlet request
 * @param response servlet response
 * @throws ServletException if a servlet-specific error occurs
 * @throws IOException if an I/O error occurs
 */
@Override protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
  String dateParam=request.getParameter("String_Node_Str");
  checkArgument(checkNotNull(dateParam).length() > 0,"String_Node_Str");
  String durationParam=request.getParameter("String_Node_Str");
  checkArgument(checkNotNull(durationParam).length() > 0,"String_Node_Str");
  String taskParam=request.getParameter("String_Node_Str");
  checkArgument(checkNotNull(taskParam).length() > 0,"String_Node_Str");
  String descriptionParam=request.getParameter("String_Node_Str");
  checkArgument(checkNotNull(descriptionParam).length() > 0,"String_Node_Str");
  DateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
  Employee user=(Employee)checkNotNull(request.getAttribute("String_Node_Str"),"String_Node_Str");
  BigDecimal duration=new BigDecimal(durationParam);
  Task task=sarariman.getTasks().getMap().get(Integer.parseInt(taskParam));
  String geolocation=request.getParameter("String_Node_Str");
  if (geolocation.isEmpty()) {
    geolocation=null;
  }
  try {
    Date date=dateFormat.parse(dateParam);
    TimesheetEntry entry=sarariman.getTimesheetEntries().get(task,user,date);
    if (entry.exists()) {
      request.getSession().setAttribute("String_Node_Str",true);
      request.getSession().setAttribute("String_Node_Str",durationParam);
      request.getSession().setAttribute("String_Node_Str",descriptionParam);
      response.sendRedirect(entry.getURL().toString());
      return;
    }
    validate(duration,date,task,user);
    recordAndLogEntry(user,task,date,"String_Node_Str",request.getRemoteHost().toString(),user,duration,descriptionParam,geolocation);
  }
 catch (  ParseException pe) {
    throw new ServletException(pe);
  }
catch (  SQLException se) {
    throw new ServletException(se);
  }
  response.sendRedirect(request.getHeader("String_Node_Str"));
}