Program: 55113
Project: 55113
Buggy source:
@Test public void testGetStandardCalendar() throws URISyntaxException, ParseException {
  Card assignedCard=cardService.createCard("String_Node_Str",col.getId(),new Date(),user);
  cardDataService.updateDescription(assignedCard.getId(),"String_Node_Str",new Date(),user.getId());
  Card watchedCard=cardService.createCard("String_Node_Str",col.getId(),new Date(),user);
  Date now=new Date();
  CardLabel assigned=cardLabelRepository.findLabelByName(project.getId(),"String_Node_Str",LabelDomain.SYSTEM);
  labelService.addLabelValueToCard(assigned,assignedCard.getId(),new CardLabelValue.LabelValue(user.getId()),user,now);
  CardLabel watched=cardLabelRepository.findLabelByName(project.getId(),"String_Node_Str",LabelDomain.SYSTEM);
  labelService.addLabelValueToCard(watched,watchedCard.getId(),new CardLabelValue.LabelValue(user.getId()),user,now);
  CardLabel dueDate=cardLabelRepository.findLabelByName(project.getId(),"String_Node_Str",LabelDomain.SYSTEM);
  labelService.addLabelValueToCard(dueDate,assignedCard.getId(),new CardLabelValue.LabelValue(now),user,now);
  labelService.addLabelValueToCard(dueDate,watchedCard.getId(),new CardLabelValue.LabelValue(now),user,now);
  UserWithPermission uwpGlobalRead=new UserWithPermission(user,EnumSet.of(Permission.READ),Collections.<String,Set<Permission>>emptyMap(),Collections.<Integer,Set<Permission>>emptyMap());
  CalendarEvents events=calendarService.getUserCalendar(uwpGlobalRead);
  Assert.assertNotNull(events);
  Assert.assertEquals(2,events.getDailyEvents().get(now).getCards().size());
}

Fixed version (ground truth):
@Test public void testGetStandardCalendar() throws URISyntaxException, ParseException {
  Card assignedCard=cardService.createCard("String_Node_Str",col.getId(),new Date(),user);
  cardDataService.updateDescription(assignedCard.getId(),"String_Node_Str",new Date(),user.getId());
  Card watchedCard=cardService.createCard("String_Node_Str",col.getId(),new Date(),user);
  Date now=new Date();
  CardLabel assigned=cardLabelRepository.findLabelByName(project.getId(),"String_Node_Str",LabelDomain.SYSTEM);
  labelService.addLabelValueToCard(assigned,assignedCard.getId(),new CardLabelValue.LabelValue(user.getId()),user,now);
  CardLabel watched=cardLabelRepository.findLabelByName(project.getId(),"String_Node_Str",LabelDomain.SYSTEM);
  labelService.addLabelValueToCard(watched,watchedCard.getId(),new CardLabelValue.LabelValue(user.getId()),user,now);
  CardLabel dueDate=cardLabelRepository.findLabelByName(project.getId(),"String_Node_Str",LabelDomain.SYSTEM);
  labelService.addLabelValueToCard(dueDate,assignedCard.getId(),new CardLabelValue.LabelValue(now),user,now);
  labelService.addLabelValueToCard(dueDate,watchedCard.getId(),new CardLabelValue.LabelValue(now),user,now);
  UserWithPermission uwpGlobalRead=new UserWithPermission(user,EnumSet.of(Permission.READ),Collections.<String,Set<Permission>>emptyMap(),Collections.<Integer,Set<Permission>>emptyMap());
  CalendarEvents events=calendarService.getUserCalendar(uwpGlobalRead);
  Assert.assertNotNull(events);
  Assert.assertEquals(2,events.getDailyEvents().values().iterator().next().getCards().size());
}