Program: 19071
Project: 19071
Buggy source:
@Test public void readDataFromCursor_SessionsQuery_SessionsLoaded(){
  initMockCursorWithSessionsData(mMockCursor);
  boolean success=mExploreIOModel.readDataFromCursor(mMockCursor,ExploreIOModel.ExploreIOQueryEnum.SESSIONS);
  assertThat(success,is(true));
  assertThat(mExploreIOModel.getKeynoteData().getSessionName(),is(FAKE_SESSION_TITLE_2_KEYNOTE));
  assertThat(mExploreIOModel.getLiveStreamData().getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_1));
  assertThat(mExploreIOModel.getThemes().size(),is(2));
  assertThat(mExploreIOModel.getTracks().size(),is(1));
  Iterator<ItemGroup> themeGroupIterator=mExploreIOModel.getThemes().iterator();
  ItemGroup themeGroup1=themeGroupIterator.next();
  ItemGroup themeGroup2=themeGroupIterator.next();
  if (themeGroup1.getTitle().equals(FAKE_SESSION_TAGS_1)) {
    assertThat(themeGroup1.getSessions().size(),is(2));
    assertThat(themeGroup1.getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_1));
    assertThat(themeGroup1.getSessions().get(1).getSessionName(),is(FAKE_SESSION_TITLE_2_KEYNOTE));
    assertThat(themeGroup2.getSessions().size(),is(1));
    assertThat(themeGroup2.getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_3));
  }
 else {
    assertThat(themeGroup1.getSessions().size(),is(1));
    assertThat(themeGroup1.getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_3));
    assertThat(themeGroup2.getSessions().size(),is(2));
    assertThat(themeGroup2.getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_1));
    assertThat(themeGroup2.getSessions().get(1).getSessionName(),is(FAKE_SESSION_TITLE_2_KEYNOTE));
  }
  ItemGroup topicGroup=mExploreIOModel.getTracks().iterator().next();
  assertThat(topicGroup.getSessions().size(),is(1));
  assertThat(topicGroup.getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_4));
}

Fixed version (ground truth):
@Test public void readDataFromCursor_SessionsQuery_SessionsLoaded(){
  initMockCursorWithSessionsData(mMockCursor);
  boolean success=mExploreIOModel.readDataFromCursor(mMockCursor,ExploreIOModel.ExploreIOQueryEnum.SESSIONS);
  assertThat(success,is(true));
  assertThat(mExploreIOModel.getKeynoteData().getSessionName(),is(FAKE_SESSION_TITLE_2_KEYNOTE));
  assertThat(mExploreIOModel.getLiveStreamData().getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_1_LIVESTREAM));
  assertThat(mExploreIOModel.getThemes().size(),is(2));
  assertThat(mExploreIOModel.getTracks().size(),is(1));
  Iterator<ItemGroup> themeGroupIterator=mExploreIOModel.getThemes().iterator();
  ItemGroup themeGroup1=themeGroupIterator.next();
  ItemGroup themeGroup2=themeGroupIterator.next();
  if (themeGroup1.getTitle().equals(FAKE_SESSION_TAGS_1)) {
    assertThat(themeGroup1.getSessions().size(),is(2));
    assertThat(themeGroup1.getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_1_LIVESTREAM));
    assertThat(themeGroup1.getSessions().get(1).getSessionName(),is(FAKE_SESSION_TITLE_2_KEYNOTE));
    assertThat(themeGroup2.getSessions().size(),is(1));
    assertThat(themeGroup2.getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_3));
  }
 else {
    assertThat(themeGroup1.getSessions().size(),is(1));
    assertThat(themeGroup1.getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_3));
    assertThat(themeGroup2.getSessions().size(),is(2));
    assertThat(themeGroup2.getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_1_LIVESTREAM));
    assertThat(themeGroup2.getSessions().get(1).getSessionName(),is(FAKE_SESSION_TITLE_2_KEYNOTE));
  }
  ItemGroup topicGroup=mExploreIOModel.getTracks().iterator().next();
  assertThat(topicGroup.getSessions().size(),is(1));
  assertThat(topicGroup.getSessions().get(0).getSessionName(),is(FAKE_SESSION_TITLE_4));
}