Program: 37471
Project: 37471
Buggy source:
/** 
 * test search nameserver.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup(type=DatabaseOperation.REFRESH,value="String_Node_Str") public void testSearchNameserver(){
  String nsName="String_Node_Str";
  RdapProperties prop=new RdapProperties();
  long sizeHigh=3L;
  long sizeLow=2L;
  long sizeLimit=6L;
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeHigh);
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLow);
  NameserverSearch nsSearch=searchService.searchNameserver(queryParser.parseNameserverQueryParam(nsName,nsName));
  assertNotNull(nsSearch);
  assertNotNull(nsSearch.getNameserverSearchResults());
  assertEquals(sizeHigh,nsSearch.getNameserverSearchResults().size());
  assertTrue(nsSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLow);
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLow);
  nsSearch=searchService.searchNameserver(queryParser.parseNameserverQueryParam(nsName,nsName));
  assertNotNull(nsSearch);
  assertNotNull(nsSearch.getNameserverSearchResults());
  assertEquals(sizeLow,nsSearch.getNameserverSearchResults().size());
  assertTrue(nsSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLow);
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeHigh);
  nsSearch=searchService.searchNameserver(queryParser.parseNameserverQueryParam(nsName,nsName));
  assertNotNull(nsSearch);
  assertNotNull(nsSearch.getNameserverSearchResults());
  assertEquals(sizeLow,nsSearch.getNameserverSearchResults().size());
  assertTrue(nsSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLimit);
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLow);
  nsSearch=searchService.searchNameserver(queryParser.parseNameserverQueryParam(nsName,nsName));
  assertNotNull(nsSearch);
  assertNotNull(nsSearch.getNameserverSearchResults());
  assertEquals(sizeLimit,nsSearch.getNameserverSearchResults().size());
  assertNull(nsSearch.getResultsTruncated());
}

Fixed version (ground truth):
/** 
 * test search nameserver.
 */
@Test @DatabaseTearDown("String_Node_Str") @DatabaseSetup("String_Node_Str") public void testSearchNameserver(){
  String nsName="String_Node_Str";
  RdapProperties prop=new RdapProperties();
  long sizeHigh=3L;
  long sizeLow=2L;
  long sizeLimit=6L;
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeHigh);
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLow);
  NameserverSearch nsSearch=searchService.searchNameserver(queryParser.parseNameserverQueryParam(nsName,nsName));
  assertNotNull(nsSearch);
  assertNotNull(nsSearch.getNameserverSearchResults());
  assertEquals(sizeHigh,nsSearch.getNameserverSearchResults().size());
  assertTrue(nsSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLow);
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLow);
  nsSearch=searchService.searchNameserver(queryParser.parseNameserverQueryParam(nsName,nsName));
  assertNotNull(nsSearch);
  assertNotNull(nsSearch.getNameserverSearchResults());
  assertEquals(sizeLow,nsSearch.getNameserverSearchResults().size());
  assertTrue(nsSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLow);
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeHigh);
  nsSearch=searchService.searchNameserver(queryParser.parseNameserverQueryParam(nsName,nsName));
  assertNotNull(nsSearch);
  assertNotNull(nsSearch.getNameserverSearchResults());
  assertEquals(sizeLow,nsSearch.getNameserverSearchResults().size());
  assertTrue(nsSearch.getResultsTruncated());
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLimit);
  ReflectionTestUtils.setField(prop,"String_Node_Str",sizeLow);
  nsSearch=searchService.searchNameserver(queryParser.parseNameserverQueryParam(nsName,nsName));
  assertNotNull(nsSearch);
  assertNotNull(nsSearch.getNameserverSearchResults());
  assertEquals(sizeLimit,nsSearch.getNameserverSearchResults().size());
  assertNull(nsSearch.getResultsTruncated());
}