Program: 161070
Project: 161070
Buggy source:
@Test public void listVersions_created_deleted_recreated(){
  final RpslObject rpslObject=RpslObject.parse("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  final RpslObject person=RpslObject.parse("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  final RpslObjectUpdateInfo add=updateDao.createObject(rpslObject);
  updateDao.createObject(person);
  testDateTimeProvider.setTime(new LocalDateTime().plusDays(3));
  updateDao.deleteObject(add.getObjectId(),"String_Node_Str");
  testDateTimeProvider.setTime(new LocalDateTime().plusDays(5));
  updateDao.createObject(rpslObject);
  final WhoisResources result=RestTest.target(getPort(),"String_Node_Str",null,apiKey).request(MediaType.APPLICATION_JSON_TYPE).get(WhoisResources.class);
  String baseHref="String_Node_Str";
  assertThat(result.getErrorMessages(),hasSize(0));
  final List<WhoisVersionInternal> versions=result.getVersionsInternal().getVersions();
  assertThat(versions,hasSize(2));
  LocalDateTime fromDateFirst=parse(versions.get(0).getFrom(),DEFAULT_DATE_TIME_FORMATTER);
  LocalDateTime toDateFirst=parse(versions.get(0).getTo(),DEFAULT_DATE_TIME_FORMATTER);
  assertThat(Period.fieldDifference(fromDateFirst,toDateFirst).getDays(),is(3));
  assertThat(versions.get(0).getLink().toString(),containsString(baseHref + "String_Node_Str"));
  LocalDateTime fromDateLast=parse(versions.get(1).getFrom(),DEFAULT_DATE_TIME_FORMATTER);
  assertThat(Period.fieldDifference(toDateFirst,fromDateLast).getDays(),is(2));
  assertThat(versions.get(1).getTo(),is("String_Node_Str"));
  assertThat(versions.get(1).getLink().toString(),containsString(baseHref + "String_Node_Str"));
}

Fixed version (ground truth):
@Test public void listVersions_created_deleted_recreated(){
  final RpslObject rpslObject=RpslObject.parse("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  final RpslObject person=RpslObject.parse("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  final RpslObjectUpdateInfo add=updateDao.createObject(rpslObject);
  updateDao.createObject(person);
  testDateTimeProvider.setTime(new LocalDateTime().plusDays(3));
  updateDao.deleteObject(add.getObjectId(),"String_Node_Str");
  testDateTimeProvider.setTime(new LocalDateTime().plusDays(5));
  updateDao.createObject(rpslObject);
  final WhoisResources result=RestTest.target(getPort(),"String_Node_Str",null,apiKey).request(MediaType.APPLICATION_JSON_TYPE).get(WhoisResources.class);
  String baseHref="String_Node_Str";
  assertThat(result.getErrorMessages(),hasSize(0));
  final List<WhoisVersionInternal> versions=result.getVersionsInternal().getVersions();
  assertThat(versions,hasSize(2));
  LocalDateTime fromDateFirst=parse(versions.get(0).getFrom(),DEFAULT_DATE_TIME_FORMATTER);
  LocalDateTime toDateFirst=parse(versions.get(0).getTo(),DEFAULT_DATE_TIME_FORMATTER);
  assertThat(new Period(fromDateFirst,toDateFirst).getDays(),is(3));
  assertThat(versions.get(0).getLink().toString(),containsString(baseHref + "String_Node_Str"));
  LocalDateTime fromDateLast=parse(versions.get(1).getFrom(),DEFAULT_DATE_TIME_FORMATTER);
  assertThat(new Period(toDateFirst,fromDateLast).getDays(),is(2));
  assertThat(versions.get(1).getTo(),is("String_Node_Str"));
  assertThat(versions.get(1).getLink().toString(),containsString(baseHref + "String_Node_Str"));
}