Program: 82020
Project: 82020
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>(){
      @Override 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<ReportProxy>>(){
    @Override public void onSuccess(    List<ReportProxy> 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 (        ReportProxy value : newValues) {
          Object key=reports.getKey(value);
          if (!isInitialData && !knownReportKeys.contains(key)) {
            (new PhaseAnimation.CellTablePhaseAnimation<ReportProxy>(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);
}

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>(){
      @Override public void onSuccess(      Long response){
        if (this == lastDataSizeReceiver) {
          int count=response.intValue();
          reports.updateRowCount(count,count != 1000);
        }
      }
    }
;
    requestFactory.reportRequest().countReportsBySearch(employeeId,dept,startsWith).fire(lastDataSizeReceiver);
  }
  lastDataReceiver=new Receiver<List<ReportProxy>>(){
    @Override public void onSuccess(    List<ReportProxy> newValues){
      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 (        ReportProxy value : newValues) {
          Object key=reports.getKey(value);
          if (!isInitialData && !knownReportKeys.contains(key)) {
            (new PhaseAnimation.CellTablePhaseAnimation<ReportProxy>(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);
}