Program: 37472
Project: 37472
Buggy source:
/** 
 * test search domain.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup(type=DatabaseOperation.REFRESH,value="String_Node_Str") public void testQueryDomain(){
  String domainName="String_Node_Str";
  RdapProperties prop=new RdapProperties();
  ReflectionTestUtils.setField(prop,"String_Node_Str",5L);
  ReflectionTestUtils.setField(prop,"String_Node_Str",3L);
  DomainSearch domainSearch=searchService.searchDomain(queryParser.parseDomainQueryParam(domainName,domainName));
  assertNotNull(domainSearch);
  assertNotNull(domainSearch.getDomainSearchResults());
  assertEquals(5L,domainSearch.getDomainSearchResults().size());
  assertTrue(domainSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",5L);
  ReflectionTestUtils.setField(prop,"String_Node_Str",5L);
  domainSearch=searchService.searchDomain(queryParser.parseDomainQueryParam(domainName,domainName));
  assertNotNull(domainSearch);
  assertNotNull(domainSearch.getDomainSearchResults());
  assertEquals(5L,domainSearch.getDomainSearchResults().size());
  assertTrue(domainSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",5L);
  ReflectionTestUtils.setField(prop,"String_Node_Str",6L);
  domainSearch=searchService.searchDomain(queryParser.parseDomainQueryParam(domainName,domainName));
  assertNotNull(domainSearch);
  assertNotNull(domainSearch.getDomainSearchResults());
  assertEquals(5L,domainSearch.getDomainSearchResults().size());
  assertTrue(domainSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",6L);
  ReflectionTestUtils.setField(prop,"String_Node_Str",3L);
  domainSearch=searchService.searchDomain(queryParser.parseDomainQueryParam(domainName,domainName));
  assertNotNull(domainSearch);
  assertNotNull(domainSearch.getDomainSearchResults());
  assertEquals(6L,domainSearch.getDomainSearchResults().size());
  assertNull(domainSearch.getResultsTruncated());
}

Fixed version (ground truth):
/** 
 * test search domain.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testQueryDomain(){
  String domainName="String_Node_Str";
  RdapProperties prop=new RdapProperties();
  ReflectionTestUtils.setField(prop,"String_Node_Str",5L);
  ReflectionTestUtils.setField(prop,"String_Node_Str",3L);
  DomainSearch domainSearch=searchService.searchDomain(queryParser.parseDomainQueryParam(domainName,domainName));
  assertNotNull(domainSearch);
  assertNotNull(domainSearch.getDomainSearchResults());
  assertEquals(5L,domainSearch.getDomainSearchResults().size());
  assertTrue(domainSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",5L);
  ReflectionTestUtils.setField(prop,"String_Node_Str",5L);
  domainSearch=searchService.searchDomain(queryParser.parseDomainQueryParam(domainName,domainName));
  assertNotNull(domainSearch);
  assertNotNull(domainSearch.getDomainSearchResults());
  assertEquals(5L,domainSearch.getDomainSearchResults().size());
  assertTrue(domainSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",5L);
  ReflectionTestUtils.setField(prop,"String_Node_Str",6L);
  domainSearch=searchService.searchDomain(queryParser.parseDomainQueryParam(domainName,domainName));
  assertNotNull(domainSearch);
  assertNotNull(domainSearch.getDomainSearchResults());
  assertEquals(5L,domainSearch.getDomainSearchResults().size());
  assertTrue(domainSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",6L);
  ReflectionTestUtils.setField(prop,"String_Node_Str",3L);
  domainSearch=searchService.searchDomain(queryParser.parseDomainQueryParam(domainName,domainName));
  assertNotNull(domainSearch);
  assertNotNull(domainSearch.getDomainSearchResults());
  assertEquals(6L,domainSearch.getDomainSearchResults().size());
  assertNull(domainSearch.getResultsTruncated());
}