Program: 7237
Project: 7237
Buggy source:
@Test public void testStreamSizeSchedule() throws Exception {
  scheduleStore.persist(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,0L,0L,true);
  scheduleStore.persist(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,1000L,10L,1000L,10L,false);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,0L,0L,true),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,1000L,10L,1000L,10L,false)),scheduleStore.list());
  scheduleStore.suspend(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_1);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,0L,0L,false),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,1000L,10L,1000L,10L,false)),scheduleStore.list());
  scheduleStore.resume(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_2);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,0L,0L,false),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,1000L,10L,1000L,10L,true)),scheduleStore.list());
  scheduleStore.updateBaseRun(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_2,10000L,100L);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,0L,0L,false),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,10000L,100L,1000L,10L,true)),scheduleStore.list());
  scheduleStore.updateLastRun(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_1,100L,10000L);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,100L,10000L,false),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,10000L,100L,1000L,10L,true)),scheduleStore.list());
  scheduleStore.updateSchedule(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_1,STREAM_SCHEDULE_2);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,0L,0L,100L,10000L,false),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,10000L,100L,1000L,10L,true)),scheduleStore.list());
  scheduleStore.delete(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_1);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,10000L,100L,1000L,10L,true)),scheduleStore.list());
  scheduleStore.delete(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_2);
  Assert.assertEquals(ImmutableList.<StreamSizeScheduleState>of(),scheduleStore.list());
}

Fixed version (ground truth):
@Test public void testStreamSizeSchedule() throws Exception {
  scheduleStore.persist(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,0L,0L,true);
  scheduleStore.persist(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,1000L,10L,1000L,10L,false);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,0L,0L,true),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,1000L,10L,1000L,10L,false)),scheduleStore.list());
  scheduleStore.suspend(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_1);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,0L,0L,false),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,1000L,10L,1000L,10L,false)),scheduleStore.list());
  scheduleStore.resume(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_2);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,0L,0L,false),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,1000L,10L,1000L,10L,true)),scheduleStore.list());
  scheduleStore.updateBaseRun(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_2,10000L,100L);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,0L,0L,false),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,10000L,100L,1000L,10L,true)),scheduleStore.list());
  scheduleStore.updateLastRun(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_1,100L,10000L,null);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_1,0L,0L,100L,10000L,false),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,10000L,100L,1000L,10L,true)),scheduleStore.list());
  scheduleStore.updateSchedule(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_1,STREAM_SCHEDULE_2);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,0L,0L,100L,10000L,false),new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,10000L,100L,1000L,10L,true)),scheduleStore.list());
  scheduleStore.delete(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_1);
  Assert.assertEquals(ImmutableList.of(new StreamSizeScheduleState(PROGRAM_ID,PROGRAM_TYPE,STREAM_SCHEDULE_2,10000L,100L,1000L,10L,true)),scheduleStore.list());
  scheduleStore.delete(PROGRAM_ID,PROGRAM_TYPE,SCHEDULE_NAME_2);
  Assert.assertEquals(ImmutableList.<StreamSizeScheduleState>of(),scheduleStore.list());
}