nus-yam/ex-repair huggingface dataset:
Program: 85464
Project: 85464
Buggy source:
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain chain) throws IOException, ServletException {
  HttpServletRequest request=(HttpServletRequest)req;
  HttpServletResponse response=(HttpServletResponse)resp;
  HttpSession session=request.getSession(true);
  String redirectString=SslUtil.getRedirectString(request,config.getServletContext(),secure.booleanValue());
  if (redirectString != null) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + redirectString + "String_Node_Str");
    }
    response.sendRedirect(response.encodeRedirectURL(redirectString));
    return;
  }
  User user=(User)session.getAttribute(Constants.USER_KEY);
  ServletContext context=config.getServletContext();
  String username=request.getRemoteUser();
  if ((username != null) && (user == null)) {
    ApplicationContext ctx=WebApplicationContextUtils.getRequiredWebApplicationContext(context);
    UserManager mgr=(UserManager)ctx.getBean("String_Node_Str");
    user=mgr.getUser(username);
    session.setAttribute(Constants.USER_KEY,user);
    if (session.getAttribute(Constants.LOGIN_COOKIE) != null) {
      session.removeAttribute(Constants.LOGIN_COOKIE);
      String loginCookie=mgr.createLoginCookie(username);
      RequestUtil.setCookie(response,Constants.LOGIN_COOKIE,loginCookie,request.getContextPath());
    }
  }
  chain.doFilter(request,response);
}

Fixed version (ground truth):
public void doFilter(ServletRequest req,ServletResponse resp,FilterChain chain) throws IOException, ServletException {
  HttpServletRequest request=(HttpServletRequest)req;
  HttpServletResponse response=(HttpServletResponse)resp;
  HttpSession session=request.getSession(true);
  LocaleContextHolder.setLocale(request.getLocale());
  String redirectString=SslUtil.getRedirectString(request,config.getServletContext(),secure.booleanValue());
  if (redirectString != null) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str" + redirectString + "String_Node_Str");
    }
    response.sendRedirect(response.encodeRedirectURL(redirectString));
    return;
  }
  User user=(User)session.getAttribute(Constants.USER_KEY);
  ServletContext context=config.getServletContext();
  String username=request.getRemoteUser();
  if ((username != null) && (user == null)) {
    ApplicationContext ctx=WebApplicationContextUtils.getRequiredWebApplicationContext(context);
    UserManager mgr=(UserManager)ctx.getBean("String_Node_Str");
    user=mgr.getUser(username);
    session.setAttribute(Constants.USER_KEY,user);
    if (session.getAttribute(Constants.LOGIN_COOKIE) != null) {
      session.removeAttribute(Constants.LOGIN_COOKIE);
      String loginCookie=mgr.createLoginCookie(username);
      RequestUtil.setCookie(response,Constants.LOGIN_COOKIE,loginCookie,request.getContextPath());
    }
  }
  chain.doFilter(request,response);
}
Program: 85465
Project: 85465
Buggy source:
/** 
 * This method inspects a POJO or Form and figures out its pojo/form equivalent.
 * @param o the object to inspect
 * @return the Class of the persistable object
 * @throws ClassNotFoundException
 * @throws InstantiationException
 * @throws IllegalAccessException
 */
public static Object getOpposingObject(Object o) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
  String name=o.getClass().getName();
  if (o instanceof BaseObject) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    name=StringUtils.replace(name,"String_Node_Str","String_Node_Str");
    name+="String_Node_Str";
  }
 else {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    name=StringUtils.replace(name,"String_Node_Str","String_Node_Str");
    name=name.substring(0,name.lastIndexOf("String_Node_Str"));
  }
  Class obj=Class.forName(name);
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + obj.getName());
  }
  return obj.newInstance();
}

Fixed version (ground truth):
/** 
 * This method inspects a POJO or Form and figures out its pojo/form equivalent.
 * @param o the object to inspect
 * @return the Class of the persistable object
 * @throws ClassNotFoundException
 * @throws InstantiationException
 * @throws IllegalAccessException
 */
public static Object getOpposingObject(Object o) throws ClassNotFoundException, InstantiationException, IllegalAccessException {
  String name=o.getClass().getName();
  if (o instanceof BaseObject) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    name=StringUtils.replace(name,"String_Node_Str","String_Node_Str");
    if (AopUtils.isCglibProxy(o)) {
      name=name.substring(0,name.indexOf("String_Node_Str"));
    }
    name+="String_Node_Str";
  }
 else {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    name=StringUtils.replace(name,"String_Node_Str","String_Node_Str");
    name=name.substring(0,name.lastIndexOf("String_Node_Str"));
  }
  Class obj=Class.forName(name);
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + obj.getName());
  }
  return obj.newInstance();
}
Program: 85466
Project: 85466
Buggy source:
public void pageBeginRender(PageEvent event){
  if ((getUser() == null) && !event.getRequestCycle().isRewinding()) {
    setUser(new User());
    getUser().addRole(new Role(Constants.USER_ROLE));
  }
 else   if (event.getRequestCycle().isRewinding()) {
    setUser(new User());
    getUser().addRole(new Role(Constants.USER_ROLE));
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  if (getSession().getAttribute("String_Node_Str") != null) {
    setMessage(getMessage("String_Node_Str"));
  }
}

Fixed version (ground truth):
public void pageBeginRender(PageEvent event){
  if ((getUser() == null) && !event.getRequestCycle().isRewinding()) {
    setUser(new User());
    setFrom("String_Node_Str");
    getUser().addRole(new Role(Constants.USER_ROLE));
  }
 else   if (event.getRequestCycle().isRewinding()) {
    setUser(new User());
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  if (getSession().getAttribute("String_Node_Str") != null) {
    setMessage(getMessage("String_Node_Str"));
  }
}
Program: 85467
Project: 85467
Buggy source:
public void edit(IRequestCycle cycle){
  UserForm nextPage=(UserForm)cycle.getPage("String_Node_Str");
  Object[] parameters=cycle.getServiceParameters();
  String username=(String)parameters[0];
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + username);
  }
  User user=getUserManager().getUser(username);
  nextPage.setUser(user);
  cycle.activate(nextPage);
}

Fixed version (ground truth):
public void edit(IRequestCycle cycle){
  UserForm nextPage=(UserForm)cycle.getPage("String_Node_Str");
  Object[] parameters=cycle.getServiceParameters();
  String username=(String)parameters[0];
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + username);
  }
  User user=getUserManager().getUser(username);
  user.setConfirmPassword(user.getPassword());
  nextPage.setUser(user);
  nextPage.setFrom("String_Node_Str");
  cycle.activate(nextPage);
}
Program: 85468
Project: 85468
Buggy source:
/** 
 * Convenience method for getting a i18n key's value with arguments.
 * @param msgKey
 * @param args
 * @return
 */
public String getText(String msgKey,Object[] args){
  return getMessageSourceAccessor().getMessage(msgKey,args);
}

Fixed version (ground truth):
/** 
 * Convenience method for getting a i18n key's value with arguments.
 * @param msgKey
 * @param args
 * @param locale the current locale
 * @return
 */
public String getText(String msgKey,Object[] args,Locale locale){
  return getMessageSourceAccessor().getMessage(msgKey,args,locale);
}
Program: 85470
Project: 85470
Buggy source:
public ModelAndView handleRequest(HttpServletRequest request,HttpServletResponse response) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  String username=request.getParameter("String_Node_Str");
  MessageSourceAccessor text=new MessageSourceAccessor(messageSource);
  if (username == null) {
    log.warn("String_Node_Str");
    request.setAttribute("String_Node_Str",text.getMessage("String_Node_Str",new Object[]{text.getMessage("String_Node_Str")}));
    return new ModelAndView("String_Node_Str");
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  try {
    User user=(User)mgr.getUser(username);
    StringBuffer msg=new StringBuffer();
    msg.append("String_Node_Str" + user.getPasswordHint());
    msg.append("String_Node_Str" + RequestUtil.getAppURL(request));
    message.setTo(user.getEmail());
    String subject=text.getMessage("String_Node_Str") + text.getMessage("String_Node_Str");
    message.setSubject(subject);
    message.setText(msg.toString());
    mailEngine.send(message);
    saveMessage(request,text.getMessage("String_Node_Str",new Object[]{username,user.getEmail()}));
  }
 catch (  Exception e) {
    saveError(request,text.getMessage("String_Node_Str",new Object[]{username}));
  }
  return new ModelAndView(new RedirectView(request.getContextPath()));
}

Fixed version (ground truth):
public ModelAndView handleRequest(HttpServletRequest request,HttpServletResponse response) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  String username=request.getParameter("String_Node_Str");
  MessageSourceAccessor text=new MessageSourceAccessor(messageSource,request.getLocale());
  if (username == null) {
    log.warn("String_Node_Str");
    request.setAttribute("String_Node_Str",text.getMessage("String_Node_Str",new Object[]{text.getMessage("String_Node_Str")}));
    return new ModelAndView("String_Node_Str");
  }
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  try {
    User user=(User)mgr.getUser(username);
    StringBuffer msg=new StringBuffer();
    msg.append("String_Node_Str" + user.getPasswordHint());
    msg.append("String_Node_Str" + RequestUtil.getAppURL(request));
    message.setTo(user.getEmail());
    String subject=text.getMessage("String_Node_Str") + text.getMessage("String_Node_Str");
    message.setSubject(subject);
    message.setText(msg.toString());
    mailEngine.send(message);
    saveMessage(request,text.getMessage("String_Node_Str",new Object[]{username,user.getEmail()}));
  }
 catch (  Exception e) {
    saveError(request,text.getMessage("String_Node_Str",new Object[]{username}));
  }
  return new ModelAndView(new RedirectView(request.getContextPath()));
}
Program: 85471
Project: 85471
Buggy source:
public ModelAndView onSubmit(HttpServletRequest request,HttpServletResponse response,Object command,BindException errors) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  User user=(User)command;
  String algorithm=(String)getConfiguration().get(Constants.ENC_ALGORITHM);
  if (algorithm == null) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    algorithm="String_Node_Str";
  }
  user.setPassword(StringUtil.encodePassword(user.getPassword(),algorithm));
  user.addRole(roleManager.getRole(Constants.USER_ROLE));
  try {
    mgr.saveUser(user);
  }
 catch (  UserExistsException e) {
    log.warn(e.getMessage());
    errors.rejectValue("String_Node_Str","String_Node_Str",new Object[]{user.getUsername(),user.getEmail()},"String_Node_Str");
    user.setPassword(user.getConfirmPassword());
    return showForm(request,response,errors);
  }
  String loginCookie=mgr.createLoginCookie(user.getUsername());
  RequestUtil.setCookie(response,Constants.LOGIN_COOKIE,loginCookie,request.getContextPath());
  saveMessage(request,getText("String_Node_Str",user.getUsername()));
  request.getSession().setAttribute(Constants.REGISTERED,Boolean.TRUE);
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + user.getUsername() + "String_Node_Str");
  }
  message.setSubject(getText("String_Node_Str"));
  sendUserMessage(user,getText("String_Node_Str"),RequestUtil.getAppURL(request));
  return new ModelAndView(new RedirectView(getSuccessView()));
}

Fixed version (ground truth):
public ModelAndView onSubmit(HttpServletRequest request,HttpServletResponse response,Object command,BindException errors) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  User user=(User)command;
  Locale locale=request.getLocale();
  String algorithm=(String)getConfiguration().get(Constants.ENC_ALGORITHM);
  if (algorithm == null) {
    if (log.isDebugEnabled()) {
      log.debug("String_Node_Str");
    }
    algorithm="String_Node_Str";
  }
  user.setPassword(StringUtil.encodePassword(user.getPassword(),algorithm));
  user.addRole(roleManager.getRole(Constants.USER_ROLE));
  try {
    mgr.saveUser(user);
  }
 catch (  UserExistsException e) {
    log.warn(e.getMessage());
    errors.rejectValue("String_Node_Str","String_Node_Str",new Object[]{user.getUsername(),user.getEmail()},"String_Node_Str");
    user.setPassword(user.getConfirmPassword());
    return showForm(request,response,errors);
  }
  String loginCookie=mgr.createLoginCookie(user.getUsername());
  RequestUtil.setCookie(response,Constants.LOGIN_COOKIE,loginCookie,request.getContextPath());
  saveMessage(request,getText("String_Node_Str",user.getUsername(),locale));
  request.getSession().setAttribute(Constants.REGISTERED,Boolean.TRUE);
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + user.getUsername() + "String_Node_Str");
  }
  message.setSubject(getText("String_Node_Str",locale));
  sendUserMessage(user,getText("String_Node_Str",locale),RequestUtil.getAppURL(request));
  return new ModelAndView(new RedirectView(getSuccessView()));
}
Program: 85472
Project: 85472
Buggy source:
protected Object formBackingObject(HttpServletRequest request) throws Exception {
  String username=request.getParameter("String_Node_Str");
  if (request.getSession().getAttribute("String_Node_Str") != null) {
    saveMessage(request,getText("String_Node_Str"));
  }
  User user=null;
  if (request.getRequestURI().indexOf("String_Node_Str") > -1) {
    user=mgr.getUser(getUser(request).getUsername());
  }
 else   if (!StringUtils.isBlank(username) && !"String_Node_Str".equals(request.getParameter("String_Node_Str"))) {
    user=mgr.getUser(username);
  }
 else {
    user=new User();
    user.addRole(new Role(Constants.USER_ROLE));
  }
  user.setConfirmPassword(user.getPassword());
  return user;
}

Fixed version (ground truth):
protected Object formBackingObject(HttpServletRequest request) throws Exception {
  String username=request.getParameter("String_Node_Str");
  if (request.getSession().getAttribute("String_Node_Str") != null) {
    saveMessage(request,getText("String_Node_Str",request.getLocale()));
  }
  User user=null;
  if (request.getRequestURI().indexOf("String_Node_Str") > -1) {
    user=mgr.getUser(getUser(request).getUsername());
  }
 else   if (!StringUtils.isBlank(username) && !"String_Node_Str".equals(request.getParameter("String_Node_Str"))) {
    user=mgr.getUser(username);
  }
 else {
    user=new User();
    user.addRole(new Role(Constants.USER_ROLE));
  }
  user.setConfirmPassword(user.getPassword());
  return user;
}
Program: 85475
Project: 85475
Buggy source:
public ActionForward delete(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  ActionMessages messages=new ActionMessages();
  UserForm userForm=(UserForm)form;
  UserManager mgr=(UserManager)getBean("String_Node_Str");
  mgr.removeUser(userForm.getUsername());
  messages.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage("String_Node_Str",userForm.getFullName()));
  saveMessages(request,messages);
  return mapping.findForward("String_Node_Str");
}

Fixed version (ground truth):
public ActionForward delete(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  ActionMessages messages=new ActionMessages();
  UserForm userForm=(UserForm)form;
  UserManager mgr=(UserManager)getBean("String_Node_Str");
  mgr.removeUser(userForm.getUsername());
  messages.add(ActionMessages.GLOBAL_MESSAGE,new ActionMessage("String_Node_Str",userForm.getFirstName() + ' ' + userForm.getLastName()));
  saveMessages(request,messages);
  return mapping.findForward("String_Node_Str");
}
Program: 85477
Project: 85477
Buggy source:
/** 
 * Returns the email.  This is an optional field for specifying a different e-mail than the username.
 * @return String
 * @hibernate.property column="email" not-null="false" unique="true"
 */
public String getEmail(){
  return email;
}

Fixed version (ground truth):
/** 
 * Returns the email.  This is an optional field for specifying a different e-mail than the username.
 * @return String
 * @hibernate.property 
 * @hibernate.column name="email" not-null="true" unique="true"
 */
public String getEmail(){
  return email;
}
Program: 85478
Project: 85478
Buggy source:
/** 
 * Returns the email.  This is an optional field for specifying a different e-mail than the username.
 * @return String
 * @hibernate.property column="email" not-null="false" unique="true"
 */
public String getEmail(){
  return email;
}

Fixed version (ground truth):
/** 
 * Returns the email.  This is an optional field for specifying a different e-mail than the username.
 * @return String
 * @hibernate.property 
 * @hibernate.column name="email" not-null="true" unique="true"
 */
public String getEmail(){
  return email;
}
Program: 85479
Project: 85479
Buggy source:
/** 
 * Returns the email.  This is an optional field for specifying a different e-mail than the username.
 * @return String
 * @struts.validator type="required"
 * @struts.validator type="email"
 * @hibernate.property column="email" not-null="false" unique="true"
 */
public String getEmail(){
  return email;
}

Fixed version (ground truth):
/** 
 * Returns the email.  This is an optional field for specifying a different e-mail than the username.
 * @return String
 * @struts.validator type="required"
 * @struts.validator type="email"
 * @hibernate.property 
 * @hibernate.column name="email" not-null="true" unique="true"
 */
public String getEmail(){
  return email;
}
Program: 85483
Project: 85483
Buggy source:
public void saveMessage(HttpServletRequest request,Object msg){
  List messages=(List)request.getSession().getAttribute("String_Node_Str");
  if (messages == null) {
    messages=new ArrayList();
  }
  messages.add(msg);
  request.getSession().setAttribute("String_Node_Str",messages);
}

Fixed version (ground truth):
public void saveMessage(HttpServletRequest request,String msg){
  List messages=(List)request.getSession().getAttribute("String_Node_Str");
  if (messages == null) {
    messages=new ArrayList();
  }
  messages.add(msg);
  request.getSession().setAttribute("String_Node_Str",messages);
}
Program: 85484
Project: 85484
Buggy source:
/** 
 * Extract the error messages from the given ObjectError list.
 */
private String getErrorMessages(List fes) throws NoSuchMessageException, JspException {
  StringBuffer message=new StringBuffer();
  for (int i=0; i < fes.size(); i++) {
    ObjectError error=(ObjectError)fes.get(i);
    message.append(this.requestContext.getMessage(error,true));
  }
  return message.toString();
}

Fixed version (ground truth):
/** 
 * Extract the error messages from the given ObjectError list.
 */
private String getErrorMessages(List fes) throws NoSuchMessageException {
  StringBuffer message=new StringBuffer();
  for (int i=0; i < fes.size(); i++) {
    ObjectError error=(ObjectError)fes.get(i);
    message.append(this.requestContext.getMessage(error,true));
  }
  return message.toString();
}
Program: 85485
Project: 85485
Buggy source:
/** 
 * Convenience method used by tests to populate an object from a ResourceBundle
 * @param obj an initialized object
 * @param rb a resource bundle
 * @return a populated object
 */
public static Object populateObject(Object obj,ResourceBundle rb){
  try {
    if (obj == null) {
      obj=obj.getClass().newInstance();
    }
    Map map=convertBundleToMap(rb);
    BeanUtils.copyProperties(obj,map);
  }
 catch (  Exception e) {
    e.printStackTrace();
    log.error("String_Node_Str" + e.getMessage());
  }
  return obj;
}

Fixed version (ground truth):
/** 
 * Convenience method used by tests to populate an object from a ResourceBundle
 * @param obj an initialized object
 * @param rb a resource bundle
 * @return a populated object
 */
public static Object populateObject(Object obj,ResourceBundle rb){
  try {
    Map map=convertBundleToMap(rb);
    BeanUtils.copyProperties(obj,map);
  }
 catch (  Exception e) {
    e.printStackTrace();
    log.error("String_Node_Str" + e.getMessage());
  }
  return obj;
}
Program: 85486
Project: 85486
Buggy source:
/** 
 * Encode a string using Base64 encoding. Used when storing passwords as cookies. This is weak encoding in that anyone can use the decodeString routine to reverse the encoding.
 * @param str
 * @return String
 */
public static String encodeString(String str){
  sun.misc.BASE64Encoder encoder=new sun.misc.BASE64Encoder();
  return new String(encoder.encodeBuffer(str.getBytes())).trim();
}

Fixed version (ground truth):
/** 
 * Encode a string using Base64 encoding. Used when storing passwords as cookies. This is weak encoding in that anyone can use the decodeString routine to reverse the encoding.
 * @param str
 * @return String
 */
public static String encodeString(String str){
  sun.misc.BASE64Encoder encoder=new sun.misc.BASE64Encoder();
  return encoder.encodeBuffer(str.getBytes()).trim();
}
Program: 85487
Project: 85487
Buggy source:
public int hashCode(Object o){
  return HashCodeBuilder.reflectionHashCode(this);
}

Fixed version (ground truth):
public int hashCode(){
  return HashCodeBuilder.reflectionHashCode(this);
}
Program: 85488
Project: 85488
Buggy source:
public void contextDestroyed(ServletContextEvent sce){
  users=null;
  counter=0;
}

Fixed version (ground truth):
public void contextDestroyed(ServletContextEvent event){
}
Program: 85489
Project: 85489
Buggy source:
protected void setUp() throws Exception {
  dao=(LookupDAO)ctx.getBean("String_Node_Str");
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  dao=(LookupDAO)ctx.getBean("String_Node_Str");
}
Program: 85490
Project: 85490
Buggy source:
public void testGetUserInvalid() throws Exception {
  try {
    user=dao.getUser("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  DAOException d) {
    if (log.isDebugEnabled()) {
      log.debug(d);
    }
    assertTrue(d != null);
  }
}

Fixed version (ground truth):
public void testGetUserInvalid() throws Exception {
  try {
    user=dao.getUser("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  DAOException d) {
    if (log.isDebugEnabled()) {
      log.debug(d);
    }
    assertNotNull(d);
  }
}
Program: 85491
Project: 85491
Buggy source:
protected void setUp() throws Exception {
  dao=(UserDAO)ctx.getBean("String_Node_Str");
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  dao=(UserDAO)ctx.getBean("String_Node_Str");
}
Program: 85492
Project: 85492
Buggy source:
public void testRemoveUser() throws Exception {
  dao.removeUser("String_Node_Str");
  try {
    user=dao.getUser("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  DAOException d) {
    if (log.isDebugEnabled()) {
      log.debug(d);
    }
    assertTrue(d != null);
  }
}

Fixed version (ground truth):
public void testRemoveUser() throws Exception {
  dao.removeUser("String_Node_Str");
  try {
    user=dao.getUser("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  DAOException d) {
    if (log.isDebugEnabled()) {
      log.debug(d);
    }
    assertNotNull(d);
  }
}
Program: 85493
Project: 85493
Buggy source:
protected void tearDown(){
  dao=null;
}

Fixed version (ground truth):
protected void tearDown() throws Exception {
  super.tearDown();
  dao=null;
}
Program: 85494
Project: 85494
Buggy source:
protected void setUp() throws Exception {
  mgr=(LookupManager)ctx.getBean("String_Node_Str");
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  mgr=(LookupManager)ctx.getBean("String_Node_Str");
}
Program: 85495
Project: 85495
Buggy source:
protected void setUp() throws Exception {
  mgr=(UserManager)ctx.getBean("String_Node_Str");
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  mgr=(UserManager)ctx.getBean("String_Node_Str");
}
Program: 85496
Project: 85496
Buggy source:
public void testAddAndRemoveUser() throws Exception {
  user=new User();
  user=(User)populate(user);
  user.addRole(Constants.USER_ROLE);
  user=mgr.saveUser(user);
  assertTrue(user.getUsername().equals("String_Node_Str"));
  assertTrue(user.getRoles().size() == 1);
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  mgr.removeUser(user.getUsername());
  try {
    user=mgr.getUser("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  Exception e) {
    if (log.isDebugEnabled()) {
      log.debug(e);
    }
    assertTrue(e != null);
  }
}

Fixed version (ground truth):
public void testAddAndRemoveUser() throws Exception {
  user=new User();
  user=(User)populate(user);
  user.addRole(Constants.USER_ROLE);
  user=mgr.saveUser(user);
  assertTrue(user.getUsername().equals("String_Node_Str"));
  assertTrue(user.getRoles().size() == 1);
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str");
  }
  mgr.removeUser(user.getUsername());
  try {
    user=mgr.getUser("String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  Exception e) {
    if (log.isDebugEnabled()) {
      log.debug(e);
    }
    assertNotNull(e);
  }
}
Program: 85497
Project: 85497
Buggy source:
public void tearDown(){
  ctx=null;
}

Fixed version (ground truth):
public void tearDown() throws Exception {
  super.tearDown();
  ctx=null;
}
Program: 85498
Project: 85498
Buggy source:
/** 
 * load resources and setup values
 * @throws Exception an exception
 */
protected void setUp() throws Exception {
  messages=ResourceBundle.getBundle("String_Node_Str");
  testParams=ResourceBundle.getBundle(this.getClass().getName());
  conversation=new WebConversation();
}

Fixed version (ground truth):
/** 
 * load resources and setup values
 * @throws Exception an exception
 */
protected void setUp() throws Exception {
  super.setUp();
  messages=ResourceBundle.getBundle("String_Node_Str");
  testParams=ResourceBundle.getBundle(this.getClass().getName());
  conversation=new WebConversation();
}
Program: 85499
Project: 85499
Buggy source:
protected void setUp() throws Exception {
  listener=new StartupListener();
  context=config.getServletContext();
}

Fixed version (ground truth):
protected void setUp() throws Exception {
  super.setUp();
  listener=new StartupListener();
  context=config.getServletContext();
}
Program: 85500
Project: 85500
Buggy source:
protected void tearDown() throws Exception {
  listener=null;
}

Fixed version (ground truth):
protected void tearDown() throws Exception {
  super.tearDown();
  listener=null;
}
Program: 85503
Project: 85503
Buggy source:
private void sendNewUserEmail(User user) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + user.getUsername() + "String_Node_Str");
  }
  String fullName=user.getFirstName() + "String_Node_Str" + user.getLastName();
  StringBuffer msg=new StringBuffer();
  msg.append(getMessageSourceAccessor().getMessage("String_Node_Str",fullName));
  msg.append("String_Node_Str" + getMessageSourceAccessor().getMessage("String_Node_Str"));
  msg.append("String_Node_Str" + user.getUsername() + "String_Node_Str");
  msg.append(getMessageSourceAccessor().getMessage("String_Node_Str") + "String_Node_Str");
  msg.append(user.getPassword());
  msg.append("String_Node_Str" + RequestUtil.getAppURL(request) + request.getContextPath());
  String subject=getMessageSourceAccessor().getMessage("String_Node_Str");
  try {
    MailSender.sendTextMessage(Constants.DEFAULT_FROM,user.getEmail(),null,subject,msg.toString());
  }
 catch (  MessagingException me) {
    log.warn("String_Node_Str");
  }
}

Fixed version (ground truth):
private void sendNewUserEmail(User user,HttpServletRequest request) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + user.getUsername() + "String_Node_Str");
  }
  String fullName=user.getFirstName() + "String_Node_Str" + user.getLastName();
  StringBuffer msg=new StringBuffer();
  msg.append(getMessageSourceAccessor().getMessage("String_Node_Str",fullName));
  msg.append("String_Node_Str" + getMessageSourceAccessor().getMessage("String_Node_Str"));
  msg.append("String_Node_Str" + user.getUsername() + "String_Node_Str");
  msg.append(getMessageSourceAccessor().getMessage("String_Node_Str") + "String_Node_Str");
  msg.append(user.getPassword());
  msg.append("String_Node_Str" + RequestUtil.getAppURL(request) + request.getContextPath());
  String subject=getMessageSourceAccessor().getMessage("String_Node_Str");
  try {
    MailSender.sendTextMessage(Constants.DEFAULT_FROM,user.getEmail(),null,subject,msg.toString());
  }
 catch (  MessagingException me) {
    log.warn("String_Node_Str");
  }
}
Program: 85504
Project: 85504
Buggy source:
private void sendNewUserEmail(User user,HttpServletRequest request) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + user.getUsername() + "String_Node_Str");
  }
  String fullName=user.getFirstName() + "String_Node_Str" + user.getLastName();
  StringBuffer msg=new StringBuffer();
  msg.append(getMessageSourceAccessor().getMessage("String_Node_Str",fullName));
  msg.append("String_Node_Str" + getMessageSourceAccessor().getMessage("String_Node_Str"));
  msg.append("String_Node_Str" + user.getUsername() + "String_Node_Str");
  msg.append(getMessageSourceAccessor().getMessage("String_Node_Str") + "String_Node_Str");
  msg.append(user.getPassword());
  msg.append("String_Node_Str" + RequestUtil.getAppURL(request) + request.getContextPath());
  String subject=getMessageSourceAccessor().getMessage("String_Node_Str");
  try {
    MailSender.sendTextMessage(Constants.DEFAULT_FROM,user.getEmail(),null,subject,msg.toString());
  }
 catch (  MessagingException me) {
    log.warn("String_Node_Str");
  }
}

Fixed version (ground truth):
private void sendNewUserEmail(User user,HttpServletRequest request) throws Exception {
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + user.getUsername() + "String_Node_Str");
  }
  String fullName=user.getFirstName() + "String_Node_Str" + user.getLastName();
  StringBuffer msg=new StringBuffer();
  msg.append(getMessageSourceAccessor().getMessage("String_Node_Str",fullName));
  msg.append("String_Node_Str" + getMessageSourceAccessor().getMessage("String_Node_Str"));
  msg.append("String_Node_Str" + user.getUsername() + "String_Node_Str");
  msg.append(getMessageSourceAccessor().getMessage("String_Node_Str") + "String_Node_Str");
  msg.append(user.getConfirmPassword());
  msg.append("String_Node_Str" + RequestUtil.getAppURL(request) + request.getContextPath());
  String subject=getMessageSourceAccessor().getMessage("String_Node_Str");
  try {
    MailSender.sendTextMessage(Constants.DEFAULT_FROM,user.getEmail(),null,subject,msg.toString());
  }
 catch (  MessagingException me) {
    log.warn("String_Node_Str");
  }
}
Program: 85506
Project: 85506
Buggy source:
/** 
 * Validates that two fields match.
 * @param bean
 * @param va
 * @param field
 * @param errors
 * @param request
 * @return boolean
 */
public static boolean validateTwoFields(Object bean,ValidatorAction va,Field field,ActionErrors errors,HttpServletRequest request){
  String value=ValidatorUtils.getValueAsString(bean,field.getProperty());
  String sProperty2=field.getVarValue("String_Node_Str");
  String value2=ValidatorUtils.getValueAsString(bean,sProperty2);
  if (!GenericValidator.isBlankOrNull(value)) {
    try {
      if (!value.equals(value2)) {
        errors.add(field.getKey(),Resources.getActionMessage(request,va,field));
        return false;
      }
    }
 catch (    Exception e) {
      errors.add(field.getKey(),Resources.getActionMessage(request,va,field));
      return false;
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Validates that two fields match.
 * @param bean
 * @param va
 * @param field
 * @param errors
 * @param request
 * @return boolean
 */
public static boolean validateTwoFields(Object bean,ValidatorAction va,Field field,ActionMessages errors,HttpServletRequest request){
  String value=ValidatorUtils.getValueAsString(bean,field.getProperty());
  String sProperty2=field.getVarValue("String_Node_Str");
  String value2=ValidatorUtils.getValueAsString(bean,sProperty2);
  if (!GenericValidator.isBlankOrNull(value)) {
    try {
      if (!value.equals(value2)) {
        errors.add(field.getKey(),Resources.getActionMessage(request,va,field));
        return false;
      }
    }
 catch (    Exception e) {
      errors.add(field.getKey(),Resources.getActionMessage(request,va,field));
      return false;
    }
  }
  return true;
}
Program: 85509
Project: 85509
Buggy source:
public boolean validate(CreditCard creditCard){
  Character lastDigit=creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);
  if (Integer.parseInt(lastDigit.toString()) % 2 != 0) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean validate(CreditCard creditCard){
  Character lastDigit=creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);
  if (Integer.parseInt(lastDigit.toString()) % 2 == 0) {
    return true;
  }
 else {
    return false;
  }
}
Program: 85510
Project: 85510
Buggy source:
public boolean validate(CreditCard09 creditCard){
  Character lastDigit=creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);
  if (Integer.parseInt(lastDigit.toString()) % 2 != 0) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean validate(CreditCard09 creditCard){
  Character lastDigit=creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);
  if (Integer.parseInt(lastDigit.toString()) % 2 == 0) {
    return true;
  }
 else {
    return false;
  }
}
Program: 85511
Project: 85511
Buggy source:
@WebResult(name="String_Node_Str") public boolean validate(CreditCard12 creditCard){
  Character lastDigit=creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);
  if (Integer.parseInt(lastDigit.toString()) % 2 != 0) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@WebResult(name="String_Node_Str") public boolean validate(CreditCard12 creditCard){
  Character lastDigit=creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);
  if (Integer.parseInt(lastDigit.toString()) % 2 == 0) {
    return true;
  }
 else {
    return false;
  }
}
Program: 85512
Project: 85512
Buggy source:
public boolean validate(@WebParam(name="String_Node_Str",mode=IN) CreditCard13 creditCard){
  Character lastDigit=creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);
  if (Integer.parseInt(lastDigit.toString()) % 2 != 0) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean validate(@WebParam(name="String_Node_Str",mode=IN) CreditCard13 creditCard){
  Character lastDigit=creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);
  if (Integer.parseInt(lastDigit.toString()) % 2 == 0) {
    return true;
  }
 else {
    return false;
  }
}
Program: 85513
Project: 85513
Buggy source:
public boolean validate(CreditCard15 creditCard){
  Character lastDigit=creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);
  if (Integer.parseInt(lastDigit.toString()) % 2 != 0) {
    return true;
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean validate(CreditCard15 creditCard){
  Character lastDigit=creditCard.getNumber().charAt(creditCard.getNumber().length() - 1);
  if (Integer.parseInt(lastDigit.toString()) % 2 == 0) {
    return true;
  }
 else {
    return false;
  }
}
Program: 85514
Project: 85514
Buggy source:
@Test public void shouldCheckCreditCardValidity() throws MalformedURLException {
  Endpoint endpoint=Endpoint.publish("String_Node_Str",new CardValidator());
  assertTrue(endpoint.isPublished());
  assertEquals("String_Node_Str",endpoint.getBinding().getBindingID());
  URL wsdlDocumentLocation=new URL("String_Node_Str");
  String namespaceURI="String_Node_Str";
  String servicePart="String_Node_Str";
  String portName="String_Node_Str";
  QName serviceQN=new QName(namespaceURI,servicePart);
  QName portQN=new QName(namespaceURI,portName);
  Service service=Service.create(wsdlDocumentLocation,serviceQN);
  Validator cardValidator=service.getPort(portQN,Validator.class);
  CreditCard creditCard=new CreditCard("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  endpoint.stop();
  assertFalse(endpoint.isPublished());
}

Fixed version (ground truth):
@Test public void shouldCheckCreditCardValidity() throws MalformedURLException {
  Endpoint endpoint=Endpoint.publish("String_Node_Str",new CardValidator());
  assertTrue(endpoint.isPublished());
  assertEquals("String_Node_Str",endpoint.getBinding().getBindingID());
  URL wsdlDocumentLocation=new URL("String_Node_Str");
  String namespaceURI="String_Node_Str";
  String servicePart="String_Node_Str";
  String portName="String_Node_Str";
  QName serviceQN=new QName(namespaceURI,servicePart);
  QName portQN=new QName(namespaceURI,portName);
  Service service=Service.create(wsdlDocumentLocation,serviceQN);
  Validator cardValidator=service.getPort(portQN,Validator.class);
  CreditCard creditCard=new CreditCard("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  endpoint.stop();
  assertFalse(endpoint.isPublished());
}
Program: 85515
Project: 85515
Buggy source:
@Test public void shouldCheckCreditCardValidity(){
  CreditCard creditCard=new CreditCard("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator cardValidator=new CardValidator();
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
}

Fixed version (ground truth):
@Test public void shouldCheckCreditCardValidity(){
  CreditCard creditCard=new CreditCard("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator cardValidator=new CardValidator();
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
}
Program: 85516
Project: 85516
Buggy source:
@Test public void shouldCheckCreditCardValidity(){
  CreditCard10 creditCard=new CreditCard10("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator10 cardValidator=new CardValidator10();
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
}

Fixed version (ground truth):
@Test public void shouldCheckCreditCardValidity(){
  CreditCard10 creditCard=new CreditCard10("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator10 cardValidator=new CardValidator10();
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
}
Program: 85517
Project: 85517
Buggy source:
@Test public void shouldCheckCreditCardValidity(){
  CreditCard10 creditCard=new CreditCard10("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator10 cardValidator=new CardValidator10();
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
}

Fixed version (ground truth):
@Test public void shouldCheckCreditCardValidity(){
  CreditCard10 creditCard=new CreditCard10("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator10 cardValidator=new CardValidator10();
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
}
Program: 85518
Project: 85518
Buggy source:
@Test public void shouldCheckCreditCardValidity(){
  CreditCard12 creditCard=new CreditCard12("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator12 cardValidator=new CardValidator12();
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
}

Fixed version (ground truth):
@Test public void shouldCheckCreditCardValidity(){
  CreditCard12 creditCard=new CreditCard12("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator12 cardValidator=new CardValidator12();
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
}
Program: 85519
Project: 85519
Buggy source:
@Test public void shouldCheckCreditCardValidity(){
  CreditCard13 creditCard=new CreditCard13("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator13 cardValidator=new CardValidator13();
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
}

Fixed version (ground truth):
@Test public void shouldCheckCreditCardValidity(){
  CreditCard13 creditCard=new CreditCard13("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator13 cardValidator=new CardValidator13();
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
}
Program: 85520
Project: 85520
Buggy source:
@Test public void shouldCheckCreditCardValidity(){
  CreditCard15 creditCard=new CreditCard15("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator15 cardValidator=new CardValidator15();
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
}

Fixed version (ground truth):
@Test public void shouldCheckCreditCardValidity(){
  CreditCard15 creditCard=new CreditCard15("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator15 cardValidator=new CardValidator15();
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
}
Program: 85521
Project: 85521
Buggy source:
@Test public void shouldCheckCreditCardValidity(){
  CreditCard17 creditCard=new CreditCard17("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator17 cardValidator=new CardValidator17();
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
}

Fixed version (ground truth):
@Test public void shouldCheckCreditCardValidity(){
  CreditCard17 creditCard=new CreditCard17("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator17 cardValidator=new CardValidator17();
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertTrue("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
  creditCard.setNumber("String_Node_Str");
  assertFalse("String_Node_Str",cardValidator.validate(creditCard));
}
Program: 85522
Project: 85522
Buggy source:
@Test(expected=CardValidatorRTException22.class) public void shouldThrowACardValidatorRTException(){
  CreditCard22 creditCard=new CreditCard22("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator22 cardValidator=new CardValidator22();
  assertFalse("String_Node_Str",cardValidator.validateWithRTException(creditCard));
  creditCard.setNumber("String_Node_Str");
  cardValidator.validateWithRTException(creditCard);
}

Fixed version (ground truth):
@Test(expected=CardValidatorRTException22.class) public void shouldThrowACardValidatorRTException(){
  CreditCard22 creditCard=new CreditCard22("String_Node_Str","String_Node_Str",1234,"String_Node_Str");
  CardValidator22 cardValidator=new CardValidator22();
  assertTrue("String_Node_Str",cardValidator.validateWithRTException(creditCard));
  creditCard.setNumber("String_Node_Str");
  cardValidator.validateWithRTException(creditCard);
}