Program: 135290
Project: 135290
Buggy source:
/** 
 * Test when A modify a set of labels but are separated into 3 groups due to time stamp's difference A: +L1, +L1, -L1, +L2, +L3, -L2, +L2 Expected: [[+L1, +L1, -L1, +L2], [+L3, -L2], [+L2]]
 */
@Test public void testLabelUpdateEventsGrouping4(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,5),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,10),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,15),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,2,15),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,2,45),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,5,35),"String_Node_Str"));
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(events.get(0));
  expectedSubList1.add(events.get(1));
  expectedSubList1.add(events.get(2));
  expectedSubList1.add(events.get(3));
  List<TurboIssueEvent> expectedSubList2=new ArrayList<>();
  expectedSubList2.add(events.get(4));
  expectedSubList2.add(events.get(5));
  List<TurboIssueEvent> expectedSubList3=new ArrayList<>();
  expectedSubList3.add(events.get(6));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  expected.add(expectedSubList2);
  expected.add(expectedSubList3);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}

Fixed version (ground truth):
/** 
 * Tests when A modify a set of labels but are separated into 3 groups due to time stamp's difference A: +L1, +L1, -L1, +L2, +L3, -L2, +L2 Expected: [[+L1, +L1, -L1, +L2], [+L3, -L2], [+L2]]
 */
@Test public void testLabelUpdateEventsGrouping4(){
  List<TurboIssueEvent> events=new ArrayList<>();
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,0),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,5),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,1,10),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,1,15),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,2,15),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Unlabeled,new GregorianCalendar(2015,1,1,1,2,45),"String_Node_Str"));
  events.add(createLabelUpdateEvent("String_Node_Str",IssueEventType.Labeled,new GregorianCalendar(2015,1,1,1,5,35),"String_Node_Str"));
  List<TurboIssueEvent> expectedSubList1=new ArrayList<>();
  expectedSubList1.add(events.get(0));
  expectedSubList1.add(events.get(1));
  expectedSubList1.add(events.get(2));
  expectedSubList1.add(events.get(3));
  List<TurboIssueEvent> expectedSubList2=new ArrayList<>();
  expectedSubList2.add(events.get(4));
  expectedSubList2.add(events.get(5));
  List<TurboIssueEvent> expectedSubList3=new ArrayList<>();
  expectedSubList3.add(events.get(6));
  List<List<TurboIssueEvent>> expected=new ArrayList<>();
  expected.add(expectedSubList1);
  expected.add(expectedSubList2);
  expected.add(expectedSubList3);
  assertEquals(expected,TurboIssueEvent.groupLabelUpdateEvents(events));
}