Program: 18582
Project: 18582
Buggy source:
/** 
 * Handle a navigational change, either via the history forward/back buttons or via a user selection (for simplicity also generated as a history change).
 * @param container the container
 * @param token the token
 * @see org.ebayopensource.turmeric.monitoring.client.presenter.Presenter#go(com.google.gwt.user.client.ui.HasWidgets,org.ebayopensource.turmeric.monitoring.client.model.HistoryToken)
 */
public void go(HasWidgets container,HistoryToken token){
  SelectionContext oldContext=selectionContext;
  selectionContext=SelectionContext.fromHistoryToken(token);
  view.setSelection(selectionContext.getSelections());
  conditionalFireServiceFilterSelectionEvent(oldContext,selectionContext);
  if (servicesList == null)   fetchServices();
  FilterContext filter=FilterContext.fromHistoryToken(token);
  Date now=new Date();
  long fullTimeLastHour=Util.getLastHour(now);
  long sameTimeYesterday=Util.get24HrsPrevious(fullTimeLastHour);
  long oldDate1=selectedDate1;
  long oldDate2=selectedDate2;
  selectedDate1=(filter.getDate1() == 0 ? new Date(sameTimeYesterday).getTime() : filter.getDate1());
  selectedDate2=(filter.getDate2() == 0 ? new Date(fullTimeLastHour).getTime() : filter.getDate2());
  Date asDate1=new Date(selectedDate1);
  Date asDate2=new Date(selectedDate2);
  ServicePresenter.this.view.getFilter().setHours1(Util.getAvailableHours(selectedDate1));
  ServicePresenter.this.view.getFilter().setHour1(asDate1.getHours());
  ServicePresenter.this.view.getFilter().setDate1(asDate1);
  ServicePresenter.this.view.getFilter().setHours2(Util.getAvailableHours(selectedDate2));
  ServicePresenter.this.view.getFilter().setHour2(asDate2.getHours());
  ServicePresenter.this.view.getFilter().setDate2(asDate2);
  int oldInterval=selectedDurationHrs;
  selectedDurationHrs=(filter.getDurationHrs() == 0 ? MetricsQueryService.DEFAULT_DURATION_HRS : filter.getDurationHrs());
  view.setFilterLabel(makeFilterLabel(selectedDate1,selectedDate2,selectedDurationHrs));
  conditionalFireDateSelectionEvent(oldDate1,selectedDate1,oldDate2,selectedDate2,oldInterval,selectedDurationHrs);
  int[] intervals=new int[24];
  for (int i=0; i < 24; i++)   intervals[i]=i + 1;
  ServicePresenter.this.view.getFilter().setDurations(intervals);
  ServicePresenter.this.view.getFilter().setDuration(selectedDurationHrs);
  ServicePresenter.this.view.getFilter().setMetricNames(Util.convertFromEnumToCamelCase(Arrays.asList(ServiceMetric.values())));
  if (filter.getMetricNames() == null)   selectedMetrics=new ArrayList<ServiceMetric>(Arrays.asList(ServiceMetric.values()));
 else   selectedMetrics=Util.convertToEnumFromCamelCase(filter.getMetricNames(),ServiceMetric.class);
  view.getFilter().setSelectedMetricNames(Util.convertFromEnumToCamelCase(selectedMetrics));
  view.reset();
  if (selectionContext.getSelection(ObjectType.ServiceName) != null) {
    fetchMetrics(selectedMetrics,selectionContext,selectedDate1,selectedDate2,selectedDurationHrs);
  }
  ((Dashboard)container).activate(this.view);
}

Fixed version (ground truth):
/** 
 * Handle a navigational change, either via the history forward/back buttons or via a user selection (for simplicity also generated as a history change).
 * @param container the container
 * @param token the token
 * @see org.ebayopensource.turmeric.monitoring.client.presenter.Presenter#go(com.google.gwt.user.client.ui.HasWidgets,org.ebayopensource.turmeric.monitoring.client.model.HistoryToken)
 */
public void go(HasWidgets container,HistoryToken token){
  SelectionContext oldContext=selectionContext;
  selectionContext=SelectionContext.fromHistoryToken(token);
  view.setSelection(selectionContext.getSelections());
  conditionalFireServiceFilterSelectionEvent(oldContext,selectionContext);
  if (servicesList == null)   fetchServices();
  FilterContext filter=FilterContext.fromHistoryToken(token);
  Date now=new Date();
  long fullTimeLastHour=Util.getLastHour(now);
  long sameTimeYesterday=Util.get24HrsPrevious(fullTimeLastHour);
  long oldDate1=selectedDate1;
  long oldDate2=selectedDate2;
  selectedDate1=(filter.getDate1() == 0 ? new Date(sameTimeYesterday).getTime() : filter.getDate1());
  selectedDate2=(filter.getDate2() == 0 ? new Date(fullTimeLastHour).getTime() : filter.getDate2());
  Date asDate1=new Date(selectedDate1);
  Date asDate2=new Date(selectedDate2);
  ServicePresenter.this.view.getFilter().setHours1(Util.getAvailableHours(selectedDate1));
  ServicePresenter.this.view.getFilter().setHour1(asDate1.getHours());
  ServicePresenter.this.view.getFilter().setDate1(asDate1);
  ServicePresenter.this.view.getFilter().setDate2(asDate2);
  int oldInterval=selectedDurationHrs;
  selectedDurationHrs=(filter.getDurationHrs() == 0 ? MetricsQueryService.DEFAULT_DURATION_HRS : filter.getDurationHrs());
  view.setFilterLabel(makeFilterLabel(selectedDate1,selectedDate2,selectedDurationHrs));
  conditionalFireDateSelectionEvent(oldDate1,selectedDate1,oldDate2,selectedDate2,oldInterval,selectedDurationHrs);
  int[] intervals=new int[24];
  for (int i=0; i < 24; i++)   intervals[i]=i + 1;
  ServicePresenter.this.view.getFilter().setDurations(intervals);
  ServicePresenter.this.view.getFilter().setDuration(selectedDurationHrs);
  ServicePresenter.this.view.getFilter().setMetricNames(Util.convertFromEnumToCamelCase(Arrays.asList(ServiceMetric.values())));
  if (filter.getMetricNames() == null)   selectedMetrics=new ArrayList<ServiceMetric>(Arrays.asList(ServiceMetric.values()));
 else   selectedMetrics=Util.convertToEnumFromCamelCase(filter.getMetricNames(),ServiceMetric.class);
  view.getFilter().setSelectedMetricNames(Util.convertFromEnumToCamelCase(selectedMetrics));
  view.reset();
  if (selectionContext.getSelection(ObjectType.ServiceName) != null) {
    fetchMetrics(selectedMetrics,selectionContext,selectedDate1,selectedDate2,selectedDurationHrs);
  }
  ((Dashboard)container).activate(this.view);
}