Program: 18590
Project: 18590
Buggy source:
/** 
 * Gets the error data.
 * @param errorCriteria the error criteria
 * @param metricCriteria the metric criteria
 * @param callback the callback
 * @return the error data
 * @see org.ebayopensource.turmeric.monitoring.client.model.MetricsQueryService#getErrorData(org.ebayopensource.turmeric.monitoring.client.model.MetricsQueryService.ErrorType,java.util.List,java.util.List,java.util.List,java.lang.String,boolean,org.ebayopensource.turmeric.monitoring.client.model.MetricsQueryService.ErrorCategory,org.ebayopensource.turmeric.monitoring.client.model.MetricsQueryService.ErrorSeverity,org.ebayopensource.turmeric.monitoring.client.model.MetricCriteria)
 */
public void getErrorData(final ErrorCriteria errorCriteria,final MetricCriteria metricCriteria,final AsyncCallback<ErrorMetricData> callback){
  final String url=URL.encode(ErrorMetricsDataRequest.getRestURL(errorCriteria,metricCriteria));
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,url);
  final ErrorMetricData data=new ErrorMetricData();
  data.setRestUrl(url);
  data.setErrorCriteria(errorCriteria);
  data.setMetricCriteria(metricCriteria);
  try {
    builder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable err){
        callback.onFailure(err);
      }
      public void onResponseReceived(      Request request,      Response response){
        if (response.getStatusCode() != Response.SC_OK) {
          errorLogger.log(Level.SEVERE,"String_Node_Str" + url + "String_Node_Str"+ response.getStatusCode()+ "String_Node_Str"+ response.getText());
          callback.onFailure(getErrorAsThrowable(response));
        }
 else         if (response.getHeader(ERROR_HEADER) != null) {
          errorLogger.log(Level.SEVERE,"String_Node_Str" + url + "String_Node_Str"+ response.getText());
          callback.onFailure(getErrorAsThrowable(response));
        }
 else {
          ErrorMetricsDataResponse metricsResponse=ErrorMetricsDataResponse.fromJSON(response.getText());
          if (metricsResponse == null) {
            errorLogger.log(Level.SEVERE,"String_Node_Str" + url + "String_Node_Str"+ response.getText());
            callback.onFailure(new Throwable(ConsoleUtil.messages.badOrMissingResponseData()));
          }
 else {
            JsArray<ErrorViewDataJS> rows=metricsResponse.getReturnData();
            List<ErrorViewData> results=new ArrayList<ErrorViewData>();
            if (rows != null) {
              for (int i=0; i < rows.length(); i++) {
                ErrorViewDataJS js=rows.get(i);
                results.add(js);
              }
            }
            data.setReturnData(results);
            callback.onSuccess(data);
          }
        }
      }
    }
);
  }
 catch (  RequestException x) {
    errorLogger.log(Level.SEVERE,"String_Node_Str",x);
    callback.onFailure(x);
    GWT.log("String_Node_Str" + x.toString());
  }
}

Fixed version (ground truth):
/** 
 * Gets the error data.
 * @param errorCriteria the error criteria
 * @param metricCriteria the metric criteria
 * @param callback the callback
 * @return the error data
 * @see org.ebayopensource.turmeric.monitoring.client.model.MetricsQueryService#getErrorData(org.ebayopensource.turmeric.monitoring.client.model.MetricsQueryService.ErrorType,java.util.List,java.util.List,java.util.List,java.lang.String,boolean,org.ebayopensource.turmeric.monitoring.client.model.MetricsQueryService.ErrorCategory,org.ebayopensource.turmeric.monitoring.client.model.MetricsQueryService.ErrorSeverity,org.ebayopensource.turmeric.monitoring.client.model.MetricCriteria)
 */
public void getErrorData(final ErrorCriteria errorCriteria,final MetricCriteria metricCriteria,final AsyncCallback<ErrorMetricData> callback){
  final String url=URL.encode(ErrorMetricsDataRequest.getRestURL(errorCriteria,metricCriteria));
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,url);
  final ErrorMetricData data=new ErrorMetricData();
  data.setRestUrl(url);
  data.setErrorCriteria(errorCriteria);
  data.setMetricCriteria(metricCriteria);
  try {
    builder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable err){
        callback.onFailure(err);
      }
      public void onResponseReceived(      Request request,      Response response){
        if (response.getStatusCode() != Response.SC_OK) {
          errorLogger.log(Level.SEVERE,"String_Node_Str" + url + "String_Node_Str"+ response.getStatusCode()+ "String_Node_Str"+ response.getText());
          callback.onFailure(getErrorAsThrowable(response));
        }
 else         if (response.getHeader(ERROR_HEADER) != null && response.getHeader(ERROR_HEADER).length() > 0) {
          errorLogger.log(Level.SEVERE,"String_Node_Str" + url + "String_Node_Str"+ response.getText());
          callback.onFailure(getErrorAsThrowable(response));
        }
 else {
          ErrorMetricsDataResponse metricsResponse=ErrorMetricsDataResponse.fromJSON(response.getText());
          if (metricsResponse == null) {
            errorLogger.log(Level.SEVERE,"String_Node_Str" + url + "String_Node_Str"+ response.getText());
            callback.onFailure(new Throwable(ConsoleUtil.messages.badOrMissingResponseData()));
          }
 else {
            JsArray<ErrorViewDataJS> rows=metricsResponse.getReturnData();
            List<ErrorViewData> results=new ArrayList<ErrorViewData>();
            if (rows != null) {
              for (int i=0; i < rows.length(); i++) {
                ErrorViewDataJS js=rows.get(i);
                results.add(js);
              }
            }
            data.setReturnData(results);
            callback.onSuccess(data);
          }
        }
      }
    }
);
  }
 catch (  RequestException x) {
    errorLogger.log(Level.SEVERE,"String_Node_Str",x);
    callback.onFailure(x);
    GWT.log("String_Node_Str" + x.toString());
  }
}