Program: 18592
Project: 18592
Buggy source:
/** 
 * Call the remote server to obtain the list of services and their operations.
 * @param callback the callback
 * @return the services
 * @see org.ebayopensource.turmeric.monitoring.client.model.MetricsQueryService#getServices(com.google.gwt.user.client.rpc.AsyncCallback)
 */
public void getServices(final AsyncCallback<Map<String,Set<String>>> callback){
  final String url=MetricsMetaDataRequest.getRestURL("String_Node_Str",null,"String_Node_Str");
  final Map<String,Set<String>> serviceMap=new TreeMap<String,Set<String>>();
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,URL.encode(url));
  try {
    builder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable err){
        errorLogger.log(Level.SEVERE,"String_Node_Str",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.getStatusCode()+ "String_Node_Str"+ response.getText());
          callback.onFailure(getErrorAsThrowable(response));
        }
 else {
          GWT.log(response.getText());
          MetricsMetaDataResponse metaDataResponse=MetricsMetaDataResponse.fromJSON(response.getText());
          if (metaDataResponse == null)           callback.onFailure(new Throwable(ConsoleUtil.messages.badRequestData()));
 else {
            Set<String> services=metaDataResponse.getOrderedResourceEntityResponseNames();
            for (            String s : services) {
              GWT.log("String_Node_Str" + s);
              serviceMap.put(s,new TreeSet<String>());
            }
            getServiceOperationsJSON(serviceMap,callback);
          }
        }
      }
    }
);
  }
 catch (  RequestException x) {
    errorLogger.log(Level.SEVERE,"String_Node_Str",x);
    callback.onFailure(x);
  }
}

Fixed version (ground truth):
/** 
 * Call the remote server to obtain the list of services and their operations.
 * @param callback the callback
 * @return the services
 * @see org.ebayopensource.turmeric.monitoring.client.model.MetricsQueryService#getServices(com.google.gwt.user.client.rpc.AsyncCallback)
 */
public void getServices(final AsyncCallback<Map<String,Set<String>>> callback){
  final String url=MetricsMetaDataRequest.getRestURL("String_Node_Str",null,"String_Node_Str");
  final Map<String,Set<String>> serviceMap=new TreeMap<String,Set<String>>();
  RequestBuilder builder=new RequestBuilder(RequestBuilder.GET,URL.encode(url));
  try {
    builder.sendRequest(null,new RequestCallback(){
      public void onError(      Request request,      Throwable err){
        errorLogger.log(Level.SEVERE,"String_Node_Str",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.getStatusCode()+ "String_Node_Str"+ response.getText());
          callback.onFailure(getErrorAsThrowable(response));
        }
 else {
          GWT.log(response.getText());
          MetricsMetaDataResponse metaDataResponse=MetricsMetaDataResponse.fromJSON(response.getText());
          if (metaDataResponse == null)           callback.onFailure(new Throwable(ConsoleUtil.messages.badRequestData()));
 else {
            Set<String> services=metaDataResponse.getOrderedResourceEntityResponseNames();
            for (            String s : services) {
              GWT.log("String_Node_Str" + s);
              serviceMap.put(s,new TreeSet<String>());
            }
            getServiceOperationsJSON(serviceMap,callback);
          }
        }
      }
    }
);
  }
 catch (  RequestException x) {
    errorLogger.log(Level.SEVERE,"String_Node_Str",x);
    callback.onFailure(x);
  }
}