Program: 64857
Project: 64857
Buggy source:
@Test public void testCreateObjectGraphPost() throws RestCallFailedException, JAXBException {
  StaticBid bid=new StaticBid();
  bid.setAmount(810);
  bid.setTime(System.currentTimeMillis());
  bid=restUpdate(bid,"String_Node_Str",StaticBid.class,false);
  StaticAuction auction=new StaticAuction();
  auction.setName("String_Node_Str");
  auction.setStartPrice(900);
  auction.setImage("String_Node_Str");
  auction.setEndPrice(1000);
  auction.setDescription("String_Node_Str");
  auction=restUpdate(auction,"String_Node_Str",StaticAuction.class,false);
  StaticUser user=new StaticUser();
  user.setName("String_Node_Str");
  StaticAddress address=new StaticAddress();
  address.setCity("String_Node_Str");
  address.setStreet("String_Node_Str");
  address.setPostalCode("String_Node_Str");
  address.setType("String_Node_Str");
  user.setAddress(address);
  user=restUpdate(user,"String_Node_Str",StaticUser.class,false);
  restUpdateBidirectionalRelationship(String.valueOf(bid.getId()),"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(bid.getId()),"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" + bid.getId() + "String_Node_Str";
  String expectedUserLink="String_Node_Str" + bid.getId() + "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 testCreateObjectGraphPost() throws RestCallFailedException, JAXBException {
  StaticBid bid=new StaticBid();
  bid.setAmount(810);
  bid.setTime(System.currentTimeMillis());
  bid=restUpdate(bid,"String_Node_Str",StaticBid.class,false);
  StaticAuction auction=new StaticAuction();
  auction.setName("String_Node_Str");
  auction.setStartPrice(900);
  auction.setImage("String_Node_Str");
  auction.setEndPrice(1000);
  auction.setDescription("String_Node_Str");
  auction=restUpdate(auction,"String_Node_Str",StaticAuction.class,false);
  StaticUser user=new StaticUser();
  user.setName("String_Node_Str");
  StaticAddress address=new StaticAddress();
  address.setCity("String_Node_Str");
  address.setStreet("String_Node_Str");
  address.setPostalCode("String_Node_Str");
  address.setType("String_Node_Str");
  user.setAddress(address);
  user=restUpdate(user,"String_Node_Str",StaticUser.class,false);
  restUpdateBidirectionalRelationship(String.valueOf(bid.getId()),"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(bid.getId()),"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"+ bid.getId()+ "String_Node_Str";
  String expectedUserLink=getServerURI() + DEFAULT_PU + "String_Node_Str"+ bid.getId()+ "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);
}