Program: 37536
Project: 37536
Buggy source:
/** 
 * test query exist v4 network.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testQueryExistV4Network(){
  Long domainId=1L;
  List<Network> networks=networkQueryDao.queryAsInnerObjects(domainId,ModelType.DOMAIN);
  assertNotNull(networks);
  assertEquals(1,networks.size());
  Network network=networks.get(0);
  assertEquals("String_Node_Str",network.getHandle());
  assertEquals("String_Node_Str",network.getStartAddress());
  assertEquals("String_Node_Str",network.getEndAddress());
  assertEquals(IpVersion.V4,network.getIpVersion());
  assertEquals("String_Node_Str",network.getName());
  assertEquals("String_Node_Str",network.getType());
  assertEquals("String_Node_Str",network.getCountry());
  assertEquals("String_Node_Str",network.getParentHandle());
  assertEquals("String_Node_Str",network.getPort43());
  assertEquals("String_Node_Str",network.getLang());
  List<String> statusList=network.getStatus();
  assertThat(statusList,CoreMatchers.hasItems("String_Node_Str","String_Node_Str"));
  List<Event> events=network.getEvents();
  assertNotNull(events);
  assertEquals(events.size(),1);
  Event event=events.get(0);
  assertNotNull(event);
  assertEquals(event.getEventAction(),"String_Node_Str");
  assertEquals(event.getEventActor(),"String_Node_Str");
  DateFormat dateFormat=new SimpleDateFormat("String_Node_Str");
  assertEquals(dateFormat.format(event.getEventDate()),"String_Node_Str");
  List<Link> networkLinks=network.getLinks();
  assertNotNull(networkLinks);
  assertEquals(1,networkLinks.size());
  Link networkLink=networkLinks.get(0);
  assertNotNull(networkLink);
  assertEquals("String_Node_Str",networkLink.getValue());
  assertEquals("String_Node_Str",networkLink.getHref());
  List<Remark> remarks=network.getRemarks();
  assertNotNull(remarks);
  assertTrue(remarks.size() > 0);
  Remark remark=remarks.get(0);
  assertNotNull(remark);
  assertEquals("String_Node_Str",remark.getTitle());
  assertThat(remark.getDescription(),CoreMatchers.hasItems("String_Node_Str","String_Node_Str"));
  List<Link> links=remark.getLinks();
  assertNotNull(links);
  assertEquals(1,links.size());
  Link link=links.get(0);
  assertNotNull(link);
  assertEquals("String_Node_Str",link.getValue());
}

Fixed version (ground truth):
/** 
 * test query exist v4 network.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup(type=DatabaseOperation.REFRESH,value="String_Node_Str") public void testQueryExistV4Network(){
  Long domainId=1L;
  List<Network> networks=networkQueryDao.queryAsInnerObjects(domainId,ModelType.DOMAIN);
  assertNotNull(networks);
  assertEquals(1,networks.size());
  Network network=networks.get(0);
  assertEquals("String_Node_Str",network.getHandle());
  assertEquals("String_Node_Str",network.getStartAddress());
  assertEquals("String_Node_Str",network.getEndAddress());
  assertEquals(IpVersion.V4,network.getIpVersion());
  assertEquals("String_Node_Str",network.getName());
  assertEquals("String_Node_Str",network.getType());
  assertEquals("String_Node_Str",network.getCountry());
  assertEquals("String_Node_Str",network.getParentHandle());
  assertEquals("String_Node_Str",network.getPort43());
  assertEquals("String_Node_Str",network.getLang());
  List<String> statusList=network.getStatus();
  assertThat(statusList,CoreMatchers.hasItems("String_Node_Str","String_Node_Str"));
  List<Event> events=network.getEvents();
  assertNotNull(events);
  assertEquals(events.size(),1);
  Event event=events.get(0);
  assertNotNull(event);
  assertEquals(event.getEventAction(),"String_Node_Str");
  assertEquals(event.getEventActor(),"String_Node_Str");
  assertEquals(event.getEventDate(),"String_Node_Str");
  List<Link> networkLinks=network.getLinks();
  assertNotNull(networkLinks);
  assertEquals(1,networkLinks.size());
  Link networkLink=networkLinks.get(0);
  assertNotNull(networkLink);
  assertEquals("String_Node_Str",networkLink.getValue());
  assertEquals("String_Node_Str",networkLink.getHref());
  List<Remark> remarks=network.getRemarks();
  assertNotNull(remarks);
  assertTrue(remarks.size() > 0);
  Remark remark=remarks.get(0);
  assertNotNull(remark);
  assertEquals("String_Node_Str",remark.getTitle());
  assertThat(remark.getDescription(),CoreMatchers.hasItems("String_Node_Str","String_Node_Str"));
  List<Link> links=remark.getLinks();
  assertNotNull(links);
  assertEquals(1,links.size());
  Link link=links.get(0);
  assertNotNull(link);
  assertEquals("String_Node_Str",link.getValue());
}