Program: 145430
Project: 145430
Buggy source:
public Object requestServerMethodExecution(final String aModuleName,final String aMethodName,final JsArrayString aParams,final JavaScriptObject onSuccess,final JavaScriptObject onFailure) throws Exception {
  String[] convertedParams=new String[aParams.length()];
  for (int i=0; i < aParams.length(); i++)   convertedParams[i]=param(PlatypusHttpRequestParams.PARAMS_ARRAY,aParams.get(i));
  String query=params(param(PlatypusHttpRequestParams.TYPE,String.valueOf(Requests.rqExecuteServerModuleMethod)),param(PlatypusHttpRequestParams.MODULE_NAME,aModuleName),param(PlatypusHttpRequestParams.METHOD_NAME,aMethodName),params(convertedParams));
  if (onSuccess != null) {
    startApiRequest(null,query,null,RequestBuilder.GET,new CallbackAdapter<XMLHttpRequest,XMLHttpRequest>(){
      @Override public void doWork(      XMLHttpRequest aResponse) throws Exception {
        String responseType=aResponse.getResponseHeader("String_Node_Str");
        if (responseType != null) {
          responseType=responseType.toLowerCase();
          if (responseType.contains("String_Node_Str") || responseType.contains("String_Node_Str")) {
            Utils.executeScriptEventVoid(onSuccess,onSuccess,Utils.toJs(aResponse.getResponseText()));
          }
 else           if (responseType.contains(REPORT_LOCATION_CONTENT_TYPE)) {
            Utils.executeScriptEventVoid(onSuccess,onSuccess,Application.createReport(aResponse.getResponseText()));
          }
 else {
            Utils.executeScriptEventVoid(onSuccess,onSuccess,Utils.toJs(aResponse.getResponseText()));
          }
        }
 else {
          Utils.executeScriptEventVoid(onSuccess,onSuccess,Utils.toJs(aResponse.getResponseText()));
        }
      }
      @Override public void onFailure(      XMLHttpRequest aResponse){
        if (onFailure != null) {
          try {
            Utils.executeScriptEventVoid(onSuccess,onFailure,Utils.toJs(aResponse.getStatusText()));
          }
 catch (          Exception ex) {
            Logger.getLogger(AppClient.class.getName()).log(Level.SEVERE,null,ex);
          }
        }
      }
    }
);
    return null;
  }
 else {
    XMLHttpRequest2 executed=syncRequest(null,query,ResponseType.Default);
    if (executed != null) {
      if (executed.getStatus() == Response.SC_OK) {
        String responseType=executed.getResponseHeader("String_Node_Str");
        if (responseType != null) {
          responseType=responseType.toLowerCase();
          if (responseType.contains("String_Node_Str") || responseType.contains("String_Node_Str")) {
            return Utils.toJs(executed.getResponseText());
          }
 else           if (responseType.contains(REPORT_LOCATION_CONTENT_TYPE)) {
            return Application.createReport(executed.getResponseText());
          }
 else {
            return Utils.toJs(executed.getResponseText());
          }
        }
 else {
          return Utils.toJs(executed.getResponseText());
        }
      }
 else       throw new Exception(executed.getStatusText());
    }
 else {
      return null;
    }
  }
}

Fixed version (ground truth):
public Object requestServerMethodExecution(final String aModuleName,final String aMethodName,final JsArrayString aParams,final JavaScriptObject onSuccess,final JavaScriptObject onFailure) throws Exception {
  String[] convertedParams=new String[aParams.length()];
  for (int i=0; i < aParams.length(); i++)   convertedParams[i]=param(PlatypusHttpRequestParams.PARAMS_ARRAY,aParams.get(i));
  String query=params(param(PlatypusHttpRequestParams.TYPE,String.valueOf(Requests.rqExecuteServerModuleMethod)),param(PlatypusHttpRequestParams.MODULE_NAME,aModuleName),param(PlatypusHttpRequestParams.METHOD_NAME,aMethodName),params(convertedParams));
  if (onSuccess != null) {
    startApiRequest(null,query,null,RequestBuilder.GET,new CallbackAdapter<XMLHttpRequest,XMLHttpRequest>(){
      @Override public void doWork(      XMLHttpRequest aResponse) throws Exception {
        String responseType=aResponse.getResponseHeader("String_Node_Str");
        if (responseType != null) {
          responseType=responseType.toLowerCase();
          if (responseType.contains("String_Node_Str") || responseType.contains("String_Node_Str")) {
            Utils.executeScriptEventVoid(onSuccess,onSuccess,Utils.toJs(aResponse.getResponseText()));
          }
 else           if (responseType.contains(REPORT_LOCATION_CONTENT_TYPE)) {
            Utils.executeScriptEventVoid(onSuccess,onSuccess,Application.createReport(aResponse.getResponseText()));
          }
 else {
            Utils.executeScriptEventVoid(onSuccess,onSuccess,Utils.toJs(aResponse.getResponseText()));
          }
        }
 else {
          Utils.executeScriptEventVoid(onSuccess,onSuccess,Utils.toJs(aResponse.getResponseText()));
        }
      }
      @Override public void onFailure(      XMLHttpRequest aResponse){
        if (onFailure != null) {
          try {
            Utils.executeScriptEventVoid(onSuccess,onFailure,Utils.toJs(aResponse.getStatusText()));
          }
 catch (          Exception ex) {
            Logger.getLogger(AppClient.class.getName()).log(Level.SEVERE,null,ex);
          }
        }
      }
    }
);
    return null;
  }
 else {
    XMLHttpRequest2 executed=syncApiRequest(null,query,ResponseType.Default);
    if (executed != null) {
      if (executed.getStatus() == Response.SC_OK) {
        String responseType=executed.getResponseHeader("String_Node_Str");
        if (responseType != null) {
          responseType=responseType.toLowerCase();
          if (responseType.contains("String_Node_Str") || responseType.contains("String_Node_Str")) {
            return Utils.toJs(executed.getResponseText());
          }
 else           if (responseType.contains(REPORT_LOCATION_CONTENT_TYPE)) {
            return Application.createReport(executed.getResponseText());
          }
 else {
            return Utils.toJs(executed.getResponseText());
          }
        }
 else {
          return Utils.toJs(executed.getResponseText());
        }
      }
 else       throw new Exception(executed.getStatusText());
    }
 else {
      return null;
    }
  }
}