Program: 82088
Project: 82088
Buggy source:
/** 
 * Send a request for reports in the current range.
 * @param isPolling true if this request is caused by polling
 */
private void requestReports(boolean isPolling){
  refreshTimer.cancel();
  if (requestFactory == null) {
    return;
  }
  if (!isPolling) {
    knownReportKeys=null;
  }
  String startsWith=startsWithSearch;
  if (startsWith == null || searchBox.getDefaultText().equals(startsWith)) {
    startsWith="String_Node_Str";
  }
  Range range=table.getVisibleRange();
  Long employeeId=employee == null ? -1 : new Long(employee.getId());
  String dept=department == null ? "String_Node_Str" : department;
  if (startsWith.length() > 0) {
    for (    SortableHeader header : allHeaders) {
      header.setSorted(false);
      header.setReverseSort(false);
    }
    table.redrawHeaders();
  }
  if (isCountStale) {
    isCountStale=false;
    if (!isPolling) {
      pager.startLoading();
    }
    lastDataSizeReceiver=new Receiver<Long>(){
      public void onSuccess(      Long response,      Set<SyncResult> syncResults){
        if (this == lastDataSizeReceiver) {
          int count=response.intValue();
          reports.updateRowCount(count,count != 1000);
        }
      }
    }
;
    requestFactory.reportRequest().countReportsBySearch(employeeId,dept,startsWith).fire(lastDataSizeReceiver);
  }
  lastDataReceiver=new Receiver<List<ReportRecord>>(){
    public void onSuccess(    List<ReportRecord> newValues,    Set<SyncResult> syncResults){
      if (this == lastDataReceiver) {
        int size=newValues.size();
        if (size < table.getPageSize()) {
          reports.updateRowCount(table.getPageStart() + size,true);
        }
        if (size > 0) {
          reports.updateRowData(table.getPageStart(),newValues);
        }
        boolean isInitialData=knownReportKeys == null;
        if (knownReportKeys == null) {
          knownReportKeys=new HashSet<Object>();
        }
        for (        ReportRecord value : newValues) {
          Object key=reports.getKey(value);
          if (!isInitialData && !knownReportKeys.contains(key)) {
            (new PhaseAnimation.CellTablePhaseAnimation<ReportRecord>(table,value,reports)).run();
          }
          knownReportKeys.add(key);
        }
      }
      refreshTimer.schedule(REFRESH_INTERVAL);
    }
  }
;
  requestFactory.reportRequest().findReportEntriesBySearch(employeeId,dept,startsWith,orderBy,range.getStart(),range.getLength()).forProperties(reportColumns).fire(lastDataReceiver);
}

Fixed version (ground truth):
/** 
 * Send a request for reports in the current range.
 * @param isPolling true if this request is caused by polling
 */
private void requestReports(boolean isPolling){
  refreshTimer.cancel();
  if (requestFactory == null) {
    return;
  }
  if (!isPolling) {
    knownReportKeys=null;
  }
  String startsWith=startsWithSearch;
  if (startsWith == null || searchBox.getDefaultText().equals(startsWith)) {
    startsWith="String_Node_Str";
  }
  Range range=table.getVisibleRange();
  Long employeeId=employee == null ? -1 : new Long(employee.getId());
  String dept=department == null ? "String_Node_Str" : department;
  if (startsWith.length() > 0) {
    for (    SortableHeader header : allHeaders) {
      header.setSorted(false);
      header.setReverseSort(false);
    }
    table.redrawHeaders();
  }
  if (isCountStale) {
    isCountStale=false;
    if (!isPolling) {
      pager.startLoading();
    }
    lastDataSizeReceiver=new Receiver<Long>(){
      public void onSuccess(      Long response,      Set<SyncResult> syncResults){
        if (this == lastDataSizeReceiver) {
          int count=response.intValue();
          reports.updateRowCount(count,count != 1000);
        }
      }
    }
;
    requestFactory.reportRequest().countReportsBySearch(employeeId,dept,startsWith).fire(lastDataSizeReceiver);
  }
  lastDataReceiver=new Receiver<List<ReportRecord>>(){
    public void onSuccess(    List<ReportRecord> newValues,    Set<SyncResult> syncResults){
      if (this == lastDataReceiver) {
        int size=newValues.size();
        if (size < table.getPageSize()) {
          reports.updateRowCount(table.getPageStart() + size,true);
        }
        if (size > 0) {
          reports.updateRowData(table.getPageStart(),newValues);
        }
        boolean isInitialData=knownReportKeys == null;
        if (knownReportKeys == null) {
          knownReportKeys=new HashSet<Object>();
        }
        for (        ReportRecord value : newValues) {
          Object key=reports.getKey(value);
          if (!isInitialData && !knownReportKeys.contains(key)) {
            (new PhaseAnimation.CellTablePhaseAnimation<ReportRecord>(table,value,reports)).run();
          }
          knownReportKeys.add(key);
        }
      }
      refreshTimer.schedule(REFRESH_INTERVAL);
    }
  }
;
  requestFactory.reportRequest().findReportEntriesBySearch(employeeId,dept,startsWith,orderBy,range.getStart(),range.getLength()).with(reportColumns).fire(lastDataReceiver);
}