Program: 82465
Project: 82465
Buggy source:
/** 
 * Test that removing cookies works correctly.
 */
public void testRemoveCookie(){
  clearCookies();
  Cookies.setCookie("String_Node_Str","String_Node_Str");
  Cookies.setCookie("String_Node_Str","String_Node_Str");
  Cookies.setCookie("String_Node_Str","String_Node_Str");
  Collection<String> cookies=Cookies.getCookieNames();
  assertEquals(3,cookies.size());
  Cookies.removeCookie("String_Node_Str");
  assertEquals("String_Node_Str",Cookies.getCookie("String_Node_Str"));
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  assertEquals("String_Node_Str",Cookies.getCookie("String_Node_Str"));
  Cookies.removeCookie("String_Node_Str");
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  assertEquals("String_Node_Str",Cookies.getCookie("String_Node_Str"));
  Cookies.removeCookie("String_Node_Str");
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  cookies=Cookies.getCookieNames();
  assertEquals(0,cookies.size());
  Cookies.setCookie("String_Node_Str","String_Node_Str");
  Cookies.removeCookie("String_Node_Str");
  cookies=Cookies.getCookieNames();
  assertEquals(0,cookies.size());
  Cookies.setUriEncode(false);
  Cookies.setCookie("String_Node_Str","String_Node_Str");
  Cookies.removeCookie("String_Node_Str");
  cookies=Cookies.getCookieNames();
  assertEquals(0,cookies.size());
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
}

Fixed version (ground truth):
/** 
 * Test that removing cookies works correctly.
 */
public void testRemoveCookie(){
  clearCookies();
  int curCount=Cookies.getCookieNames().size();
  Cookies.setCookie("String_Node_Str","String_Node_Str");
  Cookies.setCookie("String_Node_Str","String_Node_Str");
  Cookies.setCookie("String_Node_Str","String_Node_Str");
  Collection<String> cookies=Cookies.getCookieNames();
  assertEquals(curCount + 3,cookies.size());
  Cookies.removeCookie("String_Node_Str");
  assertEquals("String_Node_Str",Cookies.getCookie("String_Node_Str"));
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  assertEquals("String_Node_Str",Cookies.getCookie("String_Node_Str"));
  Cookies.removeCookie("String_Node_Str");
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  assertEquals("String_Node_Str",Cookies.getCookie("String_Node_Str"));
  Cookies.removeCookie("String_Node_Str");
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  assertEquals(null,Cookies.getCookie("String_Node_Str"));
  cookies=Cookies.getCookieNames();
  assertEquals(curCount,cookies.size());
  Cookies.setCookie("String_Node_Str","String_Node_Str");
  Cookies.removeCookie("String_Node_Str");
  cookies=Cookies.getCookieNames();
  assertEquals(curCount,cookies.size());
  Cookies.setUriEncode(false);
  Cookies.setCookie("String_Node_Str","String_Node_Str");
  Cookies.removeCookie("String_Node_Str");
  cookies=Cookies.getCookieNames();
  assertEquals(curCount,cookies.size());
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
  try {
    Cookies.setCookie("String_Node_Str","String_Node_Str");
    fail("String_Node_Str");
  }
 catch (  IllegalArgumentException e) {
  }
}