Program: 64855
Project: 64855
Buggy source:
@Test public void testCreateObjectGraphPut() throws RestCallFailedException, JAXBException {
  StaticBid bid=new StaticBid();
  bid.setId(777);
  bid.setAmount(510);
  bid.setTime(System.currentTimeMillis());
  bid=restCreate(bid,"String_Node_Str",StaticBid.class,false);
  StaticAuction auction=new StaticAuction();
  auction.setId(13012);
  auction.setName("String_Node_Str");
  auction.setStartPrice(500);
  auction.setImage("String_Node_Str");
  auction.setEndPrice(1000);
  auction.setDescription("String_Node_Str");
  auction=restCreate(auction,"String_Node_Str",StaticAuction.class,false);
  StaticUser user=new StaticUser();
  user.setId(466);
  user.setName("String_Node_Str");
  StaticAddress address=new StaticAddress();
  address.setCity("String_Node_Str");
  address.setId(123456);
  address.setStreet("String_Node_Str");
  address.setPostalCode("String_Node_Str");
  address.setType("String_Node_Str");
  user.setAddress(address);
  user=restCreate(user,"String_Node_Str",StaticUser.class,false);
  restUpdateBidirectionalRelationship(String.valueOf(777),"String_Node_Str","String_Node_Str",auction,"String_Node_Str",MediaType.APPLICATION_JSON_TYPE,MediaType.APPLICATION_JSON_TYPE,"String_Node_Str",true);
  String bidJsonResponse=restUpdateBidirectionalRelationship(String.valueOf(777),"String_Node_Str","String_Node_Str",user,"String_Node_Str",MediaType.APPLICATION_JSON_TYPE,MediaType.APPLICATION_JSON_TYPE,null,true);
  String expectedAuctionLink="String_Node_Str";
  String expectedUserLink="String_Node_Str";
  assertTrue(bidJsonResponse.toUpperCase().indexOf(expectedAuctionLink.toUpperCase()) != -1);
  assertTrue(bidJsonResponse.toUpperCase().indexOf(expectedUserLink.toUpperCase()) != -1);
  StaticAuction auctionByLink=restReadByHref(expectedAuctionLink,"String_Node_Str",MediaType.APPLICATION_JSON_TYPE);
  StaticUser userByLink=restReadByHref(expectedUserLink,"String_Node_Str",MediaType.APPLICATION_JSON_TYPE);
  assertTrue("String_Node_Str",userByLink.getName().equals(user.getName()));
  assertTrue("String_Node_Str",auctionByLink.getName().equals(auction.getName()));
}

Fixed version (ground truth):
@Test public void testCreateObjectGraphPut() throws RestCallFailedException, JAXBException {
  StaticBid bid=new StaticBid();
  bid.setId(777);
  bid.setAmount(510);
  bid.setTime(System.currentTimeMillis());
  bid=restCreate(bid,"String_Node_Str",StaticBid.class);
  StaticAuction auction=new StaticAuction();
  auction.setId(13012);
  auction.setName("String_Node_Str");
  auction.setStartPrice(500);
  auction.setImage("String_Node_Str");
  auction.setEndPrice(1000);
  auction.setDescription("String_Node_Str");
  auction=restCreate(auction,"String_Node_Str",StaticAuction.class);
  StaticUser user=new StaticUser();
  user.setId(466);
  user.setName("String_Node_Str");
  StaticAddress address=new StaticAddress();
  address.setCity("String_Node_Str");
  address.setId(123456);
  address.setStreet("String_Node_Str");
  address.setPostalCode("String_Node_Str");
  address.setType("String_Node_Str");
  user.setAddress(address);
  user=restCreate(user,"String_Node_Str",StaticUser.class);
  restUpdateBidirectionalRelationship(String.valueOf(777),"String_Node_Str","String_Node_Str",auction,"String_Node_Str",MediaType.APPLICATION_JSON_TYPE,MediaType.APPLICATION_JSON_TYPE,"String_Node_Str",true);
  String bidJsonResponse=restUpdateBidirectionalRelationship(String.valueOf(777),"String_Node_Str","String_Node_Str",user,"String_Node_Str",MediaType.APPLICATION_JSON_TYPE,MediaType.APPLICATION_JSON_TYPE,null,true);
  String expectedAuctionLink=getServerURI() + DEFAULT_PU + "String_Node_Str";
  String expectedUserLink=getServerURI() + DEFAULT_PU + "String_Node_Str";
  assertTrue(bidJsonResponse.toUpperCase().indexOf(expectedAuctionLink.toUpperCase()) != -1);
  assertTrue(bidJsonResponse.toUpperCase().indexOf(expectedUserLink.toUpperCase()) != -1);
  StaticAuction auctionByLink=restReadByHref(expectedAuctionLink,"String_Node_Str",MediaType.APPLICATION_JSON_TYPE);
  StaticUser userByLink=restReadByHref(expectedUserLink,"String_Node_Str",MediaType.APPLICATION_JSON_TYPE);
  assertTrue("String_Node_Str",userByLink.getName().equals(user.getName()));
  assertTrue("String_Node_Str",auctionByLink.getName().equals(auction.getName()));
  dbDelete(bid);
  dbDelete(user);
  dbDelete(auction);
}