Program: 38066
Project: 38066
Buggy source:
private static KloudlessResponse makeAppEngineRequest(RequestMethod method,Map<String,Object> params,String url,String query,Map<String,String> keys) throws APIException {
  String unknownErrorMessage="String_Node_Str" + "String_Node_Str";
  try {
    if (method == RequestMethod.GET || method == RequestMethod.DELETE) {
      url=String.format("String_Node_Str",url,query);
    }
    URL fetchURL=new URL(url);
    Class<?> requestMethodClass=Class.forName("String_Node_Str");
    Object httpMethod=requestMethodClass.getDeclaredField(method.name()).get(null);
    Class<?> fetchOptionsBuilderClass=Class.forName("String_Node_Str");
    Object fetchOptions=null;
    try {
      fetchOptions=fetchOptionsBuilderClass.getDeclaredMethod("String_Node_Str").invoke(null);
    }
 catch (    NoSuchMethodException e) {
      System.err.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
      fetchOptions=fetchOptionsBuilderClass.getDeclaredMethod("String_Node_Str").invoke(null);
    }
    Class<?> fetchOptionsClass=Class.forName("String_Node_Str");
    fetchOptionsClass.getDeclaredMethod("String_Node_Str",java.lang.Double.class).invoke(fetchOptions,new Double(55));
    Class<?> requestClass=Class.forName("String_Node_Str");
    Object request=requestClass.getDeclaredConstructor(URL.class,requestMethodClass,fetchOptionsClass).newInstance(fetchURL,httpMethod,fetchOptions);
    Map<String,String> extraHeaders=getHeaders(keys,url);
    if (query == null || query.length() == 0) {
      requestClass.getDeclaredMethod("String_Node_Str",byte[].class).invoke(request,GSON.toJson(params).getBytes());
      extraHeaders.put("String_Node_Str",String.format("String_Node_Str",CHARSET));
    }
 else {
      requestClass.getDeclaredMethod("String_Node_Str",byte[].class).invoke(request,query.getBytes());
    }
    for (    Map.Entry<String,String> header : extraHeaders.entrySet()) {
      Class<?> httpHeaderClass=Class.forName("String_Node_Str");
      Object reqHeader=httpHeaderClass.getDeclaredConstructor(String.class,String.class).newInstance(header.getKey(),header.getValue());
      requestClass.getDeclaredMethod("String_Node_Str",httpHeaderClass).invoke(request,reqHeader);
    }
    for (    Map.Entry<String,String> header : Kloudless.customHeaders.entrySet()) {
      Class<?> httpHeaderClass=Class.forName("String_Node_Str");
      Object reqHeader=httpHeaderClass.getDeclaredConstructor(String.class,String.class).newInstance(header.getKey(),header.getValue());
      requestClass.getDeclaredMethod("String_Node_Str",httpHeaderClass).invoke(request,reqHeader);
    }
    Class<?> urlFetchFactoryClass=Class.forName("String_Node_Str");
    Object urlFetchService=urlFetchFactoryClass.getDeclaredMethod("String_Node_Str").invoke(null);
    Method fetchMethod=urlFetchService.getClass().getDeclaredMethod("String_Node_Str",requestClass);
    fetchMethod.setAccessible(true);
    Object response=fetchMethod.invoke(urlFetchService,request);
    Map<String,List<String>> headers=new HashMap<String,List<String>>();
    int responseCode=(Integer)response.getClass().getDeclaredMethod("String_Node_Str").invoke(response);
    String body;
    byte[] responseBytes=(byte[])response.getClass().getDeclaredMethod("String_Node_Str").invoke(response);
    if (responseBytes == null)     body="String_Node_Str";
 else     body=new String(responseBytes,CHARSET);
    ByteArrayOutputStream responseStream=new ByteArrayOutputStream(responseBytes.length);
    responseStream.write(responseBytes,0,responseBytes.length);
    return new KloudlessResponse(responseCode,body,headers,responseStream);
  }
 catch (  InvocationTargetException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  MalformedURLException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  NoSuchFieldException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  SecurityException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  NoSuchMethodException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  ClassNotFoundException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  IllegalArgumentException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  IllegalAccessException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  InstantiationException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  UnsupportedEncodingException e) {
    throw new APIException(unknownErrorMessage,e);
  }
}

Fixed version (ground truth):
private static KloudlessResponse makeAppEngineRequest(RequestMethod method,Map<String,Object> params,String url,String query,Map<String,String> keys) throws APIException {
  String unknownErrorMessage="String_Node_Str" + "String_Node_Str";
  try {
    if (method == RequestMethod.GET || method == RequestMethod.DELETE) {
      url=String.format("String_Node_Str",url,query);
    }
    URL fetchURL=new URL(url);
    Class<?> requestMethodClass=Class.forName("String_Node_Str");
    Object httpMethod=requestMethodClass.getDeclaredField(method.name()).get(null);
    Class<?> fetchOptionsBuilderClass=Class.forName("String_Node_Str");
    Object fetchOptions=null;
    try {
      fetchOptions=fetchOptionsBuilderClass.getDeclaredMethod("String_Node_Str").invoke(null);
    }
 catch (    NoSuchMethodException e) {
      System.err.println("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
      fetchOptions=fetchOptionsBuilderClass.getDeclaredMethod("String_Node_Str").invoke(null);
    }
    Class<?> fetchOptionsClass=Class.forName("String_Node_Str");
    fetchOptionsClass.getDeclaredMethod("String_Node_Str",java.lang.Double.class).invoke(fetchOptions,new Double(55));
    Class<?> requestClass=Class.forName("String_Node_Str");
    Object request=requestClass.getDeclaredConstructor(URL.class,requestMethodClass,fetchOptionsClass).newInstance(fetchURL,httpMethod,fetchOptions);
    Map<String,String> extraHeaders=getHeaders(keys,url);
    if (query == null || query.length() == 0) {
      requestClass.getDeclaredMethod("String_Node_Str",byte[].class).invoke(request,GSON.toJson(params).getBytes());
      extraHeaders.put("String_Node_Str",String.format("String_Node_Str",CHARSET));
    }
 else {
      requestClass.getDeclaredMethod("String_Node_Str",byte[].class).invoke(request,query.getBytes());
    }
    for (    Map.Entry<String,String> header : extraHeaders.entrySet()) {
      Class<?> httpHeaderClass=Class.forName("String_Node_Str");
      Object reqHeader=httpHeaderClass.getDeclaredConstructor(String.class,String.class).newInstance(header.getKey(),header.getValue());
      requestClass.getDeclaredMethod("String_Node_Str",httpHeaderClass).invoke(request,reqHeader);
    }
    for (    Map.Entry<String,String> header : Kloudless.customHeaders.entrySet()) {
      Class<?> httpHeaderClass=Class.forName("String_Node_Str");
      Object reqHeader=httpHeaderClass.getDeclaredConstructor(String.class,String.class).newInstance(header.getKey(),header.getValue());
      requestClass.getDeclaredMethod("String_Node_Str",httpHeaderClass).invoke(request,reqHeader);
    }
    Class<?> urlFetchFactoryClass=Class.forName("String_Node_Str");
    Object urlFetchService=urlFetchFactoryClass.getDeclaredMethod("String_Node_Str").invoke(null);
    Method fetchMethod=urlFetchService.getClass().getDeclaredMethod("String_Node_Str",requestClass);
    fetchMethod.setAccessible(true);
    Object response=fetchMethod.invoke(urlFetchService,request);
    Map<String,List<String>> headers=new HashMap<String,List<String>>();
    int responseCode=(Integer)response.getClass().getDeclaredMethod("String_Node_Str").invoke(response);
    String body="String_Node_Str";
    byte[] responseBytes=(byte[])response.getClass().getDeclaredMethod("String_Node_Str").invoke(response);
    ByteArrayOutputStream responseStream=new ByteArrayOutputStream(0);
    if (responseBytes != null) {
      body=new String(responseBytes,CHARSET);
      responseStream=new ByteArrayOutputStream(responseBytes.length);
      responseStream.write(responseBytes,0,responseBytes.length);
    }
    return new KloudlessResponse(responseCode,body,headers,responseStream);
  }
 catch (  InvocationTargetException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  MalformedURLException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  NoSuchFieldException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  SecurityException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  NoSuchMethodException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  ClassNotFoundException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  IllegalArgumentException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  IllegalAccessException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  InstantiationException e) {
    throw new APIException(unknownErrorMessage,e);
  }
catch (  UnsupportedEncodingException e) {
    throw new APIException(unknownErrorMessage,e);
  }
}